diff --git a/.editorconfig b/.editorconfig
index 67d639448..2355b967a 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -18,3 +18,7 @@ indent_size = 4
[CHANGELOG.md]
indent_size = 2
max_line_length = 120
+
+[CITATION.cff]
+indent_style = space
+ident_size = 2
diff --git a/.run/kipper compile (js).run.xml b/.run/kipper compile (js).run.xml
new file mode 100644
index 000000000..78a6773dc
--- /dev/null
+++ b/.run/kipper compile (js).run.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.run/kipper compile (ts).run.xml b/.run/kipper compile (ts).run.xml
new file mode 100644
index 000000000..6182a4ba6
--- /dev/null
+++ b/.run/kipper compile (ts).run.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.run/kipper compile.run.xml b/.run/kipper compile.run.xml
deleted file mode 100644
index 3ffd8fe5f..000000000
--- a/.run/kipper compile.run.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.run/kipper run (js).run.xml b/.run/kipper run (js).run.xml
new file mode 100644
index 000000000..f0ca8ab98
--- /dev/null
+++ b/.run/kipper run (js).run.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.run/kipper run (ts).run.xml b/.run/kipper run (ts).run.xml
new file mode 100644
index 000000000..0ea513a5d
--- /dev/null
+++ b/.run/kipper run (ts).run.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.run/kipper run.run.xml b/.run/kipper run.run.xml
index cb82328e8..e69de29bb 100644
--- a/.run/kipper run.run.xml
+++ b/.run/kipper run.run.xml
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 030651581..5714d2e93 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,9 +18,20 @@ To use development versions of Kipper download the
### Added
-- Support for the typeof operator, which returns the runtime type of a value.
- ([#663](https://github.com/Kipper-Lang/Kipper/issues/663))
-- Support for Nix Flakes and direnv, which allows for a more reproducible and consistent development environment.
+### Changed
+
+### Fixed
+
+### Deprecated
+
+### Removed
+
+
+
+## [0.12.0] - 2024-09-25
+
+### Added
+
- Support for dot notation for accessing properties of objects. ([#67](https://github.com/Kipper-Lang/Kipper/issues/67))
- Support for classes, class methods, class properties and class constructors.
([#665](https://github.com/Kipper-Lang/Kipper/issues/665))
@@ -28,10 +39,16 @@ To use development versions of Kipper download the
([#526](https://github.com/Kipper-Lang/Kipper/issues/526))
- Support for calling lambdas and functions stored in variables or expressions.
([#674](https://github.com/Kipper-Lang/Kipper/issues/674))
-- Implemented internal representation for custom types such as objects, interfaces and classes. This change means that
- the entire core type system has been reworked and adjusted to also support custom types as well as complex types
- (objects, arrays etc.). This does not inherently add functionality but serves as the stepping stone for the
- implementation of all custom types in the future. ([#524](https://github.com/Kipper-Lang/Kipper/issues/524))
+- Semantic checking and code generation for the `new` keyword expression to be able to create new instances of
+ classes. ([#679](https://github.com/Kipper-Lang/Kipper/issues/679))
+- Support for the `this` keyword inside a class method to access the current instance of the class.
+ ([#697](https://github.com/Kipper-Lang/Kipper/issues/697))
+- Support for the typeof operator, which returns the runtime type of a value.
+ ([#663](https://github.com/Kipper-Lang/Kipper/issues/663))
+- Implemented `instanceof` operator expression, which checks if an object is an instance of a class.
+ ([#686](https://github.com/Kipper-Lang/Kipper/issues/686))
+- Implemented `matches` operator expression, which checks if an object matches an interface.
+ ([#672](https://github.com/Kipper-Lang/Kipper/issues/672))
- Implemented the generic `Array` type and single-type array initializers.
([#499](https://github.com/Kipper-Lang/Kipper/issues/499))
- Support for index-based array assignments. ([#669](https://github.com/Kipper-Lang/Kipper/issues/669))
@@ -41,13 +58,22 @@ To use development versions of Kipper download the
parameter inside a generic type specifier.
- Implemented constant `NaN`, which represents the `NaN` value in JavaScript (Not a Number).
([#671](https://github.com/Kipper-Lang/Kipper/issues/671))
+- Support for Nix Flakes and direnv, which allows for a more reproducible and consistent development environment.
- Support for internal type unions in built-in and internal functions.
([#496](https://github.com/Kipper-Lang/Kipper/issues/496))
+- Support for the `obj` type translation to TypeScript.
+- Implemented internal representation for custom types such as objects, interfaces and classes. This change means that
+ the entire core type system has been reworked and adjusted to also support custom types as well as complex types
+ (objects, arrays etc.). This does not inherently add functionality but serves as the stepping stone for the
+ implementation of all custom types in the future. ([#524](https://github.com/Kipper-Lang/Kipper/issues/524))
+- Implemented internal preliminary type checking and "ahead of time" type evaluation to allow for self-referential
+ types and type checking of recursive types.
- New module:
- `semantics/runtime-built-ins`, which contains runtime built-in functions, variables and types.
- `semantics/runtime-internals`, which contains the runtime internal functions.
- `semantics/types`, which contains the runtime types.
- New classes:
+ - `NewInstantiationExpression`, which represents an AST new instantiation expression.
- `TypeofExpression`, which represents an AST typeof expression that returns the runtime type of an object.
- `TypeofTypeSpecifierExpression`, which represents an AST typeof type specifier that lets one define a type by using an object as reference
- `BuiltInTypeObject`, which is the base class for the compilers representation of runtime objects
@@ -72,7 +98,11 @@ To use development versions of Kipper download the
- `BuiltInTypeFunc`, which represents the `Func` type.
- `BuiltInTypeObj`, which represents the `obj` type.
- `ScopeTypeDeclaration`, which represents a scope type declaration.
- - `CustomType`, which is a class extending from `ProcessedType` and implementing the functionality for a custom type such as a interface or class.
+ - `CustomType`, which is a class extending from `ProcessedType` and implementing the functionality for a custom type such as an interface or class.
+ - `UserScope`, which represents a user scope i.e. any scope except the universe scope.
+ - `ClassScopeThisDeclaration`, which represents the `this` declaration of a class.
+ - `InstanceOfExpression`, which represents the `instanceof` operator expression.
+ - `MatchesExpression`, which represents the `matches` operator expression.
- New errors:
- `TypeCanNotBeUsedForTypeCheckingError`, which is thrown when a type is used for type checking, but is not a valid
type. This is an error indicating an invalid logic that should be fixed.
@@ -90,6 +120,10 @@ To use development versions of Kipper download the
- `ValueTypeNotIndexableWithGivenAccessor`, which is thrown when a value type is not indexable with the given
accessor.
- `PropertyDoesNotExistError`, which is thrown when a property does not exist on a type.
+ - `DuplicateUniverseKeyError`, which is thrown when a key is duplicated in the universe scope.
+ - `IdentifierAlreadyUsedByMemberError`, which is thrown when an identifier is already used by another property.
+ - `InvalidInstanceOfTypeError`, which is thrown when the `instanceof` operator is used with a type other than a class.
+ - `InvalidMatchesTypeError`, which is thrown when the `matches` operator is used with a type other than an interface.
- New interfaces and types:
- `InterfaceDeclarationSemantics`, which represents the semantics of an interface declaration.
- `InterfaceDeclarationTypeSemantics`, which represents the type semantics of an interface declaration.
@@ -107,10 +141,27 @@ To use development versions of Kipper download the
- `CompilableType`, which represents a type that can be compiled.
- `BuiltInReference`, which replaces the now removed type `Reference` in the `KipperProgramContext` for reference
tracking of built-in types.
+ - `NewInstantiationExpressionSemantics`, which represents the semantics of a new instantiation expression.
+ - `NewInstantiationExpressionTypeSemantics`, which represents the type semantics of a new instantiation expression.
+ - `TypeofExpressionSemantics`, which represents the semantics of a typeof expression.
+ - `TypeofExpressionTypeSemantics`, which represents the type semantics of a typeof expression.
+ - `KipperCallable`, which is an alias for `FunctionDeclaration`, `LambdaPrimaryExpression` and
+ `ClassMethodDeclaration`.
+ - `TypeDeclarationPropertyTypeSemantics`, which represents the type semantics of a type declaration property.
+ - `InstanceOfExpressionSemantics`, which represents the semantics of an instanceof expression.
+ - `InstanceOfExpressionTypeSemantics`, which represents the type semantics of an instanceof expression.
+ - `MatchesExpressionSemantics`, which represents the semantics of a matches expression.
+ - `MatchesExpressionTypeSemantics`, which represents the type semantics of a matches expression.
- New functions:
- - `KipperTypeChecker.validArrayExpression`, which ensures that an array expression is valid.
- - `generateInterfaceRuntimeTypeChecks` which generates runtime type checks for an interface.
- - `getRuntimeType`, which gets the corresponding runtime representation of a built-in type.
+ - `KipperTypeChecker.validArrayExpression()`, which ensures that an array expression is valid.
+ - `KipperTypeChecker.validInstanceofClassType()`, which ensures that an `instanceof` expression is valid for a class.
+ - `KipperTypeChecker.validMatchesInterfaceType()`, which ensures that a `matches` expression is valid for an
+ interface.
+ - `ClassDeclaration.getThis()`, which returns the `this` type of the class.
+ - `ClassScope.getThis()`, which returns the `this` type of the class. This is a simple alias for the method in the
+ `ClassDeclaration` class.
+ - `JavaScriptTargetCodeGenerator.generateInterfaceRuntimeTypeChecks()` which generates runtime type checks for an interface.
+ - `getRuntimeType()`, which gets the corresponding runtime representation of a built-in type.
- New properties:
- `BuiltInFunction.funcType`, which returns a function type for the built-in function.
- `FunctionDeclarationTypeSemantics.type`, which returns the type of the function declaration i.e. the function type.
@@ -118,6 +169,17 @@ To use development versions of Kipper download the
function type.
- `FunctionCallExpressionTypeSemantics.funcOrExp`, which returns the function or expression that is called. This
always stores some sort of value that extends `BuiltInTypeFunc`.
+ - `CustomType.clsExtends`, which returns the class that the custom type extends. This is only applicable for classes.
+ - `CustomType.clsImplements`, which returns the interfaces that the custom type implements. This is only applicable
+ for classes.
+ - `CustomType.intfExtends`, which returns the interfaces that the custom type extends. This is only applicable for
+ interfaces.
+ - `CustomType._clsStaticFields`, which returns the static fields of the custom type. This is only applicable for
+ classes.
+ - `ASTNode.preliminaryTypeSemantics`, which runs the preliminary type semantics of the node as well as the preliminary
+ type semantics of all its children. This is a recursive function.
+ - `ASTNode.primaryPreliminaryTypeSemantics`, which returns the primary preliminary type semantics of the node. May be
+ undefined if there is no primary preliminary type semantics for the given node.
- New runtime error `KipperError`, which serves as the base for `TypeError` and `IndexError`.
### Changed
@@ -136,6 +198,7 @@ To use development versions of Kipper download the
- Class `UncheckedType` to `RawType`.
- Class `CheckedType` to `ProcessedType`.
- Class `UndefinedCustomType` to `UndefinedType`.
+ - Method `KipperProgramContext._initUniversalReferencables()` to `_initUniversalReferenceables()`.
### Fixed
@@ -143,15 +206,19 @@ To use development versions of Kipper download the
now enables proper type checking for function references.
- CLI command `run` not properly reporting internal or unexpected errors, as they were already prettified in the
internally called up command `compile`.
-
-### Deprecated
+- Previously invalid parent type checking and evaluation performed in `ReturnStatement`. This was now made absolute by
+ the introduction of the preliminary type checking and "ahead of time" type evaluation, as that now allows for
+ self-referential types and type checking of recursive types i.e. the return statement now knows the type of its
+ function even though it is not yet fully processed.
+- Duplicate universe entry registration in the `KipperProgramContext` for built-in types, functions and variables.
+- Bug where lambda compound bodies would cause a syntax error, despite being a valid lambda body.
### Removed
- Type `Reference` as it is no longer needed and has been replaced by `KipperReferenceable`.
-- `FunctionCallExpressionTypeSemantics.func`, which is now has been replaced by `funcOrExp`.
-
-
+- Function `FunctionCallExpressionTypeSemantics.func`, which is now has been replaced by `funcOrExp`.
+- Function `KipperProgramContext.setUpBuiltInsInGlobalScope()`, which is no longer needed as the universe scope now
+ handles all built-in types, functions and variables.
## [0.11.0] - 2024-07-10
@@ -1539,7 +1606,8 @@ To use development versions of Kipper download the
- Updated file structure to separate `commands` (for `oclif`) and `compiler` (for the compiler source-code)
-[unreleased]: https://github.com/Kipper-Lang/Kipper/compare/v0.11.0...HEAD
+[unreleased]: https://github.com/Kipper-Lang/Kipper/compare/v0.12.0...HEAD
+[0.12.0]: https://github.com/Kipper-Lang/Kipper/compare/v0.11.0...v0.12.0
[0.11.0]: https://github.com/Kipper-Lang/Kipper/compare/v0.10.4...v0.11.0
[0.10.4]: https://github.com/Kipper-Lang/Kipper/compare/v0.10.3...v0.10.4
[0.10.3]: https://github.com/Kipper-Lang/Kipper/compare/v0.10.2...v0.10.3
diff --git a/CITATION.cff b/CITATION.cff
index 13352f3af..3b1930b13 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -7,14 +7,22 @@ type: software
authors:
- given-names: Luna
family-names: Klatzer
- email: luna.klatzer@gmail.com
+ email: edu@lklatzer.com
affiliation: HTL Leonding
orcid: 'https://orcid.org/0009-0001-5332-8988'
+ - given-names: Lorenz
+ family-names: Holzbauer
+ email: l.holzbauer@students.htl-leonding.ac.at
+ affiliation: HTL Leonding
+ - given-names: Fabian
+ family-names: Baitura
+ email: f.baitura@students.htl-leonding.ac.at
+ affiliation: HTL Leonding
identifiers:
- type: url
value: >-
- https://github.com/Kipper-Lang/Kipper/releases/tag/v0.12.0-alpha.1
- description: The GitHub release URL of tag 0.12.0-alpha.0
+ https://github.com/Kipper-Lang/Kipper/releases/tag/v0.12.0
+ description: The GitHub release URL of tag 0.12.0
repository-code: 'https://github.com/Kipper-Lang/Kipper/'
url: 'https://kipper-lang.org'
abstract: >-
@@ -31,6 +39,6 @@ keywords:
- oop-programming
- type-safety
license: GPL-3.0-or-later
-license-url: 'https://github.com/Kipper-Lang/Kipper/blob/v0.12.0-alpha.1/LICENSE'
-version: 0.12.0-alpha.0
-date-released: '2024-07-01'
+license-url: 'https://github.com/Kipper-Lang/Kipper/blob/v0.12.0/LICENSE'
+version: 0.12.0
+date-released: '2024-09-25'
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index 48bcdf84e..0f7d93c07 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -179,6 +179,7 @@ which can be included and used inside a browser without any dependencies.
- `identifiers.description`
- `license-url`
- `version`
+ - `date-released`
These changes must be committed yourself with a commit message preferably similar to this:
diff --git a/kipper.sh b/kipper.sh
new file mode 100755
index 000000000..30126adc9
--- /dev/null
+++ b/kipper.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+./kipper/cli/bin/run
diff --git a/kipper/cli/README.md b/kipper/cli/README.md
index 77017132e..0e114949a 100644
--- a/kipper/cli/README.md
+++ b/kipper/cli/README.md
@@ -46,7 +46,7 @@ $ npm install -g @kipper/cli
$ kipper COMMAND
running command...
$ kipper (--version)
-@kipper/cli/0.12.0-alpha.1 linux-x64 node-v18.18.2
+@kipper/cli/0.12.0 linux-x64 node-v20.15.0
$ kipper --help [COMMAND]
USAGE
$ kipper COMMAND
@@ -115,7 +115,7 @@ EXAMPLES
kipper compile -t ts ./path/to/file.kip -o build/ -e utf16le --warnings --log-timestamp
```
-_See code: [src/commands/compile.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0-alpha.1/kipper/cli/src/commands/compile.ts)_
+_See code: [src/commands/compile.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0/kipper/cli/src/commands/compile.ts)_
## `kipper help [COMMAND]`
@@ -132,7 +132,7 @@ OPTIONS
--all see all commands in CLI
```
-_See code: [src/commands/help.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0-alpha.1/kipper/cli/src/commands/help.ts)_
+_See code: [src/commands/help.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0/kipper/cli/src/commands/help.ts)_
## `kipper new [LOCATION]`
@@ -149,7 +149,7 @@ OPTIONS
-d, --default Use the default settings for the new project. Skips the setup wizard.
```
-_See code: [src/commands/new.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0-alpha.1/kipper/cli/src/commands/new.ts)_
+_See code: [src/commands/new.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0/kipper/cli/src/commands/new.ts)_
## `kipper run [FILE]`
@@ -194,7 +194,7 @@ EXAMPLES
kipper run -t ts -o build/ -e utf8 -s "print('Hello, World!');" --warnings --log-timestamp
```
-_See code: [src/commands/run.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0-alpha.1/kipper/cli/src/commands/run.ts)_
+_See code: [src/commands/run.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0/kipper/cli/src/commands/run.ts)_
## `kipper version`
@@ -205,7 +205,7 @@ USAGE
$ kipper version
```
-_See code: [src/commands/version.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0-alpha.1/kipper/cli/src/commands/version.ts)_
+_See code: [src/commands/version.ts](https://github.com/Kipper-Lang/Kipper/blob/v0.12.0/kipper/cli/src/commands/version.ts)_
diff --git a/kipper/cli/package.json b/kipper/cli/package.json
index 84758d5a3..5376c7d49 100644
--- a/kipper/cli/package.json
+++ b/kipper/cli/package.json
@@ -1,7 +1,7 @@
{
"name": "@kipper/cli",
"description": "The Kipper Command Line Interface (CLI).",
- "version": "0.12.0-alpha.1",
+ "version": "0.12.0",
"author": "Luna-Klatzer @Luna-Klatzer",
"bin": {
"kipper": "./bin/run",
@@ -25,7 +25,7 @@
"inquirer": "7.3.3"
},
"devDependencies": {
- "@types/node": "20.14.9",
+ "@types/node": "20.16.5",
"@types/sinon": "17.0.3",
"@types/inquirer": "7.3.3",
"@sinonjs/fake-timers": "11.2.2",
@@ -39,7 +39,7 @@
"typescript": "5.1.3",
"@oclif/core": "1.26.2",
"oclif": "3.4.6",
- "semver": "7.6.2",
+ "semver": "7.6.3",
"prettier": "3.3.3"
},
"overrides": {
diff --git a/kipper/cli/pnpm-lock.yaml b/kipper/cli/pnpm-lock.yaml
index ca326edc6..88280807b 100644
--- a/kipper/cli/pnpm-lock.yaml
+++ b/kipper/cli/pnpm-lock.yaml
@@ -34,7 +34,7 @@ dependencies:
version: 3.3.1
'@oclif/plugin-warn-if-update-available':
specifier: 2.0.37
- version: 2.0.37(@types/node@20.14.9)(typescript@5.1.3)
+ version: 2.0.37(@types/node@20.16.5)(typescript@5.1.3)
chalk:
specifier: 4.1.2
version: 4.1.2
@@ -43,7 +43,7 @@ dependencies:
version: 7.3.3
ts-node:
specifier: 10.9.2
- version: 10.9.2(@types/node@20.14.9)(typescript@5.1.3)
+ version: 10.9.2(@types/node@20.16.5)(typescript@5.1.3)
tslib:
specifier: ~2.6.2
version: 2.6.2
@@ -57,7 +57,7 @@ devDependencies:
version: 1.26.2
'@oclif/test':
specifier: 2.5.6
- version: 2.5.6(@types/node@20.14.9)(typescript@5.1.3)
+ version: 2.5.6(@types/node@20.16.5)(typescript@5.1.3)
'@sinonjs/fake-timers':
specifier: 11.2.2
version: 11.2.2
@@ -65,8 +65,8 @@ devDependencies:
specifier: 7.3.3
version: 7.3.3
'@types/node':
- specifier: 20.14.9
- version: 20.14.9
+ specifier: 20.16.5
+ version: 20.16.5
'@types/sinon':
specifier: 17.0.3
version: 17.0.3
@@ -78,7 +78,7 @@ devDependencies:
version: 3.0.2
oclif:
specifier: 3.4.6
- version: 3.4.6(@types/node@20.14.9)(typescript@5.1.3)
+ version: 3.4.6(@types/node@20.16.5)(typescript@5.1.3)
os-tmpdir:
specifier: 2.0.0
version: 2.0.0
@@ -92,8 +92,8 @@ devDependencies:
specifier: 5.0.7
version: 5.0.7
semver:
- specifier: 7.6.2
- version: 7.6.2
+ specifier: 7.6.3
+ version: 7.6.3
typescript:
specifier: 5.1.3
version: 5.1.3
@@ -219,7 +219,7 @@ packages:
read-package-json-fast: 2.0.3
readdir-scoped-modules: 1.1.0
rimraf: 3.0.2
- semver: 7.6.2
+ semver: 7.6.3
ssri: 8.0.1
treeverse: 1.0.4
walk-up-path: 1.0.0
@@ -232,7 +232,7 @@ packages:
resolution: {integrity: sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==}
dependencies:
'@gar/promisify': 1.1.3
- semver: 7.6.2
+ semver: 7.6.3
dev: true
/@npmcli/fs@2.1.2:
@@ -240,14 +240,14 @@ packages:
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
dependencies:
'@gar/promisify': 1.1.3
- semver: 7.6.2
+ semver: 7.6.3
dev: true
/@npmcli/fs@3.1.1:
resolution: {integrity: sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
dependencies:
- semver: 7.6.2
+ semver: 7.6.3
dev: true
/@npmcli/git@2.1.0:
@@ -259,7 +259,7 @@ packages:
npm-pick-manifest: 6.1.1
promise-inflight: 1.0.1
promise-retry: 2.0.1
- semver: 7.6.2
+ semver: 7.6.3
which: 2.0.2
transitivePeerDependencies:
- bluebird
@@ -275,7 +275,7 @@ packages:
proc-log: 3.0.0
promise-inflight: 1.0.1
promise-retry: 2.0.1
- semver: 7.6.2
+ semver: 7.6.3
which: 3.0.1
transitivePeerDependencies:
- bluebird
@@ -314,7 +314,7 @@ packages:
cacache: 15.3.0
json-parse-even-better-errors: 2.3.1
pacote: 12.0.3
- semver: 7.6.2
+ semver: 7.6.3
transitivePeerDependencies:
- bluebird
- supports-color
@@ -405,7 +405,7 @@ packages:
'@oclif/help': 1.0.5
'@oclif/parser': 3.8.17
debug: 4.3.5(supports-color@8.1.1)
- semver: 7.6.2
+ semver: 7.6.3
transitivePeerDependencies:
- supports-color
dev: false
@@ -421,7 +421,7 @@ packages:
'@oclif/help': 1.0.5
'@oclif/parser': 3.8.17
debug: 4.3.5(supports-color@8.1.1)
- semver: 7.6.2
+ semver: 7.6.3
transitivePeerDependencies:
- supports-color
dev: false
@@ -492,7 +492,7 @@ packages:
natural-orderby: 2.0.3
object-treeify: 1.1.33
password-prompt: 1.1.2
- semver: 7.6.2
+ semver: 7.6.3
string-width: 4.2.3
strip-ansi: 6.0.1
supports-color: 8.1.1
@@ -502,7 +502,7 @@ packages:
wrap-ansi: 7.0.0
dev: true
- /@oclif/core@2.16.0(@types/node@20.14.9)(typescript@5.1.3):
+ /@oclif/core@2.16.0(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-dL6atBH0zCZl1A1IXCKJgLPrM/wR7K+Wi401E/IvqsK8m2iCHW+0TEOGrans/cuN3oTW+uxIyJFHJ8Im0k4qBw==}
engines: {node: '>=14.0.0'}
dependencies:
@@ -529,7 +529,7 @@ packages:
strip-ansi: 6.0.1
supports-color: 8.1.1
supports-hyperlinks: 2.2.0
- ts-node: 10.9.2(@types/node@20.14.9)(typescript@5.1.3)
+ ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.1.3)
tslib: 2.6.2
widest-line: 3.1.0
wordwrap: 1.0.0
@@ -611,11 +611,11 @@ packages:
- supports-color
dev: false
- /@oclif/plugin-help@5.2.20(@types/node@20.14.9)(typescript@5.1.3):
+ /@oclif/plugin-help@5.2.20(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-u+GXX/KAGL9S10LxAwNUaWdzbEBARJ92ogmM7g3gDVud2HioCmvWQCDohNRVZ9GYV9oKwZ/M8xwd6a1d95rEKQ==}
engines: {node: '>=12.0.0'}
dependencies:
- '@oclif/core': 2.16.0(@types/node@20.14.9)(typescript@5.1.3)
+ '@oclif/core': 2.16.0(@types/node@20.16.5)(typescript@5.1.3)
transitivePeerDependencies:
- '@swc/core'
- '@swc/wasm'
@@ -623,11 +623,11 @@ packages:
- typescript
dev: true
- /@oclif/plugin-not-found@2.4.3(@types/node@20.14.9)(typescript@5.1.3):
+ /@oclif/plugin-not-found@2.4.3(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-nIyaR4y692frwh7wIHZ3fb+2L6XEecQwRDIb4zbEam0TvaVmBQWZoColQyWA84ljFBPZ8XWiQyTz+ixSwdRkqg==}
engines: {node: '>=12.0.0'}
dependencies:
- '@oclif/core': 2.16.0(@types/node@20.14.9)(typescript@5.1.3)
+ '@oclif/core': 2.16.0(@types/node@20.16.5)(typescript@5.1.3)
chalk: 4.1.2
fast-levenshtein: 3.0.0
transitivePeerDependencies:
@@ -637,17 +637,17 @@ packages:
- typescript
dev: true
- /@oclif/plugin-warn-if-update-available@2.0.37(@types/node@20.14.9)(typescript@5.1.3):
+ /@oclif/plugin-warn-if-update-available@2.0.37(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-rfDNvplwgiwV+QSV4JU96ypmWgNJ6Hk5FEAEAKzqF0v0J8AHwZGpwwYO/MCZSkbc7bfYpkqLx/sxjpMO6j6PmQ==}
engines: {node: '>=12.0.0'}
dependencies:
- '@oclif/core': 2.16.0(@types/node@20.14.9)(typescript@5.1.3)
+ '@oclif/core': 2.16.0(@types/node@20.16.5)(typescript@5.1.3)
chalk: 4.1.2
debug: 4.3.5(supports-color@8.1.1)
fs-extra: 9.1.0
http-call: 5.3.0
lodash: 4.17.21
- semver: 7.6.2
+ semver: 7.6.3
transitivePeerDependencies:
- '@swc/core'
- '@swc/wasm'
@@ -660,11 +660,11 @@ packages:
engines: {node: '>=12.0.0'}
dev: true
- /@oclif/test@2.5.6(@types/node@20.14.9)(typescript@5.1.3):
+ /@oclif/test@2.5.6(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-AcusFApdU6/akXaofhBDrY4IM9uYzlOD9bYCCM0NwUXOv1m6320hSp2DT/wkj9H1gsvKbJXZHqgtXsNGZTWLFg==}
engines: {node: '>=12.0.0'}
dependencies:
- '@oclif/core': 2.16.0(@types/node@20.14.9)(typescript@5.1.3)
+ '@oclif/core': 2.16.0(@types/node@20.16.5)(typescript@5.1.3)
fancy-test: 2.0.42
transitivePeerDependencies:
- '@swc/core'
@@ -885,7 +885,7 @@ packages:
dependencies:
'@types/http-cache-semantics': 4.0.4
'@types/keyv': 3.1.4
- '@types/node': 20.14.9
+ '@types/node': 20.16.5
'@types/responselike': 1.0.3
dev: true
@@ -896,7 +896,7 @@ packages:
/@types/cli-progress@3.11.0:
resolution: {integrity: sha512-XhXhBv1R/q2ahF3BM7qT5HLzJNlIL0wbcGyZVjqOTqAybAnsLisd7gy1UCyIqpL+5Iv6XhlSyzjLCnI2sIdbCg==}
dependencies:
- '@types/node': 20.14.9
+ '@types/node': 20.16.5
/@types/expect@1.20.4:
resolution: {integrity: sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==}
@@ -916,7 +916,7 @@ packages:
/@types/keyv@3.1.4:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
dependencies:
- '@types/node': 20.14.9
+ '@types/node': 20.16.5
dev: true
/@types/lodash@4.17.6:
@@ -931,10 +931,10 @@ packages:
resolution: {integrity: sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==}
dev: true
- /@types/node@20.14.9:
- resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==}
+ /@types/node@20.16.5:
+ resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==}
dependencies:
- undici-types: 5.26.5
+ undici-types: 6.19.8
/@types/normalize-package-data@2.4.4:
resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}
@@ -943,7 +943,7 @@ packages:
/@types/responselike@1.0.3:
resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
dependencies:
- '@types/node': 20.14.9
+ '@types/node': 20.16.5
dev: true
/@types/sinon@17.0.3:
@@ -959,14 +959,14 @@ packages:
/@types/through@0.0.33:
resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==}
dependencies:
- '@types/node': 20.14.9
+ '@types/node': 20.16.5
dev: true
/@types/vinyl@2.0.12:
resolution: {integrity: sha512-Sr2fYMBUVGYq8kj3UthXFAu5UN6ZW+rYr4NACjZQJvHvj+c8lYv0CahmZ2P/r7iUkN44gGUBwqxZkrKXYPb7cw==}
dependencies:
'@types/expect': 1.20.4
- '@types/node': 20.14.9
+ '@types/node': 20.16.5
dev: true
/abbrev@1.1.1:
@@ -1818,7 +1818,7 @@ packages:
dependencies:
'@types/chai': 4.3.16
'@types/lodash': 4.17.6
- '@types/node': 20.14.9
+ '@types/node': 20.16.5
'@types/sinon': 17.0.3
lodash: 4.17.21
mock-stdin: 1.0.0
@@ -3012,7 +3012,7 @@ packages:
nopt: 5.0.0
npmlog: 6.0.2
rimraf: 3.0.2
- semver: 7.6.2
+ semver: 7.6.3
tar: 6.2.1
which: 2.0.2
transitivePeerDependencies:
@@ -3032,7 +3032,7 @@ packages:
nopt: 6.0.0
npmlog: 6.0.2
rimraf: 3.0.2
- semver: 7.6.2
+ semver: 7.6.3
tar: 6.2.1
which: 2.0.2
transitivePeerDependencies:
@@ -3076,7 +3076,7 @@ packages:
dependencies:
hosted-git-info: 4.1.0
is-core-module: 2.14.0
- semver: 7.6.2
+ semver: 7.6.3
validate-npm-package-license: 3.0.4
dev: true
@@ -3086,7 +3086,7 @@ packages:
dependencies:
hosted-git-info: 6.1.1
is-core-module: 2.14.0
- semver: 7.6.2
+ semver: 7.6.3
validate-npm-package-license: 3.0.4
dev: true
@@ -3117,14 +3117,14 @@ packages:
resolution: {integrity: sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==}
engines: {node: '>=10'}
dependencies:
- semver: 7.6.2
+ semver: 7.6.3
dev: true
/npm-install-checks@6.3.0:
resolution: {integrity: sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
dependencies:
- semver: 7.6.2
+ semver: 7.6.3
dev: true
/npm-normalize-package-bin@1.0.1:
@@ -3147,7 +3147,7 @@ packages:
dependencies:
hosted-git-info: 6.1.1
proc-log: 3.0.0
- semver: 7.6.2
+ semver: 7.6.3
validate-npm-package-name: 5.0.1
dev: true
@@ -3156,7 +3156,7 @@ packages:
engines: {node: '>=10'}
dependencies:
hosted-git-info: 4.1.0
- semver: 7.6.2
+ semver: 7.6.3
validate-npm-package-name: 3.0.0
dev: true
@@ -3183,7 +3183,7 @@ packages:
npm-install-checks: 4.0.0
npm-normalize-package-bin: 1.0.1
npm-package-arg: 8.1.5
- semver: 7.6.2
+ semver: 7.6.3
dev: true
/npm-pick-manifest@8.0.2:
@@ -3193,7 +3193,7 @@ packages:
npm-install-checks: 6.3.0
npm-normalize-package-bin: 3.0.1
npm-package-arg: 10.1.0
- semver: 7.6.2
+ semver: 7.6.3
dev: true
/npm-registry-fetch@12.0.2:
@@ -3266,14 +3266,14 @@ packages:
resolution: {integrity: sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==}
engines: {node: '>= 10'}
- /oclif@3.4.6(@types/node@20.14.9)(typescript@5.1.3):
+ /oclif@3.4.6(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-YyGMDil2JpfC9OcB76Gtcd5LqwwOeAgb8S7mVHf/6Qecjqor8QbbvcSwZvB1e1TqjlD1JUhDPqBiFeVe/WOdWg==}
engines: {node: '>=12.0.0'}
dependencies:
'@oclif/core': 1.26.2
- '@oclif/plugin-help': 5.2.20(@types/node@20.14.9)(typescript@5.1.3)
- '@oclif/plugin-not-found': 2.4.3(@types/node@20.14.9)(typescript@5.1.3)
- '@oclif/plugin-warn-if-update-available': 2.0.37(@types/node@20.14.9)(typescript@5.1.3)
+ '@oclif/plugin-help': 5.2.20(@types/node@20.16.5)(typescript@5.1.3)
+ '@oclif/plugin-not-found': 2.4.3(@types/node@20.16.5)(typescript@5.1.3)
+ '@oclif/plugin-warn-if-update-available': 2.0.37(@types/node@20.16.5)(typescript@5.1.3)
aws-sdk: 2.1648.0
concurrently: 7.6.0
debug: 4.3.5(supports-color@8.1.1)
@@ -3283,7 +3283,7 @@ packages:
got: 11.8.6
lodash: 4.17.21
normalize-package-data: 3.0.3
- semver: 7.6.2
+ semver: 7.6.3
tslib: 2.6.2
yeoman-environment: 3.19.3
yeoman-generator: 5.10.0(yeoman-environment@3.19.3)
@@ -3885,10 +3885,12 @@ packages:
/semver@5.7.1:
resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==}
+ hasBin: true
- /semver@7.6.2:
- resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==}
+ /semver@7.6.3:
+ resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}
engines: {node: '>=10'}
+ hasBin: true
/set-blocking@2.0.0:
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
@@ -4299,8 +4301,9 @@ packages:
resolution: {integrity: sha512-whw60l7r+8ZU8Tu/Uc2yxtc4ZTZbR/PF3u1IPNKGQ6p8EICLb3Z2lAgoqw9bqYd8IkgnsaOcLzYHFckjqNsf0g==}
dev: true
- /ts-node@10.9.2(@types/node@20.14.9)(typescript@5.1.3):
+ /ts-node@10.9.2(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
+ hasBin: true
peerDependencies:
'@swc/core': '>=1.2.50'
'@swc/wasm': '>=1.2.50'
@@ -4317,7 +4320,7 @@ packages:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.3
- '@types/node': 20.14.9
+ '@types/node': 20.16.5
acorn: 8.8.2
acorn-walk: 8.2.0
arg: 4.1.3
@@ -4380,8 +4383,8 @@ packages:
resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==}
engines: {node: '>=14.17'}
- /undici-types@5.26.5:
- resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
+ /undici-types@6.19.8:
+ resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
/unique-filename@1.1.1:
resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==}
@@ -4726,7 +4729,7 @@ packages:
preferred-pm: 3.1.3
pretty-bytes: 5.6.0
readable-stream: 4.5.2
- semver: 7.6.2
+ semver: 7.6.3
slash: 3.0.0
strip-ansi: 6.0.1
text-table: 0.2.0
@@ -4757,7 +4760,7 @@ packages:
pacote: 15.2.0
read-pkg-up: 7.0.1
run-async: 2.4.1
- semver: 7.6.2
+ semver: 7.6.3
shelljs: 0.8.5
sort-keys: 4.2.0
text-table: 0.2.0
diff --git a/kipper/cli/src/index.ts b/kipper/cli/src/index.ts
index 7088c6b71..ffe9d5a1b 100644
--- a/kipper/cli/src/index.ts
+++ b/kipper/cli/src/index.ts
@@ -13,7 +13,7 @@ export * from "./output/compile";
// eslint-disable-next-line no-unused-vars
export const name = "@kipper/cli";
// eslint-disable-next-line no-unused-vars
-export const version = "0.12.0-alpha.1";
+export const version = "0.12.0";
// eslint-disable-next-line no-unused-vars
export const author = "Luna Klatzer";
// eslint-disable-next-line no-unused-vars
diff --git a/kipper/cli/src/prompt-module.ts b/kipper/cli/src/prompt-module.ts
index 25f42f28d..bac5c27c3 100644
--- a/kipper/cli/src/prompt-module.ts
+++ b/kipper/cli/src/prompt-module.ts
@@ -1,6 +1,6 @@
import type { PromptModule as InquirerPromptModule } from "inquirer";
-import chalk from "chalk";
import inquirer from "inquirer";
+import chalk from "chalk";
/**
* A wrapper around the inquirer prompt module to make it easier to use.
diff --git a/kipper/config/package.json b/kipper/config/package.json
index 3d28486cc..f9dc4f863 100644
--- a/kipper/config/package.json
+++ b/kipper/config/package.json
@@ -1,18 +1,18 @@
{
"name": "@kipper/config",
"description": "The config file support package adding support for kip-config.json/kipper-config.json 🦊",
- "version": "0.12.0-alpha.1",
+ "version": "0.12.0",
"author": "Luna-Klatzer @Luna-Klatzer",
"dependencies": {
"is-plain-object": "5.0.0",
"deepmerge": "4.3.1",
- "semver": "7.6.0",
+ "semver": "7.6.3",
"tslib": "~2.6.2",
"@kipper/target-ts": "workspace:~",
"@kipper/target-js": "workspace:~"
},
"devDependencies": {
- "@types/semver": "7.5.7",
+ "@types/semver": "7.5.8",
"@kipper/core": "workspace:~",
"typescript": "5.1.3"
},
diff --git a/kipper/config/pnpm-lock.yaml b/kipper/config/pnpm-lock.yaml
index ed0bd85f9..0fbed651d 100644
--- a/kipper/config/pnpm-lock.yaml
+++ b/kipper/config/pnpm-lock.yaml
@@ -18,8 +18,8 @@ dependencies:
specifier: 5.0.0
version: 5.0.0
semver:
- specifier: 7.6.0
- version: 7.6.0
+ specifier: 7.6.3
+ version: 7.6.3
tslib:
specifier: ~2.6.2
version: 2.6.2
@@ -29,16 +29,16 @@ devDependencies:
specifier: workspace:~
version: link:../core
'@types/semver':
- specifier: 7.5.7
- version: 7.5.7
+ specifier: 7.5.8
+ version: 7.5.8
typescript:
specifier: 5.1.3
version: 5.1.3
packages:
- /@types/semver@7.5.7:
- resolution: {integrity: sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==}
+ /@types/semver@7.5.8:
+ resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==}
dev: true
/deepmerge@4.3.1:
@@ -51,18 +51,10 @@ packages:
engines: {node: '>=0.10.0'}
dev: false
- /lru-cache@6.0.0:
- resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
+ /semver@7.6.3:
+ resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}
engines: {node: '>=10'}
- dependencies:
- yallist: 4.0.0
- dev: false
-
- /semver@7.6.0:
- resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
- engines: {node: '>=10'}
- dependencies:
- lru-cache: 6.0.0
+ hasBin: true
dev: false
/tslib@2.6.2:
@@ -73,7 +65,3 @@ packages:
resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==}
engines: {node: '>=14.17'}
dev: true
-
- /yallist@4.0.0:
- resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
- dev: false
diff --git a/kipper/config/src/evaluated-kipper-config-file.ts b/kipper/config/src/evaluated-kipper-config-file.ts
index 532ecf6c1..1ed2ea742 100644
--- a/kipper/config/src/evaluated-kipper-config-file.ts
+++ b/kipper/config/src/evaluated-kipper-config-file.ts
@@ -1,5 +1,4 @@
-import type { EvaluatedConfigValue } from "./abstract";
-import type { EvaluatedConfigFile } from "./abstract";
+import type { EvaluatedConfigFile, EvaluatedConfigValue } from "./abstract";
import type * as semver from "semver";
import type { CompileConfig, KipperCompileTarget } from "@kipper/core";
diff --git a/kipper/config/src/index.ts b/kipper/config/src/index.ts
index 402415fa1..db2348bdc 100644
--- a/kipper/config/src/index.ts
+++ b/kipper/config/src/index.ts
@@ -12,7 +12,7 @@ export * from "./evaluated-kipper-config-file";
// eslint-disable-next-line no-unused-vars
export const name = "@kipper/config";
// eslint-disable-next-line no-unused-vars
-export const version = "0.12.0-alpha.1";
+export const version = "0.12.0";
// eslint-disable-next-line no-unused-vars
export const author = "Luna Klatzer";
// eslint-disable-next-line no-unused-vars
diff --git a/kipper/config/src/tools.ts b/kipper/config/src/tools.ts
index 38af3dbbd..aba714cab 100644
--- a/kipper/config/src/tools.ts
+++ b/kipper/config/src/tools.ts
@@ -1,5 +1,5 @@
import type { ConfigErrorMetaData } from "./errors";
-import { RefNotFoundError, RefInvalidPathError, FileNotFoundError, InvalidPathError } from "./errors";
+import { FileNotFoundError, InvalidPathError, RefInvalidPathError, RefNotFoundError } from "./errors";
import * as fs from "node:fs/promises";
/**
diff --git a/kipper/core/KipperLexer.g4 b/kipper/core/KipperLexer.g4
index f8ab1c9af..c5ad57ef0 100644
--- a/kipper/core/KipperLexer.g4
+++ b/kipper/core/KipperLexer.g4
@@ -36,6 +36,8 @@ Pragma
-> channel(PRAGMA)
;
+InstanceOf : 'instanceof';
+
// const / var
Const : 'const';
Var : 'var';
@@ -81,11 +83,15 @@ RetIndicator : '->';
Class : 'class';
Interface : 'interface';
Constructor : 'constructor';
+New : 'new';
// boolean constants
True : 'true';
False : 'false';
+// matches operator
+Matches : 'matches';
+
// typeof operator
Typeof : 'typeof';
diff --git a/kipper/core/KipperLexer.tokens b/kipper/core/KipperLexer.tokens
deleted file mode 100644
index 5aaa0a78a..000000000
--- a/kipper/core/KipperLexer.tokens
+++ /dev/null
@@ -1,162 +0,0 @@
-FStringExpStart=1
-BlockComment=2
-LineComment=3
-Pragma=4
-Const=5
-Var=6
-As=7
-Spread=8
-Switch=9
-Case=10
-Default=11
-Break=12
-Continue=13
-Do=14
-While=15
-If=16
-Else=17
-For=18
-Enum=19
-DefFunc=20
-Return=21
-CallFunc=22
-RetIndicator=23
-Class=24
-Interface=25
-Constructor=26
-True=27
-False=28
-Typeof=29
-Try=30
-Catch=31
-Finally=32
-Void=33
-Null=34
-Undefined=35
-Comma=36
-SemiColon=37
-QuestionMark=38
-Colon=39
-LeftParen=40
-RightParen=41
-LeftBracket=42
-RightBracket=43
-FStringExpEnd=44
-LeftBrace=45
-RightBrace=46
-Plus=47
-PlusPlus=48
-Minus=49
-MinusMinus=50
-Star=51
-Div=52
-Mod=53
-PowerTo=54
-AndAnd=55
-OrOr=56
-Not=57
-Assign=58
-PlusAssign=59
-MinusAssign=60
-StarAssign=61
-DivAssign=62
-ModAssign=63
-Equal=64
-NotEqual=65
-Less=66
-LessEqual=67
-Greater=68
-GreaterEqual=69
-BitwiseAnd=70
-BitwiseOr=71
-BitwiseXor=72
-BitwiseNot=73
-BitwiseZeroFillLeftShift=74
-BitwiseSignedRightShift=75
-BitwiseZeroFillRightShift=76
-Dot=77
-Identifier=78
-IntegerConstant=79
-SingleQuoteStringLiteral=80
-DoubleQuoteStringLiteral=81
-FloatingConstant=82
-Whitespace=83
-Newline=84
-FStringSingleQuoteStart=85
-FStringDoubleQuoteStart=86
-FStringSingleQuoteEnd=87
-FStringSingleQuoteAtom=88
-FStringDoubleQuoteEnd=89
-FStringDoubleQuoteAtom=90
-'const'=5
-'var'=6
-'as'=7
-'...'=8
-'switch'=9
-'case'=10
-'default'=11
-'break'=12
-'continue'=13
-'do'=14
-'while'=15
-'if'=16
-'else'=17
-'for'=18
-'enum'=19
-'def'=20
-'return'=21
-'call'=22
-'->'=23
-'class'=24
-'interface'=25
-'constructor'=26
-'true'=27
-'false'=28
-'typeof'=29
-'try'=30
-'catch'=31
-'finally'=32
-'void'=33
-'null'=34
-'undefined'=35
-','=36
-';'=37
-'?'=38
-':'=39
-'('=40
-')'=41
-'['=42
-']'=43
-'{'=45
-'}'=46
-'+'=47
-'++'=48
-'-'=49
-'--'=50
-'*'=51
-'/'=52
-'%'=53
-'**'=54
-'&&'=55
-'||'=56
-'!'=57
-'='=58
-'+='=59
-'-='=60
-'*='=61
-'/='=62
-'%='=63
-'=='=64
-'!='=65
-'<'=66
-'<='=67
-'>'=68
-'>='=69
-'&'=70
-'|'=71
-'^'=72
-'~'=73
-'<<'=74
-'>>'=75
-'>>>'=76
-'.'=77
diff --git a/kipper/core/KipperParser.g4 b/kipper/core/KipperParser.g4
index bc4c590f3..8c17d6cad 100644
--- a/kipper/core/KipperParser.g4
+++ b/kipper/core/KipperParser.g4
@@ -137,7 +137,8 @@ statement
;
compoundStatement
- : {this.notInsideExpressionStatement()}? '{' blockItemList? '}'
+ : {this.notInsideExpressionStatement()}? '{' blockItemList? '}'
+ | {this.insideLambda()}? '{' {this.exitLambda()} blockItemList? {this.enterLambda()} '}'
;
expressionStatement
@@ -224,7 +225,7 @@ primaryExpression // Primary expressions, which build up the rest of the more co
;
lambdaPrimaryExpression
- : '(' parameterList? ')' ':' typeSpecifierExpression '->' (expression | compoundStatement)
+ : {this.enterLambda()} '(' parameterList? ')' ':' typeSpecifierExpression '->' (expression | compoundStatement) {this.exitLambda()}
;
tangledPrimaryExpression
@@ -300,11 +301,12 @@ voidOrNullOrUndefinedPrimaryExpression
computedPrimaryExpression
locals[_labelASTKind: ASTKind | undefined]
: primaryExpression # passOncomputedPrimaryExpression
- | computedPrimaryExpression '(' argumentExpressionList? ')' { _localctx._labelASTKind = ParseRuleKindMapping.RULE_functionCallExpression } # functionCallExpression
- | 'call' computedPrimaryExpression '(' argumentExpressionList? ')' { _localctx._labelASTKind = ParseRuleKindMapping.RULE_functionCallExpression } # explicitCallFunctionCallExpression
| computedPrimaryExpression dotNotation { _localctx._labelASTKind = ParseRuleKindMapping.RULE_memberAccessExpression } # dotNotationMemberAccessExpression
| computedPrimaryExpression bracketNotation { _localctx._labelASTKind = ParseRuleKindMapping.RULE_memberAccessExpression } # bracketNotationMemberAccessExpression
| computedPrimaryExpression sliceNotation { _localctx._labelASTKind = ParseRuleKindMapping.RULE_memberAccessExpression } # sliceNotationMemberAccessExpression
+ | computedPrimaryExpression '(' argumentExpressionList? ')' { _localctx._labelASTKind = ParseRuleKindMapping.RULE_functionCallExpression } # functionCallExpression
+ | 'call' computedPrimaryExpression '(' argumentExpressionList? ')' { _localctx._labelASTKind = ParseRuleKindMapping.RULE_functionCallExpression } # explicitCallFunctionCallExpression
+ | 'new' typeSpecifierExpression '(' argumentExpressionList? ')' { _localctx._labelASTKind = ParseRuleKindMapping.RULE_newInstantiationExpression } # newInstantiationExpression
;
argumentExpressionList
@@ -335,7 +337,7 @@ incrementOrDecrementPostfixExpression
;
typeofExpression
- : 'typeof' ( '(' assignmentExpression ')' | assignmentExpression )
+ : 'typeof' assignmentExpression
;
unaryExpression
@@ -384,9 +386,19 @@ bitwiseShiftOperators
: '<<' | '>>' | '>>>'
;
+instanceOfExpression
+ : bitwiseShiftExpression #passOnInstanceOfExpression
+ | instanceOfExpression 'instanceof' typeSpecifierExpression #actualInstanceOfExpression
+ ;
+
+matchesExpression
+ : instanceOfExpression # passOnMatchesExpression
+ | matchesExpression 'matches' typeSpecifierExpression # actualMatchesExpression
+ ;
+
relationalExpression
- : bitwiseShiftExpression # passOnRelationalExpression
- | relationalExpression ('<'|'>'|'<='|'>=') bitwiseShiftExpression # actualRelationalExpression
+ : matchesExpression # passOnRelationalExpression
+ | relationalExpression ('<'|'>'|'<='|'>=') relationalExpression # actualRelationalExpression
;
equalityExpression
@@ -438,7 +450,9 @@ expression
;
typeSpecifierExpression
- : identifierTypeSpecifierExpression | genericTypeSpecifierExpression | typeofTypeSpecifierExpression
+ : identifierTypeSpecifierExpression
+ | genericTypeSpecifierExpression
+ | typeofTypeSpecifierExpression
;
identifierTypeSpecifierExpression
diff --git a/kipper/core/KipperParser.tokens b/kipper/core/KipperParser.tokens
deleted file mode 100644
index 5aaa0a78a..000000000
--- a/kipper/core/KipperParser.tokens
+++ /dev/null
@@ -1,162 +0,0 @@
-FStringExpStart=1
-BlockComment=2
-LineComment=3
-Pragma=4
-Const=5
-Var=6
-As=7
-Spread=8
-Switch=9
-Case=10
-Default=11
-Break=12
-Continue=13
-Do=14
-While=15
-If=16
-Else=17
-For=18
-Enum=19
-DefFunc=20
-Return=21
-CallFunc=22
-RetIndicator=23
-Class=24
-Interface=25
-Constructor=26
-True=27
-False=28
-Typeof=29
-Try=30
-Catch=31
-Finally=32
-Void=33
-Null=34
-Undefined=35
-Comma=36
-SemiColon=37
-QuestionMark=38
-Colon=39
-LeftParen=40
-RightParen=41
-LeftBracket=42
-RightBracket=43
-FStringExpEnd=44
-LeftBrace=45
-RightBrace=46
-Plus=47
-PlusPlus=48
-Minus=49
-MinusMinus=50
-Star=51
-Div=52
-Mod=53
-PowerTo=54
-AndAnd=55
-OrOr=56
-Not=57
-Assign=58
-PlusAssign=59
-MinusAssign=60
-StarAssign=61
-DivAssign=62
-ModAssign=63
-Equal=64
-NotEqual=65
-Less=66
-LessEqual=67
-Greater=68
-GreaterEqual=69
-BitwiseAnd=70
-BitwiseOr=71
-BitwiseXor=72
-BitwiseNot=73
-BitwiseZeroFillLeftShift=74
-BitwiseSignedRightShift=75
-BitwiseZeroFillRightShift=76
-Dot=77
-Identifier=78
-IntegerConstant=79
-SingleQuoteStringLiteral=80
-DoubleQuoteStringLiteral=81
-FloatingConstant=82
-Whitespace=83
-Newline=84
-FStringSingleQuoteStart=85
-FStringDoubleQuoteStart=86
-FStringSingleQuoteEnd=87
-FStringSingleQuoteAtom=88
-FStringDoubleQuoteEnd=89
-FStringDoubleQuoteAtom=90
-'const'=5
-'var'=6
-'as'=7
-'...'=8
-'switch'=9
-'case'=10
-'default'=11
-'break'=12
-'continue'=13
-'do'=14
-'while'=15
-'if'=16
-'else'=17
-'for'=18
-'enum'=19
-'def'=20
-'return'=21
-'call'=22
-'->'=23
-'class'=24
-'interface'=25
-'constructor'=26
-'true'=27
-'false'=28
-'typeof'=29
-'try'=30
-'catch'=31
-'finally'=32
-'void'=33
-'null'=34
-'undefined'=35
-','=36
-';'=37
-'?'=38
-':'=39
-'('=40
-')'=41
-'['=42
-']'=43
-'{'=45
-'}'=46
-'+'=47
-'++'=48
-'-'=49
-'--'=50
-'*'=51
-'/'=52
-'%'=53
-'**'=54
-'&&'=55
-'||'=56
-'!'=57
-'='=58
-'+='=59
-'-='=60
-'*='=61
-'/='=62
-'%='=63
-'=='=64
-'!='=65
-'<'=66
-'<='=67
-'>'=68
-'>='=69
-'&'=70
-'|'=71
-'^'=72
-'~'=73
-'<<'=74
-'>>'=75
-'>>>'=76
-'.'=77
diff --git a/kipper/core/package.json b/kipper/core/package.json
index 568ebed9c..1218da21c 100644
--- a/kipper/core/package.json
+++ b/kipper/core/package.json
@@ -1,14 +1,14 @@
{
"name": "@kipper/core",
"description": "The core implementation of the Kipper compiler 🦊",
- "version": "0.12.0-alpha.1",
+ "version": "0.12.0",
"author": "Luna-Klatzer @Luna-Klatzer",
"dependencies": {
"antlr4ts": "^0.5.0-alpha.4",
"tslib": "~2.6.2"
},
"devDependencies": {
- "@types/node": "20.14.9",
+ "@types/node": "20.16.5",
"typescript": "5.1.3",
"prettier": "3.3.3",
"size-limit": "11.1.4",
diff --git a/kipper/core/pnpm-lock.yaml b/kipper/core/pnpm-lock.yaml
index 5b76e2ef3..c57637acc 100644
--- a/kipper/core/pnpm-lock.yaml
+++ b/kipper/core/pnpm-lock.yaml
@@ -14,8 +14,8 @@ dependencies:
devDependencies:
'@types/node':
- specifier: 20.14.9
- version: 20.14.9
+ specifier: 20.16.5
+ version: 20.16.5
antlr4ts-cli:
specifier: ^0.5.0-alpha.4
version: 0.5.0-alpha.4
@@ -57,10 +57,10 @@ packages:
engines: {node: '>=18'}
dev: true
- /@types/node@20.14.9:
- resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==}
+ /@types/node@20.16.5:
+ resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==}
dependencies:
- undici-types: 5.26.5
+ undici-types: 6.19.8
dev: true
/antlr4ts-cli@0.5.0-alpha.4:
@@ -299,8 +299,8 @@ packages:
engines: {node: '>=14.17'}
dev: true
- /undici-types@5.26.5:
- resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
+ /undici-types@6.19.8:
+ resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
dev: true
/unicorn-magic@0.1.0:
diff --git a/kipper/core/src/compiler/ast/analysable-ast-node.ts b/kipper/core/src/compiler/ast/analysable-ast-node.ts
index af25342f8..fac01476b 100644
--- a/kipper/core/src/compiler/ast/analysable-ast-node.ts
+++ b/kipper/core/src/compiler/ast/analysable-ast-node.ts
@@ -228,6 +228,39 @@ export abstract class AnalysableASTNode<
}
}
+ /**
+ * Performs preliminary type checking on this AST node and all {@link this.children children nodes}. This uses the
+ * {@link this.semanticData semantic data} that was evaluated during {@link this.semanticAnalysis semantic analysis}.
+ *
+ * This preliminarily sets the {@link this.typeSemantics type semantics} of this node and allows the use of
+ * {@link this.getTypeSemanticData} in any child that may need the data, without getting any error.
+ *
+ * This is a special step in the type checking process, where the type semantics are evaluated before the actual type
+ * checking is done. This is useful for cases where children need parent data to be already evaluated, like for
+ * example inside a class when the class type is needed for checking the "this" keyword.
+ *
+ * We will call this "Ahead of time" type evaluation, as it is done before the actual proper type checking of the
+ * node, preceding any other type checking in the entire tree.
+ * @since 0.12.0
+ */
+ public async preliminaryTypeChecking(): Promise {
+ // Start with the evaluation of the children
+ await this.preliminaryTypeCheckingChildren();
+
+ // If the semantic analysis until now has evaluated data, do the target semantic analysis of this node (if defined)
+ // Per default, we will say the nodes themselves handle all errors, so we don't need to do anything here
+ if (this.semanticData && this.primaryPreliminaryTypeChecking !== undefined) {
+ try {
+ await this.primaryPreliminaryTypeChecking();
+ } catch (e) {
+ if (e instanceof MissingRequiredSemanticDataError) {
+ this._skippedSemanticTypeChecking = true;
+ }
+ throw e; // Pass on the error to the parent
+ }
+ }
+ }
+
/**
* Performs type checking on this AST node and all {@link this.children children nodes}. This uses the
* {@link this.semanticData semantic data} that was evaluated during {@link this.semanticAnalysis semantic analysis}.
@@ -242,12 +275,16 @@ export abstract class AnalysableASTNode<
// Note! Expressions do this differently and abort immediately all processing if one of the children failed.
// Additionally, this will also not check for 'this.hasFailed', as we still want to run type checking if possible
// even with a logic error in the code (so we only check for the semantic data)
- if (this.semanticData && this.primarySemanticTypeChecking !== undefined) {
+ if (
+ this.semanticData &&
+ this.primarySemanticTypeChecking !== undefined &&
+ (!this.primaryPreliminaryTypeChecking || this.typeSemantics !== undefined)
+ ) {
try {
await this.primarySemanticTypeChecking();
} catch (e) {
if (e instanceof MissingRequiredSemanticDataError) {
- this._skippedSemanticAnalysis = true;
+ this._skippedSemanticTypeChecking = true;
}
throw e; // Pass on the error to the parent
}
@@ -322,6 +359,21 @@ export abstract class AnalysableASTNode<
}
}
+ /**
+ * Runs {@link preliminaryTypeChecking} of all children nodes.
+ * @since 0.12.0
+ * @protected
+ */
+ protected async preliminaryTypeCheckingChildren(): Promise {
+ for (const child of this.children) {
+ try {
+ await child.preliminaryTypeChecking();
+ } catch (e) {
+ this.handleSemanticError(e);
+ }
+ }
+ }
+
/**
* Runs {@link semanticTypeChecking} of all children nodes.
* @since 0.10.0
@@ -362,6 +414,17 @@ export abstract class AnalysableASTNode<
*/
protected abstract primarySemanticAnalysis?(): Promise;
+ /**
+ * Preliminary type checks the code inside this AST node.
+ *
+ * This is a special step in the type checking process, where the type semantics are evaluated before the actual type
+ * checking is done. This is useful for cases where children need parent data to be already evaluated, like for
+ * example inside a class when the class type is needed for checking the "this" keyword.
+ * @protected
+ * @since 0.12.0
+ */
+ protected primaryPreliminaryTypeChecking?(): Promise;
+
/**
* Type checks the code inside this AST node.
*
diff --git a/kipper/core/src/compiler/ast/ast-generator.ts b/kipper/core/src/compiler/ast/ast-generator.ts
index d92747a0c..c66174b85 100644
--- a/kipper/core/src/compiler/ast/ast-generator.ts
+++ b/kipper/core/src/compiler/ast/ast-generator.ts
@@ -29,7 +29,10 @@ import type {
ArrayPrimaryExpressionContext,
BoolPrimaryExpressionContext,
BracketNotationMemberAccessExpressionContext,
+ ClassConstructorDeclarationContext,
ClassDeclarationContext,
+ ClassMethodDeclarationContext,
+ ClassPropertyDeclarationContext,
CompilationUnitContext,
CompoundStatementContext,
DeclarationContext,
@@ -53,6 +56,7 @@ import type {
IncrementOrDecrementUnaryExpressionContext,
InitDeclaratorContext,
InitializerContext,
+ InstanceOfExpressionContext,
InterfaceDeclarationContext,
InterfaceMethodDeclarationContext,
InterfacePropertyDeclarationContext,
@@ -61,6 +65,8 @@ import type {
KipperParserRuleContext,
LambdaPrimaryExpressionContext,
LogicalAndExpressionContext,
+ MatchesExpressionContext,
+ NewInstantiationExpressionContext,
NumberPrimaryExpressionContext,
ObjectPrimaryExpressionContext,
ObjectPropertyContext,
@@ -75,16 +81,13 @@ import type {
SwitchLabeledStatementContext,
SwitchStatementContext,
TangledPrimaryExpressionContext,
+ TryCatchStatementContext,
+ TypeofExpressionContext,
TypeofTypeSpecifierExpressionContext,
TypeSpecifierExpressionContext,
VariableDeclarationContext,
VoidOrNullOrUndefinedPrimaryExpressionContext,
WhileLoopIterationStatementContext,
- ClassPropertyDeclarationContext,
- ClassMethodDeclarationContext,
- ClassConstructorDeclarationContext,
- TypeofExpressionContext,
- TryCatchStatementContext,
} from "../lexer-parser";
import type { KipperProgramContext } from "../program-ctx";
import type { CompilableASTNode } from "./compilable-ast-node";
@@ -612,6 +615,16 @@ export class KipperFileASTGenerator implements KipperParserListener, ParseTreeLi
*/
public exitActualAdditiveExpression: (ctx: ActualAdditiveExpressionContext) => void = this.handleExitingTreeNode;
+ /**
+ * Enter a parse tree produced by `KipperParser.instanceOfExpression`.
+ */
+ public enterActualInstanceOfExpression: (ctx: InstanceOfExpressionContext) => void = this.handleEnteringTreeNode;
+
+ /**
+ * Exit a parse tree produced by `KipperParser.instanceOfExpression`.
+ */
+ public exitActualInstanceOfExpression: (ctx: InstanceOfExpressionContext) => void = this.handleExitingTreeNode;
+
// NOTE:
// We are ignoring the 'relationalExpression' rule, and only going to handle the rule
// 'actualRelationalExpression', which implements a more precise 'relationalExpression' rule.
@@ -782,6 +795,16 @@ export class KipperFileASTGenerator implements KipperParserListener, ParseTreeLi
*/
public exitTypeofExpression: (ctx: TypeofExpressionContext) => void = this.handleExitingTreeNode;
+ /**
+ * Enter a parse tree produced by the KipperParser.matchesExpression
+ */
+ public enterActualMatchesExpression: (ctx: MatchesExpressionContext) => void = this.handleEnteringTreeNode;
+
+ /**
+ * Exit a parse tree produced by the KipperParser.matchesExpression
+ */
+ public exitActualMatchesExpression: (ctx: MatchesExpressionContext) => void = this.handleExitingTreeNode;
+
// NOTE:
// We are ignoring the 'conditionalExpression' rule, and only going to handle the rule
// 'actualConditionalExpression', which implements a more precise 'conditionalExpression' rule.
@@ -1117,6 +1140,17 @@ export class KipperFileASTGenerator implements KipperParserListener, ParseTreeLi
*/
public exitClassDeclaration: (ctx: ClassDeclarationContext) => void = this.handleExitingTreeNode;
+ /**
+ * Enter a parse tree produced by `KipperParser.newInstantiationExpression`.
+ */
+ public enterNewInstantiationExpression: (ctx: NewInstantiationExpressionContext) => void =
+ this.handleEnteringTreeNode;
+
+ /**
+ * Exit a parse tree produced by `KipperParser.newInstantiationExpression`.
+ */
+ public exitNewInstantiationExpression: (ctx: NewInstantiationExpressionContext) => void = this.handleExitingTreeNode;
+
/**
* Enter a parse tree produced by `KipperParser.classProperty`.
*/
diff --git a/kipper/core/src/compiler/ast/common/ast-types.ts b/kipper/core/src/compiler/ast/common/ast-types.ts
index fb10217c9..b5ad8ad83 100644
--- a/kipper/core/src/compiler/ast/common/ast-types.ts
+++ b/kipper/core/src/compiler/ast/common/ast-types.ts
@@ -33,6 +33,7 @@ import type {
IfStatementContext,
IncrementOrDecrementPostfixExpressionContext,
IncrementOrDecrementUnaryExpressionContext,
+ InstanceOfExpressionContext,
InterfaceDeclarationContext,
InterfaceMethodDeclarationContext,
InterfacePropertyDeclarationContext,
@@ -40,7 +41,9 @@ import type {
KindParseRuleMapping,
LogicalAndExpressionContext,
LogicalOrExpressionContext,
+ MatchesExpressionContext,
MultiplicativeExpressionContext,
+ NewInstantiationExpressionContext,
NumberPrimaryExpressionContext,
OperatorModifiedUnaryExpressionContext,
ParameterDeclarationContext,
@@ -56,7 +59,6 @@ import type {
VoidOrNullOrUndefinedPrimaryExpressionContext,
WhileLoopIterationStatementContext,
} from "../../lexer-parser";
-import { TryCatchStatement } from "../nodes";
/**
* Union type of all usable expression rule context classes implemented by the {@link ParseRuleKindMapping} for an
@@ -92,7 +94,10 @@ export type ParserExpressionContext =
| BitwiseOrExpressionContext
| BitwiseAndExpressionContext
| BitwiseXorExpressionContext
- | BitwiseShiftExpressionContext;
+ | NewInstantiationExpressionContext
+ | BitwiseShiftExpressionContext
+ | MatchesExpressionContext
+ | InstanceOfExpressionContext;
/**
* Union type of all usable statement rule context classes implemented by the {@link ParseRuleKindMapping} for a
@@ -209,7 +214,10 @@ export type ASTExpressionKind =
| typeof ParseRuleKindMapping.RULE_bitwiseShiftExpression
| typeof ParseRuleKindMapping.RULE_lambdaPrimaryExpression
| typeof ParseRuleKindMapping.RULE_memberAccessExpression
- | typeof ParseRuleKindMapping.RULE_typeofExpression;
+ | typeof ParseRuleKindMapping.RULE_typeofExpression
+ | typeof ParseRuleKindMapping.RULE_newInstantiationExpression
+ | typeof ParseRuleKindMapping.RULE_matchesExpression
+ | typeof ParseRuleKindMapping.RULE_instanceofExpression;
/**
* Union type of all possible {@link ParserASTNode.kind} values that have a constructable {@link CompilableASTNode}.
@@ -292,7 +300,10 @@ export type ASTExpressionRuleName =
| (typeof KindParseRuleMapping)[typeof ParseRuleKindMapping.RULE_bitwiseShiftExpression]
| (typeof KindParseRuleMapping)[typeof ParseRuleKindMapping.RULE_lambdaPrimaryExpression]
| (typeof KindParseRuleMapping)[typeof ParseRuleKindMapping.RULE_memberAccessExpression]
- | (typeof KindParseRuleMapping)[typeof ParseRuleKindMapping.RULE_typeofExpression];
+ | (typeof KindParseRuleMapping)[typeof ParseRuleKindMapping.RULE_typeofExpression]
+ | (typeof KindParseRuleMapping)[typeof ParseRuleKindMapping.RULE_newInstantiationExpression]
+ | (typeof KindParseRuleMapping)[typeof ParseRuleKindMapping.RULE_matchesExpression]
+ | (typeof KindParseRuleMapping)[typeof ParseRuleKindMapping.RULE_instanceofExpression];
/**
* Union type of all possible {@link ParserASTNode.ruleName} values that have a constructable {@link CompilableASTNode}.
diff --git a/kipper/core/src/compiler/ast/compilable-ast-node.ts b/kipper/core/src/compiler/ast/compilable-ast-node.ts
index 3a73de8e6..e861306d8 100644
--- a/kipper/core/src/compiler/ast/compilable-ast-node.ts
+++ b/kipper/core/src/compiler/ast/compilable-ast-node.ts
@@ -13,7 +13,7 @@ import type { KipperParser, KipperParserRuleContext } from "../lexer-parser";
import type { TypeData } from "./ast-node";
import type { TokenStream } from "antlr4ts/TokenStream";
import type { RootASTNode, SemanticData } from "./index";
-import type { GlobalScope, LocalScope } from "../semantics";
+import type { ClassScope, GlobalScope, LocalScope } from "../semantics";
import type { ScopeNode } from "./scope-node";
import type { TargetCompilableNode } from "./target-node";
import { AnalysableASTNode } from "./analysable-ast-node";
@@ -109,7 +109,7 @@ export abstract class CompilableASTNode<
* The {@link scope} of this AST node.
* @since 0.8.0
*/
- public get scope(): LocalScope | GlobalScope {
+ public get scope(): LocalScope | ClassScope | GlobalScope {
return this.scopeCtx.innerScope;
}
@@ -117,7 +117,7 @@ export abstract class CompilableASTNode<
* The context / AST node of the {@link scope}.
* @since 0.8.0
*/
- public get scopeCtx(): ScopeNode {
+ public get scopeCtx(): ScopeNode {
let parent: CompilableNodeParent = this.parent;
while (parent.parent !== undefined && !("innerScope" in parent)) {
parent = parent.parent;
diff --git a/kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts b/kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts
index 4d87accfa..2baf736f4 100644
--- a/kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts
+++ b/kipper/core/src/compiler/ast/mapping/ast-node-mapper.ts
@@ -35,6 +35,7 @@ import {
IfStatementContext,
IncrementOrDecrementPostfixExpressionContext,
IncrementOrDecrementUnaryExpressionContext,
+ InstanceOfExpressionContext,
InterfaceDeclarationContext,
InterfaceMethodDeclarationContext,
InterfacePropertyDeclarationContext,
@@ -43,6 +44,7 @@ import {
LogicalAndExpressionContext,
LogicalOrExpressionContext,
MultiplicativeExpressionContext,
+ NewInstantiationExpressionContext,
NumberPrimaryExpressionContext,
ObjectPrimaryExpressionContext,
ObjectPropertyContext,
@@ -71,8 +73,6 @@ import type {
ASTStatementRuleName,
} from "../common";
import type { Declaration, Expression, Statement } from "../nodes";
-import { TryCatchStatement } from "../nodes";
-import { TypeofExpression } from "../nodes";
import {
AdditiveExpression,
ArrayPrimaryExpression,
@@ -102,6 +102,7 @@ import {
IfStatement,
IncrementOrDecrementPostfixExpression,
IncrementOrDecrementUnaryExpression,
+ InstanceOfExpression,
InterfaceDeclaration,
InterfaceMethodDeclaration,
InterfacePropertyDeclaration,
@@ -109,8 +110,10 @@ import {
LambdaPrimaryExpression,
LogicalAndExpression,
LogicalOrExpression,
+ MatchesExpression,
MemberAccessExpression,
MultiplicativeExpression,
+ NewInstantiationExpression,
NumberPrimaryExpression,
ObjectPrimaryExpression,
ObjectProperty,
@@ -121,6 +124,8 @@ import {
StringPrimaryExpression,
SwitchStatement,
TangledPrimaryExpression,
+ TryCatchStatement,
+ TypeofExpression,
TypeofTypeSpecifierExpression,
VariableDeclaration,
VoidOrNullOrUndefinedPrimaryExpression,
@@ -185,12 +190,15 @@ export class ASTNodeMapper {
[ParseRuleKindMapping.RULE_genericTypeSpecifierExpression]: GenericTypeSpecifierExpression,
[ParseRuleKindMapping.RULE_typeofTypeSpecifierExpression]: TypeofTypeSpecifierExpression,
[ParseRuleKindMapping.RULE_memberAccessExpression]: MemberAccessExpression,
+ [ParseRuleKindMapping.RULE_newInstantiationExpression]: NewInstantiationExpression,
[ParseRuleKindMapping.RULE_bitwiseOrExpression]: BitwiseOrExpression,
[ParseRuleKindMapping.RULE_bitwiseAndExpression]: BitwiseAndExpression,
[ParseRuleKindMapping.RULE_bitwiseXorExpression]: BitwiseXorExpression,
[ParseRuleKindMapping.RULE_bitwiseShiftExpression]: BitwiseShiftExpression,
[ParseRuleKindMapping.RULE_lambdaPrimaryExpression]: LambdaPrimaryExpression,
[ParseRuleKindMapping.RULE_typeofExpression]: TypeofExpression,
+ [ParseRuleKindMapping.RULE_instanceofExpression]: InstanceOfExpression,
+ [ParseRuleKindMapping.RULE_matchesExpression]: MatchesExpression,
} satisfies Record>;
/**
@@ -267,6 +275,9 @@ export class ASTNodeMapper {
[ParseRuleKindMapping.RULE_bitwiseShiftExpression]: BitwiseShiftExpressionContext,
[ParseRuleKindMapping.RULE_lambdaPrimaryExpression]: LambdaPrimaryExpressionContext,
[ParseRuleKindMapping.RULE_typeofExpression]: TypeofExpressionContext,
+ [ParseRuleKindMapping.RULE_newInstantiationExpression]: NewInstantiationExpressionContext,
+ [ParseRuleKindMapping.RULE_instanceofExpression]: InstanceOfExpressionContext,
+ [ParseRuleKindMapping.RULE_matchesExpression]: MatchesExpression,
[ParseRuleKindMapping.RULE_memberAccessExpression]: [
// Due to the nature of the parser not handling the notations as one rule, it's an array
DotNotationMemberAccessExpressionContext,
@@ -350,6 +361,9 @@ export class ASTNodeMapper {
RULE_bitwiseShiftExpression: BitwiseShiftExpression,
RULE_lambdaPrimaryExpression: LambdaPrimaryExpression,
RULE_typeofExpression: TypeofExpression,
+ RULE_newInstantiationExpression: NewInstantiationExpression,
+ RULE_matchesExpression: MatchesExpression,
+ RULE_instanceofExpression: InstanceOfExpression,
} satisfies Record>;
/**
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration-semantics.ts
index 9c49bc525..1f4aa7fe9 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration-semantics.ts
@@ -2,7 +2,6 @@
* Semantics for AST Node {@link FunctionDeclaration}.
* @since 0.3.0
*/
-import type { RawType } from "../../../../semantics";
import type { CompoundStatement, IdentifierTypeSpecifierExpression, ParameterDeclaration } from "../../../nodes";
import type { DeclarationSemantics } from "../declaration-semantics";
@@ -16,11 +15,6 @@ export interface FunctionDeclarationSemantics extends DeclarationSemantics {
* @since 0.5.0
*/
identifier: string;
- /**
- * The {@link KipperType return type} of the function.
- * @since 0.5.0
- */
- returnType: RawType;
/**
* The type specifier expression for the return type.
* @since 0.10.0
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration-type-semantics.ts
index 1db684fb0..d57566f94 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration-type-semantics.ts
@@ -14,5 +14,5 @@ export interface FunctionDeclarationTypeSemantics extends DeclarationTypeSemanti
* The type of the declaration. This is always some variation of {@link BuiltInTypeFunc i.e. `Func`}.
* @since 0.12.0
*/
- type: BuiltInTypeFunc;
+ valueType: BuiltInTypeFunc;
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration.ts
index a657a4d8b..b8c9ffd56 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/function-declaration/function-declaration.ts
@@ -9,7 +9,7 @@ import type { FunctionDeclarationTypeSemantics } from "./function-declaration-ty
import type { CompilableNodeParent } from "../../../compilable-ast-node";
import type { CompoundStatement, Statement } from "../../statements";
import type { IdentifierTypeSpecifierExpression } from "../../expressions";
-import type { RawType, ScopeFunctionDeclaration } from "../../../../semantics";
+import type { GlobalScope, RawType, ScopeFunctionDeclaration } from "../../../../semantics";
import { BuiltInTypeFunc, FunctionScope } from "../../../../semantics";
import type { FunctionDeclarationContext } from "../../../../lexer-parser";
import {
@@ -123,6 +123,13 @@ export class FunctionDeclaration
return this._innerScope;
}
+ /**
+ * The {@link scope} of this AST node.
+ */
+ public get scope(): GlobalScope {
+ return this.scopeCtx.innerScope;
+ }
+
public getScopeDeclaration(): ScopeFunctionDeclaration {
/* istanbul ignore next: super function already being run/tested */
return super.getScopeDeclaration();
@@ -180,7 +187,6 @@ export class FunctionDeclaration
isDefined: parseTreeChildren.find((val) => val instanceof CompoundStatementContext) !== undefined,
identifier: identifier,
returnTypeSpecifier: retTypeSpecifier,
- returnType: returnType,
params: params,
functionBody: body, // Will always syntactically be a compound statement
};
@@ -190,26 +196,26 @@ export class FunctionDeclaration
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
- * @since 0.7.0
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
+ * @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
const paramTypes = semanticData.params.map((param) => param.getTypeSemanticData().valueType);
const returnType = semanticData.returnTypeSpecifier.getTypeSemanticData().storedType;
this.typeSemantics = {
- type: new BuiltInTypeFunc(paramTypes, returnType),
+ valueType: new BuiltInTypeFunc(paramTypes, returnType),
};
// Ensure that all code paths return a value
this.programCtx.typeCheck(this).validReturnCodePathsInFunctionBody(this);
}
+ public readonly primarySemanticTypeChecking: undefined;
+
/**
* Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
*
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/parameter-declaration/parameter-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/parameter-declaration/parameter-declaration.ts
index a9675c5d9..fe4f7d660 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/parameter-declaration/parameter-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/parameter-declaration/parameter-declaration.ts
@@ -12,6 +12,7 @@ import { Declaration } from "../declaration";
import type { ParameterDeclarationContext } from "../../../../lexer-parser";
import { KindParseRuleMapping, ParseRuleKindMapping } from "../../../../lexer-parser";
import { getParseTreeSource } from "../../../../../tools";
+import { UnableToDetermineSemanticDataError } from "../../../../../errors";
/**
* Function declaration class, which represents the definition of a parameter inside a {@link FunctionDeclaration}.
@@ -124,12 +125,15 @@ export class ParameterDeclaration extends Declaration<
*/
public async primarySemanticAnalysis(): Promise {
const parseTreeChildren = this.getAntlrRuleChildren();
+ if (!parseTreeChildren || !this.children || this.children.length < 1) {
+ throw new UnableToDetermineSemanticDataError();
+ }
- // The type specifier of the parameter
+ const identifier = getParseTreeSource(this.tokenStream, parseTreeChildren[0]);
const typeSpecifier = this.children[0];
this.semanticData = {
- identifier: getParseTreeSource(this.tokenStream, parseTreeChildren[0]),
+ identifier: identifier,
valueTypeSpecifier: typeSpecifier,
valueType: typeSpecifier.getSemanticData().rawType,
func: this.parent,
@@ -145,14 +149,12 @@ export class ParameterDeclaration extends Declaration<
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
- * @since 0.7.0
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
+ * @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
// Get the type that will be returned using the value type specifier
@@ -162,6 +164,8 @@ export class ParameterDeclaration extends Declaration<
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
/**
* Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
*
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-declaration-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-declaration-semantics.ts
index 6bee777c2..8c060504a 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-declaration-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-declaration-semantics.ts
@@ -3,7 +3,7 @@
* @since 0.11.0
*/
import type { TypeDeclarationSemantics } from "../type-declaration-semantics";
-import type { ClassMemberDeclaration, ClassConstructorDeclaration } from "./class-member-declaration";
+import type { ClassConstructorDeclaration, ClassMemberDeclaration } from "./class-member-declaration";
/**
* Semantics for AST Node {@link ClassDeclaration}.
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-declaration.ts
index 0e2150c09..99ca6b66c 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-declaration.ts
@@ -13,7 +13,8 @@ import { KindParseRuleMapping, ParseRuleKindMapping } from "../../../../../lexer
import { UnableToDetermineSemanticDataError } from "../../../../../../errors";
import { ClassScope } from "../../../../../semantics/symbol-table/class-scope";
import { TypeDeclaration } from "../type-declaration";
-import type { ClassMemberDeclaration, ClassConstructorDeclaration } from "./class-member-declaration";
+import type { ClassConstructorDeclaration, ClassMemberDeclaration } from "./class-member-declaration";
+import { ClassScopeThisDeclaration } from "../../../../../semantics/symbol-table/entry/class-scope-this-declaration";
/**
* Represents a class declaration in the Kipper language, which may contain methods and fields.
@@ -24,31 +25,24 @@ export class ClassDeclaration
implements ScopeNode
{
/**
- /**
- * The static kind for this AST Node.
+ * The static kind for this AST Node.
* @since 0.11.0
*/
public static readonly kind = ParseRuleKindMapping.RULE_classDeclaration;
+
/**
* The static rule name for this AST Node.
* @since 0.11.0
*/
public static readonly ruleName = KindParseRuleMapping[this.kind];
- /**
- * Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
- *
- * This will log all warnings using {@link programCtx.logger} and store them in {@link KipperProgramContext.warnings}.
- * @since 0.11.0
- */
- public checkForWarnings = undefined; // TODO!
- readonly targetSemanticAnalysis = this.semanticAnalyser.classDeclaration;
- readonly targetCodeGenerator = this.codeGenerator.classDeclaration;
+
/**
* The private field '_antlrRuleCtx' that actually stores the variable data,
* which is returned inside the {@link this.antlrRuleCtx}.
* @private
*/
protected override readonly _antlrRuleCtx: ClassDeclarationContext;
+
/**
* The private field '_innerScope' that actually stores the variable data,
* which is returned inside the {@link this.innerScope}.
@@ -56,10 +50,18 @@ export class ClassDeclaration
*/
private readonly _innerScope: ClassScope;
+ /**
+ * The 'this' keyword declaration for this class.
+ * @private
+ * @since 0.12.0
+ */
+ private readonly _thisAliasDeclaration: ClassScopeThisDeclaration;
+
constructor(antlrRuleCtx: ClassDeclarationContext, parent: CompilableNodeParent) {
super(antlrRuleCtx, parent);
this._antlrRuleCtx = antlrRuleCtx;
this._innerScope = new ClassScope(this);
+ this._thisAliasDeclaration = new ClassScopeThisDeclaration(this);
}
/**
@@ -82,6 +84,15 @@ export class ClassDeclaration
this._scopeDeclaration = declaration;
}
+ /**
+ * Gets the "this" keyword which is simply a reference to the class declaration itself, like it were referenced
+ * in the class itself.
+ * @since 0.12.0
+ */
+ public get thisAliasDeclaration(): ClassScopeThisDeclaration {
+ return this._thisAliasDeclaration;
+ }
+
/**
* Returns the kind of this AST node. This represents the specific type of the {@link antlrRuleCtx} that this AST
* node wraps.
@@ -154,16 +165,27 @@ export class ClassDeclaration
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
- * @since 0.11.0
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
+ * @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
this.typeSemantics = {
- type: CustomType.fromClassDeclaration(this),
+ valueType: CustomType.fromClassDeclaration(this),
};
}
+
+ public readonly primarySemanticTypeChecking: undefined;
+
+ /**
+ * Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
+ *
+ * This will log all warnings using {@link programCtx.logger} and store them in {@link KipperProgramContext.warnings}.
+ * @since 0.11.0
+ */
+ public checkForWarnings = undefined; // TODO!
+
+ readonly targetSemanticAnalysis = this.semanticAnalyser.classDeclaration;
+ readonly targetCodeGenerator = this.codeGenerator.classDeclaration;
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration-semantics.ts
index 45e05bb9f..dad394131 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration-semantics.ts
@@ -1,13 +1,13 @@
-import type { TypeDeclarationSemantics } from "../../../type-declaration-semantics";
import type { ParameterDeclaration } from "../../../../parameter-declaration";
import type { CompoundStatement } from "../../../../../statements";
import type { KipperConstructorInternalIdentifier } from "../../../../../../../const";
+import type { ClassMemberDeclarationSemantics } from "../class-member-declaration-semantics";
/**
* Semantics for AST Node {@link InterfacePropertyDeclaration}.
* @since 0.12.0
*/
-export interface ClassConstructorDeclarationSemantics extends TypeDeclarationSemantics {
+export interface ClassConstructorDeclarationSemantics extends ClassMemberDeclarationSemantics {
/**
* The identifier of the type declaration.
*
@@ -19,8 +19,7 @@ export interface ClassConstructorDeclarationSemantics extends TypeDeclarationSem
* The return type of this method.
* @since 0.12.0
*/
- parameters: Array;
-
+ params: Array;
/**
* The body of the function.
* @since 0.10.0
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration-type-semantics.ts
index d4cb6c881..8555df4b0 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration-type-semantics.ts
@@ -1,14 +1,14 @@
-import type { TypeDeclarationTypeSemantics } from "../../../type-declaration-type-semantics";
-import type { ProcessedType } from "../../../../../../../semantics";
+import type { BuiltInTypeFunc } from "../../../../../../../semantics";
+import type { ClassMemberDeclarationTypeSemantics } from "../class-member-declaration-type-semantics";
/**
- *
+ * Type semantics for AST Node {@link ClassConstructorDeclaration}.
* @since 0.12.0
*/
-export interface ClassConstructorDeclarationTypeSemantics extends TypeDeclarationTypeSemantics {
+export interface ClassConstructorDeclarationTypeSemantics extends ClassMemberDeclarationTypeSemantics {
/**
- * The processed type of this member property.
+ * The processed type of this member property. This is always {@link BuiltInTypeFunc a function}.
* @since 0.12.0
*/
- type: ProcessedType;
+ valueType: BuiltInTypeFunc;
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration.ts
index 26bce3653..be4436dc1 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration.ts
@@ -2,8 +2,8 @@
* Represents a class declaration in the Kipper language, which may contain methods and fields.
* @since 0.12.0
*/
-import type { ScopeTypeDeclaration } from "../../../../../../../semantics";
-import { BuiltInTypes, FunctionScope } from "../../../../../../../semantics";
+import type { ScopeFunctionDeclaration } from "../../../../../../../semantics";
+import { BuiltInTypeFunc, BuiltInTypes, FunctionScope } from "../../../../../../../semantics";
import type { ClassConstructorDeclarationContext } from "../../../../../../../lexer-parser";
import { KindParseRuleMapping, ParseRuleKindMapping } from "../../../../../../../lexer-parser";
import type { CompilableNodeParent } from "../../../../../../compilable-ast-node";
@@ -36,7 +36,7 @@ export class ClassConstructorDeclaration
* which is returned inside the {@link this.scopeDeclaration}.
* @private
*/
- protected override _scopeDeclaration: ScopeTypeDeclaration | undefined;
+ protected override _scopeDeclaration: ScopeFunctionDeclaration | undefined;
/**
/**
@@ -94,22 +94,23 @@ export class ClassConstructorDeclaration
public override get antlrRuleCtx(): ClassConstructorDeclarationContext {
return this._antlrRuleCtx;
}
+
/**
* The {@link ScopeDeclaration} context instance for this declaration, which is used to register the declaration
* in the {@link scope parent scope}.
* @since 0.12.0
*/
- public get scopeDeclaration(): ScopeTypeDeclaration | undefined {
+ public get scopeDeclaration(): ScopeFunctionDeclaration | undefined {
return this._scopeDeclaration;
}
- protected set scopeDeclaration(declaration: ScopeTypeDeclaration | undefined) {
+ protected set scopeDeclaration(declaration: ScopeFunctionDeclaration | undefined) {
this._scopeDeclaration = declaration;
}
- public getScopeDeclaration(): ScopeTypeDeclaration {
+ public getScopeDeclaration(): ScopeFunctionDeclaration {
/* istanbul ignore next: super function already being run/tested */
- return super.getScopeDeclaration();
+ return super.getScopeDeclaration();
}
/**
@@ -147,25 +148,29 @@ export class ClassConstructorDeclaration
this.semanticData = {
identifier: KipperConstructorInternalIdentifierLiteral,
- parameters: params,
+ params: params,
functionBody: functionBody,
};
+ this.scopeDeclaration = this.scope.addConstructor(this);
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
* @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
+ const semanticData = this.getSemanticData();
+ const paramTypes = semanticData.params.map((param) => param.getTypeSemanticData().valueType);
+
this.typeSemantics = {
- type: BuiltInTypes.Func,
+ valueType: new BuiltInTypeFunc(paramTypes, BuiltInTypes.void),
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
/**
* Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
*
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration-semantics.ts
index e07f376c0..f02a0dd56 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration-semantics.ts
@@ -1,10 +1,10 @@
-import type { TypeDeclarationSemantics } from "../../type-declaration-semantics";
+import type { DeclarationSemantics } from "../../../declaration-semantics";
/**
* Semantics for AST Node {@link InterfacePropertyDeclaration}.
* @since 0.12.0
*/
-export interface ClassMemberDeclarationSemantics extends TypeDeclarationSemantics {
+export interface ClassMemberDeclarationSemantics extends DeclarationSemantics {
/**
* The identifier of the interface member.
* @since 0.12.0
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration-type-semantics.ts
index cdd8e99bb..aa88ad97c 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration-type-semantics.ts
@@ -1,7 +1,7 @@
-import type { TypeDeclarationTypeSemantics } from "../../type-declaration-type-semantics";
+import type { TypeDeclarationPropertyTypeSemantics } from "../../type-declaration-property-type-semantics";
/**
* Type semantics for a {@link InterfaceMemberDeclaration}.
* @since 0.12.0
*/
-export interface ClassMemberDeclarationTypeSemantics extends TypeDeclarationTypeSemantics {}
+export interface ClassMemberDeclarationTypeSemantics extends TypeDeclarationPropertyTypeSemantics {}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration.ts
index d64ac52b3..4423f6707 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-member-declaration.ts
@@ -1,8 +1,9 @@
import type { KindParseRuleMapping, ParseRuleKindMapping } from "../../../../../../lexer-parser";
import type { ASTNodeMapper } from "../../../../../mapping";
-import { TypeDeclaration } from "../../type-declaration";
import type { ClassMemberDeclarationSemantics } from "./class-member-declaration-semantics";
import type { ClassMemberDeclarationTypeSemantics } from "./class-member-declaration-type-semantics";
+import type { ClassScope } from "../../../../../../semantics";
+import { Declaration } from "../../../declaration";
export type ASTClassMemberDeclarationKind =
| typeof ParseRuleKindMapping.RULE_classPropertyDeclaration
@@ -33,8 +34,17 @@ export type ParserClassMemberDeclarationRuleName = (typeof KindParseRuleMapping)
export abstract class ClassMemberDeclaration<
Semantics extends ClassMemberDeclarationSemantics = ClassMemberDeclarationSemantics,
TypeSemantics extends ClassMemberDeclarationTypeSemantics = ClassMemberDeclarationTypeSemantics,
-> extends TypeDeclaration {
+> extends Declaration {
protected abstract readonly _antlrRuleCtx: ParserClassMemberDeclarationContext;
+
public abstract get kind(): ASTClassMemberDeclarationKind;
+
public abstract get ruleName(): ParserClassMemberDeclarationRuleName;
+
+ /**
+ * The {@link scope} of this AST node.
+ */
+ public get scope(): ClassScope {
+ return this.scopeCtx.innerScope;
+ }
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration-semantics.ts
index 6b678aaf8..e7e1c7756 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration-semantics.ts
@@ -1,31 +1,34 @@
-import type { TypeDeclarationSemantics } from "../../../type-declaration-semantics";
import type { IdentifierTypeSpecifierExpression } from "../../../../../expressions";
import type { ParameterDeclaration } from "../../../../parameter-declaration";
import type { CompoundStatement } from "../../../../../statements";
+import type { ClassMemberDeclarationSemantics } from "../class-member-declaration-semantics";
+import type { RawType } from "../../../../../../../semantics";
/**
* Semantics for AST Node {@link InterfacePropertyDeclaration}.
* @since 0.12.0
*/
-export interface ClassMethodDeclarationSemantics extends TypeDeclarationSemantics {
+export interface ClassMethodDeclarationSemantics extends ClassMemberDeclarationSemantics {
/**
* The identifier of this member property.
* @since 0.12.0
*/
identifier: string;
-
/**
* The return type of this method.
* @since 0.12.0
*/
- parameters: Array;
-
+ params: Array;
/**
* The return type of this method.
* @since 0.12.0
*/
- returnType: IdentifierTypeSpecifierExpression;
-
+ returnType: RawType;
+ /**
+ * The type specifier expression for the return type.
+ * @since 0.11.0
+ */
+ returnTypeSpecifier: IdentifierTypeSpecifierExpression;
/**
* The body of the function.
* @since 0.10.0
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration-type-semantics.ts
index 5d0070abd..ae2f01709 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration-type-semantics.ts
@@ -1,14 +1,14 @@
-import type { TypeDeclarationTypeSemantics } from "../../../type-declaration-type-semantics";
-import type { ProcessedType } from "../../../../../../../semantics";
+import type { BuiltInTypeFunc } from "../../../../../../../semantics";
+import type { ClassMemberDeclarationTypeSemantics } from "../class-member-declaration-type-semantics";
/**
- *
+ * Type semantics for AST Node {@link ClassConstructorDeclaration}.
* @since 0.12.0
*/
-export interface ClassMethodDeclarationTypeSemantics extends TypeDeclarationTypeSemantics {
+export interface ClassMethodDeclarationTypeSemantics extends ClassMemberDeclarationTypeSemantics {
/**
- * The processed type of this member property.
+ * The processed type of this member property. This is always {@link BuiltInTypeFunc a function}.
* @since 0.12.0
*/
- type: ProcessedType;
+ valueType: BuiltInTypeFunc;
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration.ts
index 70a32ac05..5f4e3ed39 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-method-declaration/class-method-declaration.ts
@@ -2,8 +2,8 @@
* Represents a class declaration in the Kipper language, which may contain methods and fields.
* @since 0.12.0
*/
-import type { ScopeTypeDeclaration } from "../../../../../../../semantics";
-import { BuiltInTypes, FunctionScope } from "../../../../../../../semantics";
+import type { ScopeFunctionDeclaration } from "../../../../../../../semantics";
+import { BuiltInTypeFunc, FunctionScope } from "../../../../../../../semantics";
import type { ClassMethodDeclarationContext } from "../../../../../../../lexer-parser";
import { DeclaratorContext, KindParseRuleMapping, ParseRuleKindMapping } from "../../../../../../../lexer-parser";
import type { CompilableNodeParent } from "../../../../../../compilable-ast-node";
@@ -36,7 +36,7 @@ export class ClassMethodDeclaration
* which is returned inside the {@link this.scopeDeclaration}.
* @private
*/
- protected override _scopeDeclaration: ScopeTypeDeclaration | undefined;
+ protected override _scopeDeclaration: ScopeFunctionDeclaration | undefined;
/**
/**
@@ -94,22 +94,23 @@ export class ClassMethodDeclaration
public override get antlrRuleCtx(): ClassMethodDeclarationContext {
return this._antlrRuleCtx;
}
+
/**
* The {@link ScopeDeclaration} context instance for this declaration, which is used to register the declaration
* in the {@link scope parent scope}.
* @since 0.12.0
*/
- public get scopeDeclaration(): ScopeTypeDeclaration | undefined {
+ public get scopeDeclaration(): ScopeFunctionDeclaration | undefined {
return this._scopeDeclaration;
}
- protected set scopeDeclaration(declaration: ScopeTypeDeclaration | undefined) {
+ protected set scopeDeclaration(declaration: ScopeFunctionDeclaration | undefined) {
this._scopeDeclaration = declaration;
}
- public getScopeDeclaration(): ScopeTypeDeclaration {
+ public getScopeDeclaration(): ScopeFunctionDeclaration {
/* istanbul ignore next: super function already being run/tested */
- return super.getScopeDeclaration();
+ return super.getScopeDeclaration();
}
/**
@@ -163,31 +164,32 @@ export class ClassMethodDeclaration
this.semanticData = {
identifier: identifier,
- returnType: retTypeSpecifier,
- parameters: params,
+ returnTypeSpecifier: retTypeSpecifier,
+ returnType: retTypeSpecifier.getSemanticData().rawType,
+ params: params,
functionBody: functionBody,
};
+ this.scopeDeclaration = this.scope.addFunction(this);
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
* @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
+ const paramTypes = semanticData.params.map((param) => param.getTypeSemanticData().valueType);
+ const returnType = semanticData.returnTypeSpecifier.getTypeSemanticData().storedType;
- // Get the type that will be returned using the return type specifier
- const returnType = semanticData.returnType.getTypeSemanticData().storedType;
this.typeSemantics = {
- returnType: returnType,
- type: BuiltInTypes.Func,
+ valueType: new BuiltInTypeFunc(paramTypes, returnType),
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
/**
* Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
*
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration-semantics.ts
index e20509468..46ce17de6 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration-semantics.ts
@@ -1,12 +1,12 @@
-import type { TypeDeclarationSemantics } from "../../../type-declaration-semantics";
import type { IdentifierTypeSpecifierExpression } from "../../../../../expressions";
import type { RawType } from "../../../../../../../semantics";
+import type { ClassMemberDeclarationSemantics } from "../class-member-declaration-semantics";
/**
* Semantics for AST Node {@link InterfacePropertyDeclaration}.
* @since 0.12.0
*/
-export interface ClassPropertyDeclarationSemantics extends TypeDeclarationSemantics {
+export interface ClassPropertyDeclarationSemantics extends ClassMemberDeclarationSemantics {
/**
* The identifier of this member property.
* @since 0.12.0
@@ -23,5 +23,5 @@ export interface ClassPropertyDeclarationSemantics extends TypeDeclarationSemant
* The identifier of the {@link typeSpecifier.semanticData.identifier typeSpecifier}.
* @since 0.12.0
*/
- type: RawType;
+ valueType: RawType;
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration-type-semantics.ts
index 6c0550d29..77e52f0ee 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration-type-semantics.ts
@@ -1,14 +1,7 @@
-import type { TypeDeclarationTypeSemantics } from "../../../type-declaration-type-semantics";
-import type { ProcessedType } from "../../../../../../../semantics";
+import type { ClassMemberDeclarationTypeSemantics } from "../class-member-declaration-type-semantics";
/**
* Type semantics for AST Node {@link InterfacePropertyDeclaration}.
* @since 0.12.0
*/
-export interface ClassPropertyDeclarationTypeSemantics extends TypeDeclarationTypeSemantics {
- /**
- * The processed type of this member property.
- * @since 0.12.0
- */
- type: ProcessedType;
-}
+export interface ClassPropertyDeclarationTypeSemantics extends ClassMemberDeclarationTypeSemantics {}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration.ts
index f3452d242..8b1905391 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-property-declaration/class-property-declaration.ts
@@ -2,7 +2,7 @@
* Represents a class declaration in the Kipper language, which may contain methods and fields.
* @since 0.12.0
*/
-import type { ScopeTypeDeclaration } from "../../../../../../../semantics";
+import type { ScopeVariableDeclaration } from "../../../../../../../semantics";
import type {
ClassPropertyDeclarationContext,
InterfacePropertyDeclarationContext,
@@ -35,7 +35,7 @@ export class ClassPropertyDeclaration extends ClassMemberDeclaration<
* which is returned inside the {@link this.scopeDeclaration}.
* @private
*/
- protected override _scopeDeclaration: ScopeTypeDeclaration | undefined;
+ protected override _scopeDeclaration: ScopeVariableDeclaration | undefined;
/**
/**
@@ -85,22 +85,23 @@ export class ClassPropertyDeclaration extends ClassMemberDeclaration<
public override get antlrRuleCtx(): ClassPropertyDeclarationContext {
return this._antlrRuleCtx;
}
+
/**
* The {@link ScopeDeclaration} context instance for this declaration, which is used to register the declaration
* in the {@link scope parent scope}.
* @since 0.12.0
*/
- public get scopeDeclaration(): ScopeTypeDeclaration | undefined {
+ public get scopeDeclaration(): ScopeVariableDeclaration | undefined {
return this._scopeDeclaration;
}
- protected set scopeDeclaration(declaration: ScopeTypeDeclaration | undefined) {
+ protected set scopeDeclaration(declaration: ScopeVariableDeclaration | undefined) {
this._scopeDeclaration = declaration;
}
- public getScopeDeclaration(): ScopeTypeDeclaration {
+ public getScopeDeclaration(): ScopeVariableDeclaration {
/* istanbul ignore next: super function already being run/tested */
- return super.getScopeDeclaration();
+ return super.getScopeDeclaration();
}
/**
@@ -122,29 +123,30 @@ export class ClassPropertyDeclaration extends ClassMemberDeclaration<
this.semanticData = {
identifier: identifier,
typeSpecifier: typeSpecifier,
- type: typeSpecifier.getSemanticData().rawType,
+ valueType: typeSpecifier.getSemanticData().rawType,
};
+ this.scopeDeclaration = this.scope.addVariable(this);
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
* @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
// Get the type that will be returned using the value type specifier
semanticData.typeSpecifier.ensureTypeSemanticallyValid(); // Ensure the type specifier didn't fail
const valueType = semanticData.typeSpecifier.getTypeSemanticData().storedType;
this.typeSemantics = {
- type: valueType,
+ valueType: valueType,
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
/**
* Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
*
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-declaration.ts
index d1500cd6d..fc18da48b 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-declaration.ts
@@ -124,19 +124,19 @@ export class InterfaceDeclaration extends TypeDeclaration<
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
- * @since 0.11.0
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
+ * @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
this.typeSemantics = {
- type: CustomType.fromInterfaceDeclaration(this),
+ valueType: CustomType.fromInterfaceDeclaration(this),
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
/**
* Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
*
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-member-declaration-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-member-declaration-type-semantics.ts
index 3199a1a39..6424ae370 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-member-declaration-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-member-declaration-type-semantics.ts
@@ -1,7 +1,7 @@
-import type { TypeDeclarationTypeSemantics } from "../../type-declaration-type-semantics";
+import type { TypeDeclarationPropertyTypeSemantics } from "../../type-declaration-property-type-semantics";
/**
* Type semantics for a {@link InterfaceMemberDeclaration}.
* @since 0.12.0
*/
-export interface InterfaceMemberDeclarationTypeSemantics extends TypeDeclarationTypeSemantics {}
+export interface InterfaceMemberDeclarationTypeSemantics extends TypeDeclarationPropertyTypeSemantics {}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-member-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-member-declaration.ts
index b14a98e9c..9200c8632 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-member-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-member-declaration.ts
@@ -38,6 +38,8 @@ export abstract class InterfaceMemberDeclaration<
TypeSemantics extends InterfaceMemberDeclarationTypeSemantics = InterfaceMemberDeclarationTypeSemantics,
> extends TypeDeclaration {
protected abstract readonly _antlrRuleCtx: ParserInterfaceMemberDeclarationContext;
+
public abstract get kind(): ASTInterfaceMemberDeclarationKind;
+
public abstract get ruleName(): ParserInterfaceMemberDeclarationRuleName;
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration-semantics.ts
index 16fdddcd7..e7110a958 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration-semantics.ts
@@ -12,16 +12,14 @@ export interface InterfaceMethodDeclarationSemantics extends TypeDeclarationSema
* @since 0.12.0
*/
identifier: string;
-
/**
* The return type of this method.
* @since 0.12.0
*/
- parameters: Array;
-
+ params: Array;
/**
* The return type of this method.
* @since 0.12.0
*/
- returnType: IdentifierTypeSpecifierExpression;
+ returnTypeSpecifier: IdentifierTypeSpecifierExpression;
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration-type-semantics.ts
index 38a750cbe..855c69976 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration-type-semantics.ts
@@ -1,14 +1,14 @@
-import type { TypeDeclarationTypeSemantics } from "../../../type-declaration-type-semantics";
-import type { ProcessedType } from "../../../../../../../semantics";
+import type { BuiltInTypeFunc } from "../../../../../../../semantics";
+import type { TypeDeclarationPropertyTypeSemantics } from "../../../type-declaration-property-type-semantics";
/**
- *
+ * Type semantics for AST Node {@link InterfaceMethodDeclaration}.
* @since 0.12.0
*/
-export interface InterfaceMethodDeclarationTypeSemantics extends TypeDeclarationTypeSemantics {
+export interface InterfaceMethodDeclarationTypeSemantics extends TypeDeclarationPropertyTypeSemantics {
/**
- * The processed type of this member property.
+ * The processed type of this member property. This is always {@link BuiltInTypeFunc a function}.
* @since 0.12.0
*/
- type: ProcessedType;
+ valueType: BuiltInTypeFunc;
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration.ts
index 388b5f314..7b6e98873 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-method-declaration/interface-method-declaration.ts
@@ -3,7 +3,7 @@
* @since 0.12.0
*/
import type { ScopeTypeDeclaration } from "../../../../../../../semantics";
-import { BuiltInTypes } from "../../../../../../../semantics";
+import { BuiltInTypeFunc } from "../../../../../../../semantics";
import type { InterfaceMethodDeclarationContext } from "../../../../../../../lexer-parser";
import { DeclaratorContext, KindParseRuleMapping, ParseRuleKindMapping } from "../../../../../../../lexer-parser";
import { InterfaceMemberDeclaration } from "../interface-member-declaration";
@@ -84,6 +84,7 @@ export class InterfaceMethodDeclaration extends InterfaceMemberDeclaration<
public override get antlrRuleCtx(): InterfaceMethodDeclarationContext {
return this._antlrRuleCtx;
}
+
/**
* The {@link ScopeDeclaration} context instance for this declaration, which is used to register the declaration
* in the {@link scope parent scope}.
@@ -111,15 +112,15 @@ export class InterfaceMethodDeclaration extends InterfaceMemberDeclaration<
*/
public async primarySemanticAnalysis(): Promise {
const parseTreeChildren = this.getAntlrRuleChildren();
- let declaratorCtx = (
+ const declaratorCtx = (
parseTreeChildren.find((val) => val instanceof DeclaratorContext)
);
- let retTypeSpecifier: IdentifierTypeSpecifierExpression | undefined;
- let params: Array = [];
+ const params: Array = [];
+ let returnTypeSpecifier: IdentifierTypeSpecifierExpression | undefined;
// Create shallow copy of the children
- let children = [...this.children];
+ const children = [...this.children];
// Evaluate the primary semantic data for the function
while (children.length > 0) {
@@ -129,45 +130,43 @@ export class InterfaceMethodDeclaration extends InterfaceMemberDeclaration<
params.push(child);
} else {
// Once the return type has been reached, stop, as the last two items should be the return type and func body
- retTypeSpecifier = child;
+ returnTypeSpecifier = child;
break;
}
}
// Ensure that the children are fully present and not undefined
// Also make sure the scope has the required argument field for the function (is of type 'FunctionScope')
- if (!declaratorCtx || !retTypeSpecifier) {
+ if (!declaratorCtx || !returnTypeSpecifier) {
throw new UnableToDetermineSemanticDataError();
}
-
const identifier = this.tokenStream.getText(declaratorCtx.sourceInterval);
this.semanticData = {
identifier: identifier,
- returnType: retTypeSpecifier,
- parameters: params,
+ returnTypeSpecifier: returnTypeSpecifier,
+ params: params,
};
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
* @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
+ const paramTypes = semanticData.params.map((param) => param.getTypeSemanticData().valueType);
+ const returnType = semanticData.returnTypeSpecifier.getTypeSemanticData().storedType;
- // Get the type that will be returned using the return type specifier
- const returnType = semanticData.returnType.getTypeSemanticData().storedType;
this.typeSemantics = {
- returnType: returnType,
- type: BuiltInTypes.Func,
+ valueType: new BuiltInTypeFunc(paramTypes, returnType),
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
/**
* Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
*
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-property-declaration/interface-property-declaration-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-property-declaration/interface-property-declaration-type-semantics.ts
index 9f8fd5ae8..5c4ff6749 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-property-declaration/interface-property-declaration-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-property-declaration/interface-property-declaration-type-semantics.ts
@@ -1,14 +1,7 @@
-import type { TypeDeclarationTypeSemantics } from "../../../type-declaration-type-semantics";
-import type { ProcessedType } from "../../../../../../../semantics";
+import type { TypeDeclarationPropertyTypeSemantics } from "../../../type-declaration-property-type-semantics";
/**
* Type semantics for AST Node {@link InterfacePropertyDeclaration}.
* @since 0.12.0
*/
-export interface InterfacePropertyDeclarationTypeSemantics extends TypeDeclarationTypeSemantics {
- /**
- * The processed type of this member property.
- * @since 0.12.0
- */
- type: ProcessedType;
-}
+export interface InterfacePropertyDeclarationTypeSemantics extends TypeDeclarationPropertyTypeSemantics {}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-property-declaration/interface-property-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-property-declaration/interface-property-declaration.ts
index 41ae9e1bc..a2cb69e17 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-property-declaration/interface-property-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/interface-declaration/interface-member-declaration/interface-property-declaration/interface-property-declaration.ts
@@ -82,6 +82,7 @@ export class InterfacePropertyDeclaration extends InterfaceMemberDeclaration<
public override get antlrRuleCtx(): InterfacePropertyDeclarationContext {
return this._antlrRuleCtx;
}
+
/**
* The {@link ScopeDeclaration} context instance for this declaration, which is used to register the declaration
* in the {@link scope parent scope}.
@@ -124,24 +125,24 @@ export class InterfacePropertyDeclaration extends InterfaceMemberDeclaration<
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
* @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
// Get the type that will be returned using the value type specifier
semanticData.typeSpecifier.ensureTypeSemanticallyValid(); // Ensure the type specifier didn't fail
const valueType = semanticData.typeSpecifier.getTypeSemanticData().storedType;
this.typeSemantics = {
- type: valueType,
+ valueType: valueType,
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
/**
* Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
*
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/type-declaration-property-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/type-declaration-property-type-semantics.ts
new file mode 100644
index 000000000..aef381732
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/type-declaration-property-type-semantics.ts
@@ -0,0 +1,16 @@
+import type { ProcessedType } from "../../../../semantics";
+import type { DeclarationTypeSemantics } from "../declaration-type-semantics";
+
+/**
+ * Type semantics for a property declaration inside a {@link TypeDeclaration}.
+ *
+ * This is a simple helper interface for the properties inside classes and interfaces.
+ * @since 0.12.0
+ */
+export interface TypeDeclarationPropertyTypeSemantics extends DeclarationTypeSemantics {
+ /**
+ * The processed type of the type declaration.
+ * @since 0.12.0
+ */
+ valueType: ProcessedType;
+}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/type-declaration-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/type-declaration-type-semantics.ts
index 02854427a..312e2f25f 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/type-declaration-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/type-declaration/type-declaration-type-semantics.ts
@@ -1,14 +1,14 @@
-import type { TypeData } from "../../../ast-node";
import type { ProcessedType } from "../../../../semantics";
+import type { DeclarationTypeSemantics } from "../declaration-type-semantics";
/**
* Type semantics for a {@link TypeDeclaration}.
* @since 0.11.0
*/
-export interface TypeDeclarationTypeSemantics extends TypeData {
+export interface TypeDeclarationTypeSemantics extends DeclarationTypeSemantics {
/**
* The processed type of the type declaration.
* @since 0.11.0
*/
- type: ProcessedType;
+ valueType: ProcessedType;
}
diff --git a/kipper/core/src/compiler/ast/nodes/declarations/variable-declaration/variable-declaration.ts b/kipper/core/src/compiler/ast/nodes/declarations/variable-declaration/variable-declaration.ts
index c5731051e..c8c8a8291 100644
--- a/kipper/core/src/compiler/ast/nodes/declarations/variable-declaration/variable-declaration.ts
+++ b/kipper/core/src/compiler/ast/nodes/declarations/variable-declaration/variable-declaration.ts
@@ -8,7 +8,7 @@
import type { VariableDeclarationSemantics } from "./variable-declaration-semantics";
import type { VariableDeclarationTypeSemantics } from "./variable-declaration-type-semantics";
import type { CompilableNodeParent } from "../../../compilable-ast-node";
-import type { RawType, ScopeVariableDeclaration } from "../../../../semantics";
+import type { GlobalScope, LocalScope, RawType, ScopeVariableDeclaration } from "../../../../semantics";
import type { Expression, IdentifierTypeSpecifierExpression } from "../../expressions";
import type { ParseTree } from "antlr4ts/tree";
import type { KipperStorageType } from "../../../../const";
@@ -122,6 +122,13 @@ export class VariableDeclaration extends Declarationsuper.getScopeDeclaration();
}
+ /**
+ * The {@link scope} of this AST node.
+ */
+ public get scope(): GlobalScope | LocalScope {
+ return this.scopeCtx.innerScope;
+ }
+
/**
* Performs the semantic analysis for this Kipper token. This will log all warnings using {@link programCtx.logger}
* and throw errors if encountered.
@@ -171,8 +178,6 @@ export class VariableDeclaration extends Declaration {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
// Get the type that will be returned using the value type specifier
@@ -196,6 +199,17 @@ export class VariableDeclaration extends Declaration {
+ const semanticData = this.getSemanticData();
// If the variable is defined, check whether the assignment is valid
if (semanticData.value) {
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/index.ts b/kipper/core/src/compiler/ast/nodes/expressions/index.ts
index a73cc0a59..c9dde47ff 100644
--- a/kipper/core/src/compiler/ast/nodes/expressions/index.ts
+++ b/kipper/core/src/compiler/ast/nodes/expressions/index.ts
@@ -20,4 +20,6 @@ export * from "./conditional-expression/";
export * from "./function-call-expression/";
export * from "./member-access-expression/";
export * from "./bitwise-expression/";
-export * from "./primary-expression/lambda-primary-expression/";
+export * from "./new-instantiation-expression/";
+export * from "./matches-expression/";
+export * from "./instanceof-expression/";
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/index.ts b/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/index.ts
new file mode 100644
index 000000000..343ff1ad0
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/index.ts
@@ -0,0 +1,3 @@
+export * from "./instanceof-expression";
+export * from "./instanceof-expression-semantics";
+export * from "./instanceof-expression-type-semantics";
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/instanceof-expression-semantics.ts b/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/instanceof-expression-semantics.ts
new file mode 100644
index 000000000..b29697dd7
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/instanceof-expression-semantics.ts
@@ -0,0 +1,20 @@
+import type { ExpressionSemantics } from "../expression-semantics";
+import type { Expression } from "../expression";
+import type { IdentifierTypeSpecifierExpression } from "../type-specifier-expression";
+
+/**
+ * The semantics for an instanceof expression.
+ * @since 0.12.0
+ */
+export interface InstanceofExpressionSemantics extends ExpressionSemantics {
+ /**
+ * The type that the left-hand side of the instanceof expression is being checked against.
+ * @since 0.12.0
+ */
+ operand: Expression;
+ /**
+ * The type that the right-hand side of the instanceof expression is being checked against.
+ * @since 0.12.0
+ */
+ classTypeSpecifier: IdentifierTypeSpecifierExpression;
+}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/instanceof-expression-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/instanceof-expression-type-semantics.ts
new file mode 100644
index 000000000..aadcdbcd8
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/instanceof-expression-type-semantics.ts
@@ -0,0 +1,14 @@
+import type { ExpressionTypeSemantics } from "../expression-type-semantics";
+import type { CustomType } from "../../../../semantics";
+
+/**
+ * The type semantics for an instanceof expression.
+ * @since 0.12.0
+ */
+export interface InstanceofExpressionTypeSemantics extends ExpressionTypeSemantics {
+ /**
+ * The type that the right-hand side of the instanceof expression is being checked against.
+ * @since 0.12.0
+ */
+ classType: CustomType;
+}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/instanceof-expression.ts b/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/instanceof-expression.ts
new file mode 100644
index 000000000..56f1a48c9
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/instanceof-expression/instanceof-expression.ts
@@ -0,0 +1,97 @@
+import { Expression } from "../expression";
+import type { InstanceofExpressionSemantics } from "./instanceof-expression-semantics";
+import type { InstanceofExpressionTypeSemantics } from "./instanceof-expression-type-semantics";
+import type { InstanceOfExpressionContext } from "../../../../lexer-parser";
+import { KindParseRuleMapping, ParseRuleKindMapping } from "../../../../lexer-parser";
+import type { CompilableASTNode } from "../../../compilable-ast-node";
+import { UnableToDetermineSemanticDataError } from "../../../../../errors";
+import type { IdentifierTypeSpecifierExpression } from "../type-specifier-expression";
+import type { CustomType } from "../../../../semantics";
+import { BuiltInTypes } from "../../../../semantics";
+
+/**
+ * Represents an instanceof expression in the AST.
+ * @since 0.12.0
+ */
+export class InstanceOfExpression extends Expression<
+ InstanceofExpressionSemantics,
+ InstanceofExpressionTypeSemantics,
+ Expression
+> {
+ /**
+ * The static kind for this AST Node.
+ * @since 0.12.0
+ */
+ public static readonly kind = ParseRuleKindMapping.RULE_instanceofExpression;
+ /**
+ * The static rule name for this AST Node.
+ * @since 0.12.0
+ */
+ public static readonly ruleName = KindParseRuleMapping[this.kind];
+
+ /**
+ * The private field '_antlrRuleCtx' that actually stores the variable data,
+ * which is returned inside the {@link this.antlrRuleCtx}.
+ * @private
+ */
+ protected override readonly _antlrRuleCtx: InstanceOfExpressionContext;
+
+ constructor(antlrRuleCtx: InstanceOfExpressionContext, parent: CompilableASTNode) {
+ super(antlrRuleCtx, parent);
+ this._antlrRuleCtx = antlrRuleCtx;
+ }
+
+ /**
+ * Returns the kind of this AST node. This represents the specific type of the {@link antlrRuleCtx} that this AST
+ * node wraps.
+ *
+ * This may be compared using the {@link ParseRuleKindMapping rule fields}, for example
+ * {@link ParseRuleKindMapping.RULE_expression}.
+ * @since 0.12.0
+ */
+ public override get kind() {
+ return InstanceOfExpression.kind;
+ }
+
+ /**
+ * Returns the rule name of this AST Node. This represents the specific type of the {@link antlrRuleCtx} that this
+ * AST node wraps.
+ *
+ * This may be compared using the {@link ParseRuleKindMapping rule fields}, for example
+ * {@link ParseRuleKindMapping.RULE_expression}.
+ * @since 0.12.0
+ */
+ public override get ruleName() {
+ return InstanceOfExpression.ruleName;
+ }
+
+ public async primarySemanticAnalysis(): Promise {
+ const children = this.children;
+ if (!children || children.length < 2) {
+ throw new UnableToDetermineSemanticDataError();
+ }
+
+ const operand = children[0];
+ const classTypeSpecifier = children[1];
+ this.semanticData = {
+ operand: operand,
+ classTypeSpecifier: classTypeSpecifier,
+ };
+ }
+
+ public async primarySemanticTypeChecking(): Promise {
+ const semanticData = this.getSemanticData();
+ const classType = semanticData.classTypeSpecifier.getTypeSemanticData().storedType;
+
+ this.programCtx.typeCheck(this).validInstanceofClassType(classType);
+ this.typeSemantics = {
+ classType: classType,
+ evaluatedType: BuiltInTypes.bool,
+ };
+ }
+
+ public targetCodeGenerator = this.codeGenerator.instanceOfExpression;
+ public targetSemanticAnalysis = this.semanticAnalyser.instanceOfExpression;
+
+ public checkForWarnings = undefined; // TODO!
+}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/index.ts b/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/index.ts
new file mode 100644
index 000000000..22c675858
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/index.ts
@@ -0,0 +1,3 @@
+export * from "./matches-expression";
+export * from "./matches-expression-semantics";
+export * from "./matches-expression-type-semantics";
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/matches-expression-semantics.ts b/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/matches-expression-semantics.ts
new file mode 100644
index 000000000..04354bc70
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/matches-expression-semantics.ts
@@ -0,0 +1,21 @@
+/**
+ * Semantics for the matches expression.
+ * @since 0.12.0
+ */
+
+import type { ExpressionSemantics } from "../expression-semantics";
+import type { IdentifierTypeSpecifierExpression } from "../type-specifier-expression";
+import type { Expression } from "../expression";
+
+export interface MatchesExpressionSemantics extends ExpressionSemantics {
+ /**
+ * The pattern to match against.
+ * @since 0.12.0
+ */
+ pattern: IdentifierTypeSpecifierExpression;
+ /**
+ * The expression to match against the interface.
+ * @since 0.12.0
+ */
+ expression: Expression;
+}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/matches-expression-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/matches-expression-type-semantics.ts
new file mode 100644
index 000000000..c9d93ff5e
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/matches-expression-type-semantics.ts
@@ -0,0 +1,7 @@
+/**
+ * The type semantics of a matches expression.
+ * @since 0.12.0
+ */
+import type { ExpressionTypeSemantics } from "../expression-type-semantics";
+
+export interface MatchesExpressionTypeSemantics extends ExpressionTypeSemantics {}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/matches-expression.ts b/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/matches-expression.ts
new file mode 100644
index 000000000..2022217b5
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/matches-expression/matches-expression.ts
@@ -0,0 +1,139 @@
+/**
+ * Matches expression, which checks if a value matches a pattern.
+ *
+ * This expression will evaluate to a boolean value, indicating if the value matches the pattern.
+ * @since 0.12.0
+ * @example
+ * 5 matches int
+ * "3" matches str
+ * true matches bool
+ */
+import type { CompilableASTNode } from "../../../compilable-ast-node";
+import type { MatchesExpressionContext } from "../../../../lexer-parser";
+import { KindParseRuleMapping, ParseRuleKindMapping } from "../../../../lexer-parser";
+import { Expression } from "../expression";
+import type { MatchesExpressionSemantics } from "./matches-expression-semantics";
+import type { MatchesExpressionTypeSemantics } from "./matches-expression-type-semantics";
+import type { IdentifierTypeSpecifierExpression } from "../type-specifier-expression";
+import { UnableToDetermineSemanticDataError } from "../../../../../errors";
+import { BuiltInTypes } from "../../../../semantics";
+
+/**
+ * Matches expression, which checks if a value matches a pattern.
+ *
+ * This expression will evaluate to a boolean value, indicating if the value matches the pattern.
+ * @since 0.12.0
+ * @example
+ * 5 matches int
+ * "3" matches str
+ * true matches bool
+ */
+export class MatchesExpression extends Expression<
+ MatchesExpressionSemantics,
+ MatchesExpressionTypeSemantics,
+ Expression
+> {
+ /**
+ * The static kind for this AST Node.
+ * @since 0.12.0
+ */
+ public static readonly kind = ParseRuleKindMapping.RULE_matchesExpression;
+
+ /**
+ * The static rule name for this AST Node.
+ * @since 0.12.0
+ */
+ public static readonly ruleName = KindParseRuleMapping[this.kind];
+
+ /**
+ * The private field '_antlrRuleCtx' that actually stores the variable data,
+ * which is returned inside the {@link this.antlrRuleCtx}.
+ * @private
+ */
+ protected override readonly _antlrRuleCtx: MatchesExpressionContext;
+
+ constructor(antlrRuleCtx: MatchesExpressionContext, parent: CompilableASTNode) {
+ super(antlrRuleCtx, parent);
+ this._antlrRuleCtx = antlrRuleCtx;
+ }
+
+ /**
+ * Returns the kind of this AST node. This represents the specific type of the {@link antlrRuleCtx} that this AST
+ * node wraps.
+ *
+ * This may be compared using the {@link ParseRuleKindMapping rule fields}, for example
+ * {@link ParseRuleKindMapping.RULE_expression}.
+ * @since 0.12.0
+ */
+ public override get kind() {
+ return MatchesExpression.kind;
+ }
+
+ /**
+ * Returns the rule name of this AST Node. This represents the specific type of the {@link antlrRuleCtx} that this
+ * AST node wraps.
+ *
+ * This may be compared using the {@link ParseRuleKindMapping rule fields}, for example
+ * {@link ParseRuleKindMapping.RULE_expression}.
+ * @since 0.12.0
+ */
+ public override get ruleName() {
+ return MatchesExpression.ruleName;
+ }
+
+ /**
+ * The antlr context containing the antlr4 metadata for this expression.
+ */
+ public override get antlrRuleCtx(): MatchesExpressionContext {
+ return this._antlrRuleCtx;
+ }
+
+ /**
+ * Performs the semantic analysis for this Kipper token. This will log all warnings using {@link programCtx.logger}
+ * and throw errors if encountered.
+ *
+ * This will not run in case that {@link this.hasFailed} is true, as that indicates that the semantic analysis of
+ * the children has already failed and as such no parent node should run type checking.
+ */
+ public async primarySemanticAnalysis(): Promise {
+ const value: Expression = this.children[0];
+ const pattern = this.children[1];
+
+ if (!value || !pattern) {
+ throw new UnableToDetermineSemanticDataError();
+ }
+
+ this.semanticData = {
+ expression: value,
+ pattern: pattern,
+ };
+ }
+
+ /**
+ * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
+ * and throw errors if encountered.
+ *
+ * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
+ * the children has already failed and as such no parent node should run type checking.
+ * @since 0.12.0
+ */
+ public async primarySemanticTypeChecking(): Promise {
+ const semanticData = this.getSemanticData();
+ const patternType = semanticData.pattern.getTypeSemanticData().storedType;
+ this.programCtx.typeCheck(this).validMatchesInterfaceType(patternType);
+ this.typeSemantics = {
+ evaluatedType: BuiltInTypes.bool,
+ };
+ }
+
+ /**
+ * Semantically analyses the code inside this AST node and checks for possible warnings or problematic code.
+ *
+ * This will log all warnings using {@link programCtx.logger} and store them in {@link KipperProgramContext.warnings}.
+ * @since 0.12.0
+ */
+ public checkForWarnings = undefined; // TODO!
+
+ readonly targetSemanticAnalysis = this.semanticAnalyser.matchesExpression;
+ readonly targetCodeGenerator = this.codeGenerator.matchesExpression;
+}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/index.ts b/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/index.ts
new file mode 100644
index 000000000..62599f1ab
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/index.ts
@@ -0,0 +1,3 @@
+export * from "./new-instantiation-expression-type-semantics";
+export * from "./new-instantiation-expression-semantics";
+export * from "./new-instantiation-expression";
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/new-instantiation-expression-semantics.ts b/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/new-instantiation-expression-semantics.ts
new file mode 100644
index 000000000..9021ce9a4
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/new-instantiation-expression-semantics.ts
@@ -0,0 +1,8 @@
+import type { ExpressionSemantics } from "../expression-semantics";
+import type { IdentifierTypeSpecifierExpression } from "../type-specifier-expression";
+import type { Expression } from "../expression";
+
+export interface NewInstantiationExpressionSemantics extends ExpressionSemantics {
+ class: IdentifierTypeSpecifierExpression;
+ args: Array;
+}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/new-instantiation-expression-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/new-instantiation-expression-type-semantics.ts
new file mode 100644
index 000000000..12be3a0d8
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/new-instantiation-expression-type-semantics.ts
@@ -0,0 +1,3 @@
+import type { ExpressionTypeSemantics } from "../expression-type-semantics";
+
+export interface NewInstantiationExpressionTypeSemantics extends ExpressionTypeSemantics {}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/new-instantiation-expression.ts b/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/new-instantiation-expression.ts
new file mode 100644
index 000000000..b72ce7b4e
--- /dev/null
+++ b/kipper/core/src/compiler/ast/nodes/expressions/new-instantiation-expression/new-instantiation-expression.ts
@@ -0,0 +1,76 @@
+import type { ASTExpressionKind, ASTExpressionRuleName } from "../../../common";
+import { Expression } from "../expression";
+import type { NewInstantiationExpressionSemantics } from "./new-instantiation-expression-semantics";
+import type { NewInstantiationExpressionTypeSemantics } from "./new-instantiation-expression-type-semantics";
+import type { NewInstantiationExpressionContext } from "../../../../lexer-parser";
+import { KindParseRuleMapping, ParseRuleKindMapping } from "../../../../lexer-parser";
+import type { CompilableASTNode } from "../../../compilable-ast-node";
+import type { IdentifierTypeSpecifierExpression } from "../type-specifier-expression";
+import { UnableToDetermineSemanticDataError } from "../../../../../errors";
+
+/**
+ * New instantiation expressions, which are used to create a new instance of a class.
+ * @since 0.12.0
+ */
+export class NewInstantiationExpression extends Expression<
+ NewInstantiationExpressionSemantics,
+ NewInstantiationExpressionTypeSemantics
+> {
+ /**
+ * The static kind for this AST Node.
+ */
+ public static readonly kind = ParseRuleKindMapping.RULE_newInstantiationExpression;
+
+ /**
+ * The static rule name for this AST Node.
+ */
+ public static readonly ruleName = KindParseRuleMapping[this.kind];
+
+ /**
+ * The private field '_antlrRuleCtx' that actually stores the variable data,
+ * which is returned inside the {@link this.antlrRuleCtx}.
+ * @private
+ */
+ protected override readonly _antlrRuleCtx: NewInstantiationExpressionContext;
+
+ public get kind(): ASTExpressionKind {
+ return NewInstantiationExpression.kind;
+ }
+
+ public get ruleName(): ASTExpressionRuleName {
+ return NewInstantiationExpression.ruleName;
+ }
+
+ public async primarySemanticTypeChecking?(): Promise {
+ const typeSepcifier = this.semanticData!.class.getTypeSemanticData().storedType;
+
+ this.typeSemantics = {
+ evaluatedType: typeSepcifier,
+ };
+ }
+
+ constructor(antlrRuleCtx: NewInstantiationExpressionContext, parent: CompilableASTNode) {
+ super(antlrRuleCtx, parent);
+ this._antlrRuleCtx = antlrRuleCtx;
+ }
+
+ public async primarySemanticAnalysis?(): Promise {
+ const children = this.children;
+
+ const classIdentifier = children[0];
+ const args = >children.slice(1);
+
+ if (!classIdentifier || !args) {
+ throw new UnableToDetermineSemanticDataError();
+ }
+
+ this.semanticData = {
+ class: classIdentifier,
+ args: args,
+ };
+ }
+
+ public checkForWarnings = undefined;
+ public targetCodeGenerator = this.codeGenerator.newInstantiationExpression;
+ public targetSemanticAnalysis = this.semanticAnalyser.newInstantiationExpression;
+}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/index.ts b/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/index.ts
index 819135910..27cc35929 100644
--- a/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/index.ts
+++ b/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/index.ts
@@ -14,4 +14,5 @@ export * from "./object-primary-expression/";
export * from "./void-or-null-or-undefined-primary-expression/";
export * from "./fstring-primary-expression/";
export * from "./identifier-primary-expression/";
-export * from "./tangled-primary-expression";
+export * from "./tangled-primary-expression/";
+export * from "./lambda-primary-expression/";
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/lambda-primary-expression/lambda-primary-expression-type-semantics.ts b/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/lambda-primary-expression/lambda-primary-expression-type-semantics.ts
index 6df2688d4..37f804600 100644
--- a/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/lambda-primary-expression/lambda-primary-expression-type-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/lambda-primary-expression/lambda-primary-expression-type-semantics.ts
@@ -19,5 +19,5 @@ export interface LambdaPrimaryExpressionTypeSemantics extends ExpressionTypeSema
* The type of the declaration. This is always some variation of {@link BuiltInTypeFunc i.e. `Func`}.
* @since 0.12.0
*/
- type: BuiltInTypeFunc;
+ valueType: BuiltInTypeFunc;
}
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/lambda-primary-expression/lambda-primary-expression.ts b/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/lambda-primary-expression/lambda-primary-expression.ts
index 2485126a4..2c3f35189 100644
--- a/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/lambda-primary-expression/lambda-primary-expression.ts
+++ b/kipper/core/src/compiler/ast/nodes/expressions/primary-expression/lambda-primary-expression/lambda-primary-expression.ts
@@ -143,14 +143,12 @@ export class LambdaPrimaryExpression
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
*
- * This will not run in case that {@link this.hasFailed} is true, as that indicates that the type checking of
- * the children has already failed and as such no parent node should run type checking.
- * @since 0.11.0
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
+ * @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
const paramTypes = semanticData.params.map((param) => param.getTypeSemanticData().valueType);
const returnType = semanticData.returnTypeSpecifier.getTypeSemanticData().storedType;
@@ -158,7 +156,7 @@ export class LambdaPrimaryExpression
const funcType = new BuiltInTypeFunc(paramTypes, returnType);
this.typeSemantics = {
evaluatedType: funcType,
- type: funcType,
+ valueType: funcType,
};
// Ensure that all code paths return a value
@@ -166,6 +164,7 @@ export class LambdaPrimaryExpression
this.programCtx.typeCheck(this).validReturnCodePathsInFunctionBody(this);
}
}
+ public readonly primarySemanticTypeChecking: undefined;
public checkForWarnings = undefined;
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/generic-type-specifier-expression/generic-type-specifier-expression.ts b/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/generic-type-specifier-expression/generic-type-specifier-expression.ts
index 5bb287e03..b5c66f368 100644
--- a/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/generic-type-specifier-expression/generic-type-specifier-expression.ts
+++ b/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/generic-type-specifier-expression/generic-type-specifier-expression.ts
@@ -101,11 +101,12 @@ export class GenericTypeSpecifierExpression extends TypeSpecifierExpression<
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
- * @since 0.8.0
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
+ *
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
+ * @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
const valueType = this.programCtx.typeCheck(this).getCheckedType(semanticData.rawType, this.scope);
const providedArguments = semanticData.genericArguments.map((arg) => arg.getTypeSemanticData().storedType);
@@ -180,6 +181,8 @@ export class GenericTypeSpecifierExpression extends TypeSpecifierExpression<
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
public checkForWarnings = undefined; // TODO!
readonly targetSemanticAnalysis = this.semanticAnalyser.genericTypeSpecifierExpression;
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/identifier-type-specifier-expression/identifier-type-specifier-expression.ts b/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/identifier-type-specifier-expression/identifier-type-specifier-expression.ts
index 4216c98c8..fb00e00b2 100644
--- a/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/identifier-type-specifier-expression/identifier-type-specifier-expression.ts
+++ b/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/identifier-type-specifier-expression/identifier-type-specifier-expression.ts
@@ -97,11 +97,12 @@ export class IdentifierTypeSpecifierExpression extends TypeSpecifierExpression<
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
- * @since 0.8.0
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
+ *
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
+ * @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
// Create a checked type instance (this function handles error recovery and invalid types)
@@ -113,6 +114,8 @@ export class IdentifierTypeSpecifierExpression extends TypeSpecifierExpression<
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
public checkForWarnings = undefined; // TODO!
readonly targetSemanticAnalysis = this.semanticAnalyser.identifierTypeSpecifierExpression;
diff --git a/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/typeof-type-specifier-expression/typeof-type-specifier-expression.ts b/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/typeof-type-specifier-expression/typeof-type-specifier-expression.ts
index 6721147f3..56d8883dd 100644
--- a/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/typeof-type-specifier-expression/typeof-type-specifier-expression.ts
+++ b/kipper/core/src/compiler/ast/nodes/expressions/type-specifier-expression/typeof-type-specifier-expression/typeof-type-specifier-expression.ts
@@ -98,11 +98,12 @@ export class TypeofTypeSpecifierExpression extends TypeSpecifierExpression<
}
/**
- * Performs type checking for this AST Node. This will log all warnings using {@link programCtx.logger}
- * and throw errors if encountered.
- * @since 0.8.0
+ * Preliminary registers the class declaration type to allow for internal self-referential type checking.
+ *
+ * This is part of the "Ahead of time" type evaluation, which is done before the main type checking.
+ * @since 0.12.0
*/
- public async primarySemanticTypeChecking(): Promise {
+ public async primaryPreliminaryTypeChecking(): Promise {
const semanticData = this.getSemanticData();
const valueReference = semanticData.ref;
@@ -112,6 +113,8 @@ export class TypeofTypeSpecifierExpression extends TypeSpecifierExpression<
};
}
+ public readonly primarySemanticTypeChecking: undefined;
+
public checkForWarnings = undefined; // TODO!
readonly targetSemanticAnalysis = this.semanticAnalyser.typeofTypeSpecifierExpression;
diff --git a/kipper/core/src/compiler/ast/nodes/root-ast-node.ts b/kipper/core/src/compiler/ast/nodes/root-ast-node.ts
index d3fef873f..fd6fa47a5 100644
--- a/kipper/core/src/compiler/ast/nodes/root-ast-node.ts
+++ b/kipper/core/src/compiler/ast/nodes/root-ast-node.ts
@@ -190,6 +190,16 @@ export class RootASTNode extends ParserASTNode imp
}
}
+ // Perform preliminary semantic analysis in case any specific type evaluation is required prematurely (ahead of
+ // time type evaluation)
+ for (let child of this.children) {
+ try {
+ await child.preliminaryTypeChecking();
+ } catch (e) {
+ await this.handleSemanticError(e);
+ }
+ }
+
// Perform type-checking based on the existing AST nodes and evaluated semantics
for (let child of this.children) {
try {
diff --git a/kipper/core/src/compiler/ast/nodes/statements/return-statement/return-statement-semantics.ts b/kipper/core/src/compiler/ast/nodes/statements/return-statement/return-statement-semantics.ts
index ed04641ad..ede39c977 100644
--- a/kipper/core/src/compiler/ast/nodes/statements/return-statement/return-statement-semantics.ts
+++ b/kipper/core/src/compiler/ast/nodes/statements/return-statement/return-statement-semantics.ts
@@ -3,8 +3,8 @@
* @since 0.10.0
*/
import type { SemanticData } from "../../../ast-node";
-import type { Expression, LambdaPrimaryExpression } from "../../expressions";
-import type { FunctionDeclaration } from "../../declarations";
+import type { Expression } from "../../expressions";
+import type { KipperCallable } from "../../../../const";
/**
* Semantics for AST Node {@link ReturnStatement}.
@@ -20,5 +20,5 @@ export interface ReturnStatementSemantics extends SemanticData {
* The function that this return statement is in.
* @since 0.10.0
*/
- function: FunctionDeclaration | LambdaPrimaryExpression;
+ function: KipperCallable;
}
diff --git a/kipper/core/src/compiler/ast/nodes/statements/try-catch-statement/try-catch-statement.ts b/kipper/core/src/compiler/ast/nodes/statements/try-catch-statement/try-catch-statement.ts
index 8ba56bcb1..6b15bf261 100644
--- a/kipper/core/src/compiler/ast/nodes/statements/try-catch-statement/try-catch-statement.ts
+++ b/kipper/core/src/compiler/ast/nodes/statements/try-catch-statement/try-catch-statement.ts
@@ -4,8 +4,7 @@
*/
import type { TryCatchStatementContext } from "../../../../lexer-parser";
-import { CatchClauseContext, FinallyClauseContext } from "../../../../lexer-parser";
-import { KindParseRuleMapping, ParseRuleKindMapping } from "../../../../lexer-parser";
+import { FinallyClauseContext, KindParseRuleMapping, ParseRuleKindMapping } from "../../../../lexer-parser";
import { Statement } from "../statement";
import type { Expression } from "../../expressions";
import type { CompilableNodeParent } from "../../../compilable-ast-node";
diff --git a/kipper/core/src/compiler/compiler.ts b/kipper/core/src/compiler/compiler.ts
index 547792a0a..9973d92f3 100644
--- a/kipper/core/src/compiler/compiler.ts
+++ b/kipper/core/src/compiler/compiler.ts
@@ -6,7 +6,7 @@ import type { CodePointCharStream, Token } from "antlr4ts";
import { CommonTokenStream } from "antlr4ts";
import { KipperAntlrErrorListener } from "../antlr-error-listener";
import type { LexerParserData } from "./lexer-parser";
-import { KipperLexer, KipperParser, KipperFileStream } from "./lexer-parser";
+import { KipperFileStream, KipperLexer, KipperParser } from "./lexer-parser";
import { KipperLogger } from "../logger";
import { KipperProgramContext } from "./program-ctx";
import type { KipperSyntaxError } from "../errors";
diff --git a/kipper/core/src/compiler/const.ts b/kipper/core/src/compiler/const.ts
index 508ba8c54..d2217349f 100644
--- a/kipper/core/src/compiler/const.ts
+++ b/kipper/core/src/compiler/const.ts
@@ -3,6 +3,7 @@
* @since 0.3.0
*/
import type { ScopeDeclaration } from "./semantics";
+import type { ClassMethodDeclaration, FunctionDeclaration, LambdaPrimaryExpression } from "./ast";
/**
* If this variable is true, then this environment is assumed to be inside a browser and special browser support should
@@ -647,6 +648,12 @@ export type KipperReferenceable = ScopeDeclaration;
*/
export type JmpStatementType = "continue" | "break";
+/**
+ * Represents all possible callable ast nodes inside Kipper.
+ * @since 0.12.0
+ */
+export type KipperCallable = FunctionDeclaration | LambdaPrimaryExpression | ClassMethodDeclaration;
+
/**
* Represents the internal identifier for a Kipper constructor.
* @since 0.12.0
diff --git a/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.interp b/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.interp
index e43cc2228..c05806ce5 100644
--- a/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.interp
+++ b/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.interp
@@ -4,6 +4,7 @@ null
null
null
null
+'instanceof'
'const'
'var'
'as'
@@ -26,8 +27,10 @@ null
'class'
'interface'
'constructor'
+'new'
'true'
'false'
+'matches'
'typeof'
'try'
'catch'
@@ -97,6 +100,7 @@ FStringExpStart
BlockComment
LineComment
Pragma
+InstanceOf
Const
Var
As
@@ -119,8 +123,10 @@ RetIndicator
Class
Interface
Constructor
+New
True
False
+Matches
Typeof
Try
Catch
@@ -188,6 +194,7 @@ rule names:
BlockComment
LineComment
Pragma
+InstanceOf
Const
Var
As
@@ -210,8 +217,10 @@ RetIndicator
Class
Interface
Constructor
+New
True
False
+Matches
Typeof
Try
Catch
@@ -322,4 +331,4 @@ SINGLE_QUOTE_FSTRING
DOUBLE_QUOTE_FSTRING
atn:
-[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 92, 794, 8, 1, 8, 1, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 254, 10, 2, 12, 2, 14, 2, 257, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 37, 3, 37, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 52, 3, 52, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 71, 3, 71, 3, 72, 3, 72, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 7, 78, 572, 10, 78, 12, 78, 14, 78, 575, 11, 78, 3, 79, 3, 79, 3, 79, 3, 79, 5, 79, 581, 10, 79, 3, 80, 3, 80, 5, 80, 585, 10, 80, 3, 80, 3, 80, 3, 81, 3, 81, 5, 81, 591, 10, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 83, 6, 83, 598, 10, 83, 13, 83, 14, 83, 599, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 93, 3, 93, 3, 94, 3, 94, 3, 95, 3, 95, 3, 96, 6, 96, 655, 10, 96, 13, 96, 14, 96, 656, 3, 97, 3, 97, 3, 97, 6, 97, 662, 10, 97, 13, 97, 14, 97, 663, 3, 98, 3, 98, 3, 98, 6, 98, 669, 10, 98, 13, 98, 14, 98, 670, 3, 99, 3, 99, 3, 99, 6, 99, 676, 10, 99, 13, 99, 14, 99, 677, 3, 100, 3, 100, 3, 101, 3, 101, 3, 102, 3, 102, 3, 103, 3, 103, 3, 104, 3, 104, 5, 104, 690, 10, 104, 3, 104, 3, 104, 3, 104, 5, 104, 695, 10, 104, 3, 105, 5, 105, 698, 10, 105, 3, 105, 3, 105, 3, 105, 3, 105, 3, 105, 5, 105, 705, 10, 105, 3, 106, 3, 106, 5, 106, 709, 10, 106, 3, 106, 3, 106, 3, 107, 6, 107, 714, 10, 107, 13, 107, 14, 107, 715, 3, 108, 3, 108, 3, 109, 6, 109, 721, 10, 109, 13, 109, 14, 109, 722, 3, 110, 3, 110, 5, 110, 727, 10, 110, 3, 111, 3, 111, 3, 111, 5, 111, 732, 10, 111, 3, 112, 3, 112, 3, 112, 3, 113, 3, 113, 3, 113, 5, 113, 740, 10, 113, 3, 113, 5, 113, 743, 10, 113, 3, 114, 3, 114, 3, 114, 3, 114, 6, 114, 749, 10, 114, 13, 114, 14, 114, 750, 3, 115, 6, 115, 754, 10, 115, 13, 115, 14, 115, 755, 3, 116, 3, 116, 5, 116, 760, 10, 116, 3, 117, 6, 117, 763, 10, 117, 13, 117, 14, 117, 764, 3, 118, 3, 118, 5, 118, 769, 10, 118, 3, 119, 6, 119, 772, 10, 119, 13, 119, 14, 119, 773, 3, 120, 3, 120, 5, 120, 778, 10, 120, 3, 121, 6, 121, 781, 10, 121, 13, 121, 14, 121, 782, 3, 122, 3, 122, 5, 122, 787, 10, 122, 3, 123, 7, 123, 790, 10, 123, 12, 123, 14, 123, 793, 11, 123, 3, 255, 2, 2, 124, 5, 2, 4, 7, 2, 5, 9, 2, 6, 11, 2, 7, 13, 2, 8, 15, 2, 9, 17, 2, 10, 19, 2, 11, 21, 2, 12, 23, 2, 13, 25, 2, 14, 27, 2, 15, 29, 2, 16, 31, 2, 17, 33, 2, 18, 35, 2, 19, 37, 2, 20, 39, 2, 21, 41, 2, 22, 43, 2, 23, 45, 2, 24, 47, 2, 25, 49, 2, 26, 51, 2, 27, 53, 2, 28, 55, 2, 29, 57, 2, 30, 59, 2, 31, 61, 2, 32, 63, 2, 33, 65, 2, 34, 67, 2, 35, 69, 2, 36, 71, 2, 37, 73, 2, 38, 75, 2, 39, 77, 2, 40, 79, 2, 41, 81, 2, 42, 83, 2, 43, 85, 2, 44, 87, 2, 45, 89, 2, 46, 91, 2, 47, 93, 2, 48, 95, 2, 49, 97, 2, 50, 99, 2, 51, 101, 2, 52, 103, 2, 53, 105, 2, 54, 107, 2, 55, 109, 2, 56, 111, 2, 57, 113, 2, 58, 115, 2, 59, 117, 2, 60, 119, 2, 61, 121, 2, 62, 123, 2, 63, 125, 2, 64, 127, 2, 65, 129, 2, 66, 131, 2, 67, 133, 2, 68, 135, 2, 69, 137, 2, 70, 139, 2, 71, 141, 2, 72, 143, 2, 73, 145, 2, 74, 147, 2, 75, 149, 2, 76, 151, 2, 77, 153, 2, 78, 155, 2, 79, 157, 2, 80, 159, 2, 81, 161, 2, 82, 163, 2, 83, 165, 2, 84, 167, 2, 85, 169, 2, 86, 171, 2, 87, 173, 2, 88, 175, 2, 2, 177, 2, 89, 179, 2, 90, 181, 2, 2, 183, 2, 91, 185, 2, 92, 187, 2, 2, 189, 2, 2, 191, 2, 2, 193, 2, 2, 195, 2, 2, 197, 2, 2, 199, 2, 2, 201, 2, 2, 203, 2, 2, 205, 2, 2, 207, 2, 2, 209, 2, 2, 211, 2, 2, 213, 2, 2, 215, 2, 2, 217, 2, 2, 219, 2, 2, 221, 2, 2, 223, 2, 2, 225, 2, 2, 227, 2, 2, 229, 2, 2, 231, 2, 2, 233, 2, 2, 235, 2, 2, 237, 2, 2, 239, 2, 2, 241, 2, 2, 243, 2, 2, 245, 2, 2, 247, 2, 2, 5, 2, 3, 4, 20, 6, 2, 11, 11, 13, 14, 34, 34, 162, 162, 5, 2, 12, 12, 15, 15, 8234, 8235, 5, 2, 67, 92, 97, 97, 99, 124, 3, 2, 50, 59, 4, 2, 68, 68, 100, 100, 4, 2, 81, 81, 113, 113, 4, 2, 90, 90, 122, 122, 3, 2, 51, 59, 3, 2, 50, 51, 3, 2, 50, 57, 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 14, 2, 36, 36, 41, 41, 65, 65, 94, 94, 99, 100, 104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 125, 125, 127, 127, 8, 2, 12, 12, 15, 15, 41, 41, 94, 94, 125, 125, 127, 127, 8, 2, 12, 12, 15, 15, 36, 36, 94, 94, 125, 125, 127, 127, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 2, 795, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 3, 175, 3, 2, 2, 2, 3, 177, 3, 2, 2, 2, 3, 179, 3, 2, 2, 2, 4, 181, 3, 2, 2, 2, 4, 183, 3, 2, 2, 2, 4, 185, 3, 2, 2, 2, 5, 249, 3, 2, 2, 2, 7, 263, 3, 2, 2, 2, 9, 270, 3, 2, 2, 2, 11, 282, 3, 2, 2, 2, 13, 288, 3, 2, 2, 2, 15, 292, 3, 2, 2, 2, 17, 295, 3, 2, 2, 2, 19, 299, 3, 2, 2, 2, 21, 306, 3, 2, 2, 2, 23, 311, 3, 2, 2, 2, 25, 319, 3, 2, 2, 2, 27, 325, 3, 2, 2, 2, 29, 334, 3, 2, 2, 2, 31, 337, 3, 2, 2, 2, 33, 343, 3, 2, 2, 2, 35, 346, 3, 2, 2, 2, 37, 351, 3, 2, 2, 2, 39, 355, 3, 2, 2, 2, 41, 360, 3, 2, 2, 2, 43, 364, 3, 2, 2, 2, 45, 371, 3, 2, 2, 2, 47, 376, 3, 2, 2, 2, 49, 379, 3, 2, 2, 2, 51, 385, 3, 2, 2, 2, 53, 395, 3, 2, 2, 2, 55, 407, 3, 2, 2, 2, 57, 412, 3, 2, 2, 2, 59, 418, 3, 2, 2, 2, 61, 425, 3, 2, 2, 2, 63, 429, 3, 2, 2, 2, 65, 435, 3, 2, 2, 2, 67, 443, 3, 2, 2, 2, 69, 448, 3, 2, 2, 2, 71, 453, 3, 2, 2, 2, 73, 463, 3, 2, 2, 2, 75, 465, 3, 2, 2, 2, 77, 467, 3, 2, 2, 2, 79, 469, 3, 2, 2, 2, 81, 471, 3, 2, 2, 2, 83, 473, 3, 2, 2, 2, 85, 475, 3, 2, 2, 2, 87, 477, 3, 2, 2, 2, 89, 479, 3, 2, 2, 2, 91, 484, 3, 2, 2, 2, 93, 486, 3, 2, 2, 2, 95, 488, 3, 2, 2, 2, 97, 490, 3, 2, 2, 2, 99, 493, 3, 2, 2, 2, 101, 495, 3, 2, 2, 2, 103, 498, 3, 2, 2, 2, 105, 500, 3, 2, 2, 2, 107, 502, 3, 2, 2, 2, 109, 504, 3, 2, 2, 2, 111, 507, 3, 2, 2, 2, 113, 510, 3, 2, 2, 2, 115, 513, 3, 2, 2, 2, 117, 515, 3, 2, 2, 2, 119, 517, 3, 2, 2, 2, 121, 520, 3, 2, 2, 2, 123, 523, 3, 2, 2, 2, 125, 526, 3, 2, 2, 2, 127, 529, 3, 2, 2, 2, 129, 532, 3, 2, 2, 2, 131, 535, 3, 2, 2, 2, 133, 538, 3, 2, 2, 2, 135, 540, 3, 2, 2, 2, 137, 543, 3, 2, 2, 2, 139, 545, 3, 2, 2, 2, 141, 548, 3, 2, 2, 2, 143, 550, 3, 2, 2, 2, 145, 552, 3, 2, 2, 2, 147, 554, 3, 2, 2, 2, 149, 556, 3, 2, 2, 2, 151, 559, 3, 2, 2, 2, 153, 562, 3, 2, 2, 2, 155, 566, 3, 2, 2, 2, 157, 568, 3, 2, 2, 2, 159, 580, 3, 2, 2, 2, 161, 582, 3, 2, 2, 2, 163, 588, 3, 2, 2, 2, 165, 594, 3, 2, 2, 2, 167, 597, 3, 2, 2, 2, 169, 603, 3, 2, 2, 2, 171, 607, 3, 2, 2, 2, 173, 614, 3, 2, 2, 2, 175, 621, 3, 2, 2, 2, 177, 627, 3, 2, 2, 2, 179, 632, 3, 2, 2, 2, 181, 634, 3, 2, 2, 2, 183, 640, 3, 2, 2, 2, 185, 645, 3, 2, 2, 2, 187, 647, 3, 2, 2, 2, 189, 649, 3, 2, 2, 2, 191, 651, 3, 2, 2, 2, 193, 654, 3, 2, 2, 2, 195, 658, 3, 2, 2, 2, 197, 665, 3, 2, 2, 2, 199, 672, 3, 2, 2, 2, 201, 679, 3, 2, 2, 2, 203, 681, 3, 2, 2, 2, 205, 683, 3, 2, 2, 2, 207, 685, 3, 2, 2, 2, 209, 694, 3, 2, 2, 2, 211, 704, 3, 2, 2, 2, 213, 706, 3, 2, 2, 2, 215, 713, 3, 2, 2, 2, 217, 717, 3, 2, 2, 2, 219, 720, 3, 2, 2, 2, 221, 726, 3, 2, 2, 2, 223, 731, 3, 2, 2, 2, 225, 733, 3, 2, 2, 2, 227, 736, 3, 2, 2, 2, 229, 744, 3, 2, 2, 2, 231, 753, 3, 2, 2, 2, 233, 759, 3, 2, 2, 2, 235, 762, 3, 2, 2, 2, 237, 768, 3, 2, 2, 2, 239, 771, 3, 2, 2, 2, 241, 777, 3, 2, 2, 2, 243, 780, 3, 2, 2, 2, 245, 786, 3, 2, 2, 2, 247, 791, 3, 2, 2, 2, 249, 250, 7, 49, 2, 2, 250, 251, 7, 44, 2, 2, 251, 255, 3, 2, 2, 2, 252, 254, 11, 2, 2, 2, 253, 252, 3, 2, 2, 2, 254, 257, 3, 2, 2, 2, 255, 256, 3, 2, 2, 2, 255, 253, 3, 2, 2, 2, 256, 258, 3, 2, 2, 2, 257, 255, 3, 2, 2, 2, 258, 259, 7, 44, 2, 2, 259, 260, 7, 49, 2, 2, 260, 261, 3, 2, 2, 2, 261, 262, 8, 2, 2, 2, 262, 6, 3, 2, 2, 2, 263, 264, 7, 49, 2, 2, 264, 265, 7, 49, 2, 2, 265, 266, 3, 2, 2, 2, 266, 267, 5, 247, 123, 2, 267, 268, 3, 2, 2, 2, 268, 269, 8, 3, 2, 2, 269, 8, 3, 2, 2, 2, 270, 271, 7, 37, 2, 2, 271, 272, 7, 114, 2, 2, 272, 273, 7, 116, 2, 2, 273, 274, 7, 99, 2, 2, 274, 275, 7, 105, 2, 2, 275, 276, 7, 111, 2, 2, 276, 277, 7, 99, 2, 2, 277, 278, 3, 2, 2, 2, 278, 279, 5, 247, 123, 2, 279, 280, 3, 2, 2, 2, 280, 281, 8, 4, 3, 2, 281, 10, 3, 2, 2, 2, 282, 283, 7, 101, 2, 2, 283, 284, 7, 113, 2, 2, 284, 285, 7, 112, 2, 2, 285, 286, 7, 117, 2, 2, 286, 287, 7, 118, 2, 2, 287, 12, 3, 2, 2, 2, 288, 289, 7, 120, 2, 2, 289, 290, 7, 99, 2, 2, 290, 291, 7, 116, 2, 2, 291, 14, 3, 2, 2, 2, 292, 293, 7, 99, 2, 2, 293, 294, 7, 117, 2, 2, 294, 16, 3, 2, 2, 2, 295, 296, 7, 48, 2, 2, 296, 297, 7, 48, 2, 2, 297, 298, 7, 48, 2, 2, 298, 18, 3, 2, 2, 2, 299, 300, 7, 117, 2, 2, 300, 301, 7, 121, 2, 2, 301, 302, 7, 107, 2, 2, 302, 303, 7, 118, 2, 2, 303, 304, 7, 101, 2, 2, 304, 305, 7, 106, 2, 2, 305, 20, 3, 2, 2, 2, 306, 307, 7, 101, 2, 2, 307, 308, 7, 99, 2, 2, 308, 309, 7, 117, 2, 2, 309, 310, 7, 103, 2, 2, 310, 22, 3, 2, 2, 2, 311, 312, 7, 102, 2, 2, 312, 313, 7, 103, 2, 2, 313, 314, 7, 104, 2, 2, 314, 315, 7, 99, 2, 2, 315, 316, 7, 119, 2, 2, 316, 317, 7, 110, 2, 2, 317, 318, 7, 118, 2, 2, 318, 24, 3, 2, 2, 2, 319, 320, 7, 100, 2, 2, 320, 321, 7, 116, 2, 2, 321, 322, 7, 103, 2, 2, 322, 323, 7, 99, 2, 2, 323, 324, 7, 109, 2, 2, 324, 26, 3, 2, 2, 2, 325, 326, 7, 101, 2, 2, 326, 327, 7, 113, 2, 2, 327, 328, 7, 112, 2, 2, 328, 329, 7, 118, 2, 2, 329, 330, 7, 107, 2, 2, 330, 331, 7, 112, 2, 2, 331, 332, 7, 119, 2, 2, 332, 333, 7, 103, 2, 2, 333, 28, 3, 2, 2, 2, 334, 335, 7, 102, 2, 2, 335, 336, 7, 113, 2, 2, 336, 30, 3, 2, 2, 2, 337, 338, 7, 121, 2, 2, 338, 339, 7, 106, 2, 2, 339, 340, 7, 107, 2, 2, 340, 341, 7, 110, 2, 2, 341, 342, 7, 103, 2, 2, 342, 32, 3, 2, 2, 2, 343, 344, 7, 107, 2, 2, 344, 345, 7, 104, 2, 2, 345, 34, 3, 2, 2, 2, 346, 347, 7, 103, 2, 2, 347, 348, 7, 110, 2, 2, 348, 349, 7, 117, 2, 2, 349, 350, 7, 103, 2, 2, 350, 36, 3, 2, 2, 2, 351, 352, 7, 104, 2, 2, 352, 353, 7, 113, 2, 2, 353, 354, 7, 116, 2, 2, 354, 38, 3, 2, 2, 2, 355, 356, 7, 103, 2, 2, 356, 357, 7, 112, 2, 2, 357, 358, 7, 119, 2, 2, 358, 359, 7, 111, 2, 2, 359, 40, 3, 2, 2, 2, 360, 361, 7, 102, 2, 2, 361, 362, 7, 103, 2, 2, 362, 363, 7, 104, 2, 2, 363, 42, 3, 2, 2, 2, 364, 365, 7, 116, 2, 2, 365, 366, 7, 103, 2, 2, 366, 367, 7, 118, 2, 2, 367, 368, 7, 119, 2, 2, 368, 369, 7, 116, 2, 2, 369, 370, 7, 112, 2, 2, 370, 44, 3, 2, 2, 2, 371, 372, 7, 101, 2, 2, 372, 373, 7, 99, 2, 2, 373, 374, 7, 110, 2, 2, 374, 375, 7, 110, 2, 2, 375, 46, 3, 2, 2, 2, 376, 377, 7, 47, 2, 2, 377, 378, 7, 64, 2, 2, 378, 48, 3, 2, 2, 2, 379, 380, 7, 101, 2, 2, 380, 381, 7, 110, 2, 2, 381, 382, 7, 99, 2, 2, 382, 383, 7, 117, 2, 2, 383, 384, 7, 117, 2, 2, 384, 50, 3, 2, 2, 2, 385, 386, 7, 107, 2, 2, 386, 387, 7, 112, 2, 2, 387, 388, 7, 118, 2, 2, 388, 389, 7, 103, 2, 2, 389, 390, 7, 116, 2, 2, 390, 391, 7, 104, 2, 2, 391, 392, 7, 99, 2, 2, 392, 393, 7, 101, 2, 2, 393, 394, 7, 103, 2, 2, 394, 52, 3, 2, 2, 2, 395, 396, 7, 101, 2, 2, 396, 397, 7, 113, 2, 2, 397, 398, 7, 112, 2, 2, 398, 399, 7, 117, 2, 2, 399, 400, 7, 118, 2, 2, 400, 401, 7, 116, 2, 2, 401, 402, 7, 119, 2, 2, 402, 403, 7, 101, 2, 2, 403, 404, 7, 118, 2, 2, 404, 405, 7, 113, 2, 2, 405, 406, 7, 116, 2, 2, 406, 54, 3, 2, 2, 2, 407, 408, 7, 118, 2, 2, 408, 409, 7, 116, 2, 2, 409, 410, 7, 119, 2, 2, 410, 411, 7, 103, 2, 2, 411, 56, 3, 2, 2, 2, 412, 413, 7, 104, 2, 2, 413, 414, 7, 99, 2, 2, 414, 415, 7, 110, 2, 2, 415, 416, 7, 117, 2, 2, 416, 417, 7, 103, 2, 2, 417, 58, 3, 2, 2, 2, 418, 419, 7, 118, 2, 2, 419, 420, 7, 123, 2, 2, 420, 421, 7, 114, 2, 2, 421, 422, 7, 103, 2, 2, 422, 423, 7, 113, 2, 2, 423, 424, 7, 104, 2, 2, 424, 60, 3, 2, 2, 2, 425, 426, 7, 118, 2, 2, 426, 427, 7, 116, 2, 2, 427, 428, 7, 123, 2, 2, 428, 62, 3, 2, 2, 2, 429, 430, 7, 101, 2, 2, 430, 431, 7, 99, 2, 2, 431, 432, 7, 118, 2, 2, 432, 433, 7, 101, 2, 2, 433, 434, 7, 106, 2, 2, 434, 64, 3, 2, 2, 2, 435, 436, 7, 104, 2, 2, 436, 437, 7, 107, 2, 2, 437, 438, 7, 112, 2, 2, 438, 439, 7, 99, 2, 2, 439, 440, 7, 110, 2, 2, 440, 441, 7, 110, 2, 2, 441, 442, 7, 123, 2, 2, 442, 66, 3, 2, 2, 2, 443, 444, 7, 120, 2, 2, 444, 445, 7, 113, 2, 2, 445, 446, 7, 107, 2, 2, 446, 447, 7, 102, 2, 2, 447, 68, 3, 2, 2, 2, 448, 449, 7, 112, 2, 2, 449, 450, 7, 119, 2, 2, 450, 451, 7, 110, 2, 2, 451, 452, 7, 110, 2, 2, 452, 70, 3, 2, 2, 2, 453, 454, 7, 119, 2, 2, 454, 455, 7, 112, 2, 2, 455, 456, 7, 102, 2, 2, 456, 457, 7, 103, 2, 2, 457, 458, 7, 104, 2, 2, 458, 459, 7, 107, 2, 2, 459, 460, 7, 112, 2, 2, 460, 461, 7, 103, 2, 2, 461, 462, 7, 102, 2, 2, 462, 72, 3, 2, 2, 2, 463, 464, 7, 46, 2, 2, 464, 74, 3, 2, 2, 2, 465, 466, 7, 61, 2, 2, 466, 76, 3, 2, 2, 2, 467, 468, 7, 65, 2, 2, 468, 78, 3, 2, 2, 2, 469, 470, 7, 60, 2, 2, 470, 80, 3, 2, 2, 2, 471, 472, 7, 42, 2, 2, 472, 82, 3, 2, 2, 2, 473, 474, 7, 43, 2, 2, 474, 84, 3, 2, 2, 2, 475, 476, 7, 93, 2, 2, 476, 86, 3, 2, 2, 2, 477, 478, 7, 95, 2, 2, 478, 88, 3, 2, 2, 2, 479, 480, 6, 44, 2, 2, 480, 481, 7, 127, 2, 2, 481, 482, 3, 2, 2, 2, 482, 483, 8, 44, 4, 2, 483, 90, 3, 2, 2, 2, 484, 485, 7, 125, 2, 2, 485, 92, 3, 2, 2, 2, 486, 487, 7, 127, 2, 2, 487, 94, 3, 2, 2, 2, 488, 489, 7, 45, 2, 2, 489, 96, 3, 2, 2, 2, 490, 491, 7, 45, 2, 2, 491, 492, 7, 45, 2, 2, 492, 98, 3, 2, 2, 2, 493, 494, 7, 47, 2, 2, 494, 100, 3, 2, 2, 2, 495, 496, 7, 47, 2, 2, 496, 497, 7, 47, 2, 2, 497, 102, 3, 2, 2, 2, 498, 499, 7, 44, 2, 2, 499, 104, 3, 2, 2, 2, 500, 501, 7, 49, 2, 2, 501, 106, 3, 2, 2, 2, 502, 503, 7, 39, 2, 2, 503, 108, 3, 2, 2, 2, 504, 505, 7, 44, 2, 2, 505, 506, 7, 44, 2, 2, 506, 110, 3, 2, 2, 2, 507, 508, 7, 40, 2, 2, 508, 509, 7, 40, 2, 2, 509, 112, 3, 2, 2, 2, 510, 511, 7, 126, 2, 2, 511, 512, 7, 126, 2, 2, 512, 114, 3, 2, 2, 2, 513, 514, 7, 35, 2, 2, 514, 116, 3, 2, 2, 2, 515, 516, 7, 63, 2, 2, 516, 118, 3, 2, 2, 2, 517, 518, 7, 45, 2, 2, 518, 519, 7, 63, 2, 2, 519, 120, 3, 2, 2, 2, 520, 521, 7, 47, 2, 2, 521, 522, 7, 63, 2, 2, 522, 122, 3, 2, 2, 2, 523, 524, 7, 44, 2, 2, 524, 525, 7, 63, 2, 2, 525, 124, 3, 2, 2, 2, 526, 527, 7, 49, 2, 2, 527, 528, 7, 63, 2, 2, 528, 126, 3, 2, 2, 2, 529, 530, 7, 39, 2, 2, 530, 531, 7, 63, 2, 2, 531, 128, 3, 2, 2, 2, 532, 533, 7, 63, 2, 2, 533, 534, 7, 63, 2, 2, 534, 130, 3, 2, 2, 2, 535, 536, 7, 35, 2, 2, 536, 537, 7, 63, 2, 2, 537, 132, 3, 2, 2, 2, 538, 539, 7, 62, 2, 2, 539, 134, 3, 2, 2, 2, 540, 541, 7, 62, 2, 2, 541, 542, 7, 63, 2, 2, 542, 136, 3, 2, 2, 2, 543, 544, 7, 64, 2, 2, 544, 138, 3, 2, 2, 2, 545, 546, 7, 64, 2, 2, 546, 547, 7, 63, 2, 2, 547, 140, 3, 2, 2, 2, 548, 549, 7, 40, 2, 2, 549, 142, 3, 2, 2, 2, 550, 551, 7, 126, 2, 2, 551, 144, 3, 2, 2, 2, 552, 553, 7, 96, 2, 2, 553, 146, 3, 2, 2, 2, 554, 555, 7, 128, 2, 2, 555, 148, 3, 2, 2, 2, 556, 557, 7, 62, 2, 2, 557, 558, 7, 62, 2, 2, 558, 150, 3, 2, 2, 2, 559, 560, 7, 64, 2, 2, 560, 561, 7, 64, 2, 2, 561, 152, 3, 2, 2, 2, 562, 563, 7, 64, 2, 2, 563, 564, 7, 64, 2, 2, 564, 565, 7, 64, 2, 2, 565, 154, 3, 2, 2, 2, 566, 567, 7, 48, 2, 2, 567, 156, 3, 2, 2, 2, 568, 573, 5, 187, 93, 2, 569, 572, 5, 187, 93, 2, 570, 572, 5, 191, 95, 2, 571, 569, 3, 2, 2, 2, 571, 570, 3, 2, 2, 2, 572, 575, 3, 2, 2, 2, 573, 571, 3, 2, 2, 2, 573, 574, 3, 2, 2, 2, 574, 158, 3, 2, 2, 2, 575, 573, 3, 2, 2, 2, 576, 581, 5, 193, 96, 2, 577, 581, 5, 197, 98, 2, 578, 581, 5, 199, 99, 2, 579, 581, 5, 195, 97, 2, 580, 576, 3, 2, 2, 2, 580, 577, 3, 2, 2, 2, 580, 578, 3, 2, 2, 2, 580, 579, 3, 2, 2, 2, 581, 160, 3, 2, 2, 2, 582, 584, 7, 41, 2, 2, 583, 585, 5, 239, 119, 2, 584, 583, 3, 2, 2, 2, 584, 585, 3, 2, 2, 2, 585, 586, 3, 2, 2, 2, 586, 587, 7, 41, 2, 2, 587, 162, 3, 2, 2, 2, 588, 590, 7, 36, 2, 2, 589, 591, 5, 243, 121, 2, 590, 589, 3, 2, 2, 2, 590, 591, 3, 2, 2, 2, 591, 592, 3, 2, 2, 2, 592, 593, 7, 36, 2, 2, 593, 164, 3, 2, 2, 2, 594, 595, 5, 209, 104, 2, 595, 166, 3, 2, 2, 2, 596, 598, 9, 2, 2, 2, 597, 596, 3, 2, 2, 2, 598, 599, 3, 2, 2, 2, 599, 597, 3, 2, 2, 2, 599, 600, 3, 2, 2, 2, 600, 601, 3, 2, 2, 2, 601, 602, 8, 83, 5, 2, 602, 168, 3, 2, 2, 2, 603, 604, 9, 3, 2, 2, 604, 605, 3, 2, 2, 2, 605, 606, 8, 84, 5, 2, 606, 170, 3, 2, 2, 2, 607, 608, 7, 104, 2, 2, 608, 609, 7, 41, 2, 2, 609, 610, 3, 2, 2, 2, 610, 611, 8, 85, 6, 2, 611, 612, 3, 2, 2, 2, 612, 613, 8, 85, 7, 2, 613, 172, 3, 2, 2, 2, 614, 615, 7, 104, 2, 2, 615, 616, 7, 36, 2, 2, 616, 617, 3, 2, 2, 2, 617, 618, 8, 86, 8, 2, 618, 619, 3, 2, 2, 2, 619, 620, 8, 86, 9, 2, 620, 174, 3, 2, 2, 2, 621, 622, 6, 87, 3, 2, 622, 623, 7, 125, 2, 2, 623, 624, 3, 2, 2, 2, 624, 625, 8, 87, 10, 2, 625, 626, 8, 87, 11, 2, 626, 176, 3, 2, 2, 2, 627, 628, 7, 41, 2, 2, 628, 629, 8, 88, 12, 2, 629, 630, 3, 2, 2, 2, 630, 631, 8, 88, 4, 2, 631, 178, 3, 2, 2, 2, 632, 633, 5, 231, 115, 2, 633, 180, 3, 2, 2, 2, 634, 635, 6, 90, 4, 2, 635, 636, 7, 125, 2, 2, 636, 637, 3, 2, 2, 2, 637, 638, 8, 90, 10, 2, 638, 639, 8, 90, 11, 2, 639, 182, 3, 2, 2, 2, 640, 641, 7, 36, 2, 2, 641, 642, 8, 91, 13, 2, 642, 643, 3, 2, 2, 2, 643, 644, 8, 91, 4, 2, 644, 184, 3, 2, 2, 2, 645, 646, 5, 235, 117, 2, 646, 186, 3, 2, 2, 2, 647, 648, 5, 189, 94, 2, 648, 188, 3, 2, 2, 2, 649, 650, 9, 4, 2, 2, 650, 190, 3, 2, 2, 2, 651, 652, 9, 5, 2, 2, 652, 192, 3, 2, 2, 2, 653, 655, 5, 191, 95, 2, 654, 653, 3, 2, 2, 2, 655, 656, 3, 2, 2, 2, 656, 654, 3, 2, 2, 2, 656, 657, 3, 2, 2, 2, 657, 194, 3, 2, 2, 2, 658, 659, 7, 50, 2, 2, 659, 661, 9, 6, 2, 2, 660, 662, 5, 203, 101, 2, 661, 660, 3, 2, 2, 2, 662, 663, 3, 2, 2, 2, 663, 661, 3, 2, 2, 2, 663, 664, 3, 2, 2, 2, 664, 196, 3, 2, 2, 2, 665, 666, 7, 50, 2, 2, 666, 668, 9, 7, 2, 2, 667, 669, 5, 205, 102, 2, 668, 667, 3, 2, 2, 2, 669, 670, 3, 2, 2, 2, 670, 668, 3, 2, 2, 2, 670, 671, 3, 2, 2, 2, 671, 198, 3, 2, 2, 2, 672, 673, 7, 50, 2, 2, 673, 675, 9, 8, 2, 2, 674, 676, 5, 207, 103, 2, 675, 674, 3, 2, 2, 2, 676, 677, 3, 2, 2, 2, 677, 675, 3, 2, 2, 2, 677, 678, 3, 2, 2, 2, 678, 200, 3, 2, 2, 2, 679, 680, 9, 9, 2, 2, 680, 202, 3, 2, 2, 2, 681, 682, 9, 10, 2, 2, 682, 204, 3, 2, 2, 2, 683, 684, 9, 11, 2, 2, 684, 206, 3, 2, 2, 2, 685, 686, 9, 12, 2, 2, 686, 208, 3, 2, 2, 2, 687, 689, 5, 211, 105, 2, 688, 690, 5, 213, 106, 2, 689, 688, 3, 2, 2, 2, 689, 690, 3, 2, 2, 2, 690, 695, 3, 2, 2, 2, 691, 692, 5, 215, 107, 2, 692, 693, 5, 213, 106, 2, 693, 695, 3, 2, 2, 2, 694, 687, 3, 2, 2, 2, 694, 691, 3, 2, 2, 2, 695, 210, 3, 2, 2, 2, 696, 698, 5, 215, 107, 2, 697, 696, 3, 2, 2, 2, 697, 698, 3, 2, 2, 2, 698, 699, 3, 2, 2, 2, 699, 700, 7, 48, 2, 2, 700, 705, 5, 215, 107, 2, 701, 702, 5, 215, 107, 2, 702, 703, 7, 48, 2, 2, 703, 705, 3, 2, 2, 2, 704, 697, 3, 2, 2, 2, 704, 701, 3, 2, 2, 2, 705, 212, 3, 2, 2, 2, 706, 708, 9, 13, 2, 2, 707, 709, 5, 217, 108, 2, 708, 707, 3, 2, 2, 2, 708, 709, 3, 2, 2, 2, 709, 710, 3, 2, 2, 2, 710, 711, 5, 215, 107, 2, 711, 214, 3, 2, 2, 2, 712, 714, 5, 191, 95, 2, 713, 712, 3, 2, 2, 2, 714, 715, 3, 2, 2, 2, 715, 713, 3, 2, 2, 2, 715, 716, 3, 2, 2, 2, 716, 216, 3, 2, 2, 2, 717, 718, 9, 14, 2, 2, 718, 218, 3, 2, 2, 2, 719, 721, 5, 221, 110, 2, 720, 719, 3, 2, 2, 2, 721, 722, 3, 2, 2, 2, 722, 720, 3, 2, 2, 2, 722, 723, 3, 2, 2, 2, 723, 220, 3, 2, 2, 2, 724, 727, 10, 15, 2, 2, 725, 727, 5, 223, 111, 2, 726, 724, 3, 2, 2, 2, 726, 725, 3, 2, 2, 2, 727, 222, 3, 2, 2, 2, 728, 732, 5, 225, 112, 2, 729, 732, 5, 227, 113, 2, 730, 732, 5, 229, 114, 2, 731, 728, 3, 2, 2, 2, 731, 729, 3, 2, 2, 2, 731, 730, 3, 2, 2, 2, 732, 224, 3, 2, 2, 2, 733, 734, 7, 94, 2, 2, 734, 735, 9, 16, 2, 2, 735, 226, 3, 2, 2, 2, 736, 737, 7, 94, 2, 2, 737, 739, 5, 205, 102, 2, 738, 740, 5, 205, 102, 2, 739, 738, 3, 2, 2, 2, 739, 740, 3, 2, 2, 2, 740, 742, 3, 2, 2, 2, 741, 743, 5, 205, 102, 2, 742, 741, 3, 2, 2, 2, 742, 743, 3, 2, 2, 2, 743, 228, 3, 2, 2, 2, 744, 745, 7, 94, 2, 2, 745, 746, 7, 122, 2, 2, 746, 748, 3, 2, 2, 2, 747, 749, 5, 207, 103, 2, 748, 747, 3, 2, 2, 2, 749, 750, 3, 2, 2, 2, 750, 748, 3, 2, 2, 2, 750, 751, 3, 2, 2, 2, 751, 230, 3, 2, 2, 2, 752, 754, 5, 233, 116, 2, 753, 752, 3, 2, 2, 2, 754, 755, 3, 2, 2, 2, 755, 753, 3, 2, 2, 2, 755, 756, 3, 2, 2, 2, 756, 232, 3, 2, 2, 2, 757, 760, 10, 17, 2, 2, 758, 760, 5, 223, 111, 2, 759, 757, 3, 2, 2, 2, 759, 758, 3, 2, 2, 2, 760, 234, 3, 2, 2, 2, 761, 763, 5, 237, 118, 2, 762, 761, 3, 2, 2, 2, 763, 764, 3, 2, 2, 2, 764, 762, 3, 2, 2, 2, 764, 765, 3, 2, 2, 2, 765, 236, 3, 2, 2, 2, 766, 769, 10, 18, 2, 2, 767, 769, 5, 223, 111, 2, 768, 766, 3, 2, 2, 2, 768, 767, 3, 2, 2, 2, 769, 238, 3, 2, 2, 2, 770, 772, 5, 241, 120, 2, 771, 770, 3, 2, 2, 2, 772, 773, 3, 2, 2, 2, 773, 771, 3, 2, 2, 2, 773, 774, 3, 2, 2, 2, 774, 240, 3, 2, 2, 2, 775, 778, 10, 15, 2, 2, 776, 778, 5, 223, 111, 2, 777, 775, 3, 2, 2, 2, 777, 776, 3, 2, 2, 2, 778, 242, 3, 2, 2, 2, 779, 781, 5, 245, 122, 2, 780, 779, 3, 2, 2, 2, 781, 782, 3, 2, 2, 2, 782, 780, 3, 2, 2, 2, 782, 783, 3, 2, 2, 2, 783, 244, 3, 2, 2, 2, 784, 787, 10, 19, 2, 2, 785, 787, 5, 223, 111, 2, 786, 784, 3, 2, 2, 2, 786, 785, 3, 2, 2, 2, 787, 246, 3, 2, 2, 2, 788, 790, 10, 3, 2, 2, 789, 788, 3, 2, 2, 2, 790, 793, 3, 2, 2, 2, 791, 789, 3, 2, 2, 2, 791, 792, 3, 2, 2, 2, 792, 248, 3, 2, 2, 2, 793, 791, 3, 2, 2, 2, 37, 2, 3, 4, 255, 571, 573, 580, 584, 590, 599, 656, 663, 670, 677, 689, 694, 697, 704, 708, 715, 722, 726, 731, 739, 742, 750, 755, 759, 764, 768, 773, 777, 782, 786, 791, 14, 2, 4, 2, 2, 5, 2, 6, 2, 2, 2, 3, 2, 3, 85, 2, 7, 3, 2, 3, 86, 3, 7, 4, 2, 9, 3, 2, 7, 2, 2, 3, 88, 4, 3, 91, 5]
\ No newline at end of file
+[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 95, 823, 8, 1, 8, 1, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 260, 10, 2, 12, 2, 14, 2, 263, 11, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 40, 3, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 43, 3, 43, 3, 44, 3, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 74, 3, 74, 3, 75, 3, 75, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 7, 81, 601, 10, 81, 12, 81, 14, 81, 604, 11, 81, 3, 82, 3, 82, 3, 82, 3, 82, 5, 82, 610, 10, 82, 3, 83, 3, 83, 5, 83, 614, 10, 83, 3, 83, 3, 83, 3, 84, 3, 84, 5, 84, 620, 10, 84, 3, 84, 3, 84, 3, 85, 3, 85, 3, 86, 6, 86, 627, 10, 86, 13, 86, 14, 86, 628, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 95, 3, 95, 3, 96, 3, 96, 3, 97, 3, 97, 3, 98, 3, 98, 3, 99, 6, 99, 684, 10, 99, 13, 99, 14, 99, 685, 3, 100, 3, 100, 3, 100, 6, 100, 691, 10, 100, 13, 100, 14, 100, 692, 3, 101, 3, 101, 3, 101, 6, 101, 698, 10, 101, 13, 101, 14, 101, 699, 3, 102, 3, 102, 3, 102, 6, 102, 705, 10, 102, 13, 102, 14, 102, 706, 3, 103, 3, 103, 3, 104, 3, 104, 3, 105, 3, 105, 3, 106, 3, 106, 3, 107, 3, 107, 5, 107, 719, 10, 107, 3, 107, 3, 107, 3, 107, 5, 107, 724, 10, 107, 3, 108, 5, 108, 727, 10, 108, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 5, 108, 734, 10, 108, 3, 109, 3, 109, 5, 109, 738, 10, 109, 3, 109, 3, 109, 3, 110, 6, 110, 743, 10, 110, 13, 110, 14, 110, 744, 3, 111, 3, 111, 3, 112, 6, 112, 750, 10, 112, 13, 112, 14, 112, 751, 3, 113, 3, 113, 5, 113, 756, 10, 113, 3, 114, 3, 114, 3, 114, 5, 114, 761, 10, 114, 3, 115, 3, 115, 3, 115, 3, 116, 3, 116, 3, 116, 5, 116, 769, 10, 116, 3, 116, 5, 116, 772, 10, 116, 3, 117, 3, 117, 3, 117, 3, 117, 6, 117, 778, 10, 117, 13, 117, 14, 117, 779, 3, 118, 6, 118, 783, 10, 118, 13, 118, 14, 118, 784, 3, 119, 3, 119, 5, 119, 789, 10, 119, 3, 120, 6, 120, 792, 10, 120, 13, 120, 14, 120, 793, 3, 121, 3, 121, 5, 121, 798, 10, 121, 3, 122, 6, 122, 801, 10, 122, 13, 122, 14, 122, 802, 3, 123, 3, 123, 5, 123, 807, 10, 123, 3, 124, 6, 124, 810, 10, 124, 13, 124, 14, 124, 811, 3, 125, 3, 125, 5, 125, 816, 10, 125, 3, 126, 7, 126, 819, 10, 126, 12, 126, 14, 126, 822, 11, 126, 3, 261, 2, 2, 127, 5, 2, 4, 7, 2, 5, 9, 2, 6, 11, 2, 7, 13, 2, 8, 15, 2, 9, 17, 2, 10, 19, 2, 11, 21, 2, 12, 23, 2, 13, 25, 2, 14, 27, 2, 15, 29, 2, 16, 31, 2, 17, 33, 2, 18, 35, 2, 19, 37, 2, 20, 39, 2, 21, 41, 2, 22, 43, 2, 23, 45, 2, 24, 47, 2, 25, 49, 2, 26, 51, 2, 27, 53, 2, 28, 55, 2, 29, 57, 2, 30, 59, 2, 31, 61, 2, 32, 63, 2, 33, 65, 2, 34, 67, 2, 35, 69, 2, 36, 71, 2, 37, 73, 2, 38, 75, 2, 39, 77, 2, 40, 79, 2, 41, 81, 2, 42, 83, 2, 43, 85, 2, 44, 87, 2, 45, 89, 2, 46, 91, 2, 47, 93, 2, 48, 95, 2, 49, 97, 2, 50, 99, 2, 51, 101, 2, 52, 103, 2, 53, 105, 2, 54, 107, 2, 55, 109, 2, 56, 111, 2, 57, 113, 2, 58, 115, 2, 59, 117, 2, 60, 119, 2, 61, 121, 2, 62, 123, 2, 63, 125, 2, 64, 127, 2, 65, 129, 2, 66, 131, 2, 67, 133, 2, 68, 135, 2, 69, 137, 2, 70, 139, 2, 71, 141, 2, 72, 143, 2, 73, 145, 2, 74, 147, 2, 75, 149, 2, 76, 151, 2, 77, 153, 2, 78, 155, 2, 79, 157, 2, 80, 159, 2, 81, 161, 2, 82, 163, 2, 83, 165, 2, 84, 167, 2, 85, 169, 2, 86, 171, 2, 87, 173, 2, 88, 175, 2, 89, 177, 2, 90, 179, 2, 91, 181, 2, 2, 183, 2, 92, 185, 2, 93, 187, 2, 2, 189, 2, 94, 191, 2, 95, 193, 2, 2, 195, 2, 2, 197, 2, 2, 199, 2, 2, 201, 2, 2, 203, 2, 2, 205, 2, 2, 207, 2, 2, 209, 2, 2, 211, 2, 2, 213, 2, 2, 215, 2, 2, 217, 2, 2, 219, 2, 2, 221, 2, 2, 223, 2, 2, 225, 2, 2, 227, 2, 2, 229, 2, 2, 231, 2, 2, 233, 2, 2, 235, 2, 2, 237, 2, 2, 239, 2, 2, 241, 2, 2, 243, 2, 2, 245, 2, 2, 247, 2, 2, 249, 2, 2, 251, 2, 2, 253, 2, 2, 5, 2, 3, 4, 20, 6, 2, 11, 11, 13, 14, 34, 34, 162, 162, 5, 2, 12, 12, 15, 15, 8234, 8235, 5, 2, 67, 92, 97, 97, 99, 124, 3, 2, 50, 59, 4, 2, 68, 68, 100, 100, 4, 2, 81, 81, 113, 113, 4, 2, 90, 90, 122, 122, 3, 2, 51, 59, 3, 2, 50, 51, 3, 2, 50, 57, 5, 2, 50, 59, 67, 72, 99, 104, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 14, 2, 36, 36, 41, 41, 65, 65, 94, 94, 99, 100, 104, 104, 112, 112, 116, 116, 118, 118, 120, 120, 125, 125, 127, 127, 8, 2, 12, 12, 15, 15, 41, 41, 94, 94, 125, 125, 127, 127, 8, 2, 12, 12, 15, 15, 36, 36, 94, 94, 125, 125, 127, 127, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 2, 824, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 3, 181, 3, 2, 2, 2, 3, 183, 3, 2, 2, 2, 3, 185, 3, 2, 2, 2, 4, 187, 3, 2, 2, 2, 4, 189, 3, 2, 2, 2, 4, 191, 3, 2, 2, 2, 5, 255, 3, 2, 2, 2, 7, 269, 3, 2, 2, 2, 9, 276, 3, 2, 2, 2, 11, 288, 3, 2, 2, 2, 13, 299, 3, 2, 2, 2, 15, 305, 3, 2, 2, 2, 17, 309, 3, 2, 2, 2, 19, 312, 3, 2, 2, 2, 21, 316, 3, 2, 2, 2, 23, 323, 3, 2, 2, 2, 25, 328, 3, 2, 2, 2, 27, 336, 3, 2, 2, 2, 29, 342, 3, 2, 2, 2, 31, 351, 3, 2, 2, 2, 33, 354, 3, 2, 2, 2, 35, 360, 3, 2, 2, 2, 37, 363, 3, 2, 2, 2, 39, 368, 3, 2, 2, 2, 41, 372, 3, 2, 2, 2, 43, 377, 3, 2, 2, 2, 45, 381, 3, 2, 2, 2, 47, 388, 3, 2, 2, 2, 49, 393, 3, 2, 2, 2, 51, 396, 3, 2, 2, 2, 53, 402, 3, 2, 2, 2, 55, 412, 3, 2, 2, 2, 57, 424, 3, 2, 2, 2, 59, 428, 3, 2, 2, 2, 61, 433, 3, 2, 2, 2, 63, 439, 3, 2, 2, 2, 65, 447, 3, 2, 2, 2, 67, 454, 3, 2, 2, 2, 69, 458, 3, 2, 2, 2, 71, 464, 3, 2, 2, 2, 73, 472, 3, 2, 2, 2, 75, 477, 3, 2, 2, 2, 77, 482, 3, 2, 2, 2, 79, 492, 3, 2, 2, 2, 81, 494, 3, 2, 2, 2, 83, 496, 3, 2, 2, 2, 85, 498, 3, 2, 2, 2, 87, 500, 3, 2, 2, 2, 89, 502, 3, 2, 2, 2, 91, 504, 3, 2, 2, 2, 93, 506, 3, 2, 2, 2, 95, 508, 3, 2, 2, 2, 97, 513, 3, 2, 2, 2, 99, 515, 3, 2, 2, 2, 101, 517, 3, 2, 2, 2, 103, 519, 3, 2, 2, 2, 105, 522, 3, 2, 2, 2, 107, 524, 3, 2, 2, 2, 109, 527, 3, 2, 2, 2, 111, 529, 3, 2, 2, 2, 113, 531, 3, 2, 2, 2, 115, 533, 3, 2, 2, 2, 117, 536, 3, 2, 2, 2, 119, 539, 3, 2, 2, 2, 121, 542, 3, 2, 2, 2, 123, 544, 3, 2, 2, 2, 125, 546, 3, 2, 2, 2, 127, 549, 3, 2, 2, 2, 129, 552, 3, 2, 2, 2, 131, 555, 3, 2, 2, 2, 133, 558, 3, 2, 2, 2, 135, 561, 3, 2, 2, 2, 137, 564, 3, 2, 2, 2, 139, 567, 3, 2, 2, 2, 141, 569, 3, 2, 2, 2, 143, 572, 3, 2, 2, 2, 145, 574, 3, 2, 2, 2, 147, 577, 3, 2, 2, 2, 149, 579, 3, 2, 2, 2, 151, 581, 3, 2, 2, 2, 153, 583, 3, 2, 2, 2, 155, 585, 3, 2, 2, 2, 157, 588, 3, 2, 2, 2, 159, 591, 3, 2, 2, 2, 161, 595, 3, 2, 2, 2, 163, 597, 3, 2, 2, 2, 165, 609, 3, 2, 2, 2, 167, 611, 3, 2, 2, 2, 169, 617, 3, 2, 2, 2, 171, 623, 3, 2, 2, 2, 173, 626, 3, 2, 2, 2, 175, 632, 3, 2, 2, 2, 177, 636, 3, 2, 2, 2, 179, 643, 3, 2, 2, 2, 181, 650, 3, 2, 2, 2, 183, 656, 3, 2, 2, 2, 185, 661, 3, 2, 2, 2, 187, 663, 3, 2, 2, 2, 189, 669, 3, 2, 2, 2, 191, 674, 3, 2, 2, 2, 193, 676, 3, 2, 2, 2, 195, 678, 3, 2, 2, 2, 197, 680, 3, 2, 2, 2, 199, 683, 3, 2, 2, 2, 201, 687, 3, 2, 2, 2, 203, 694, 3, 2, 2, 2, 205, 701, 3, 2, 2, 2, 207, 708, 3, 2, 2, 2, 209, 710, 3, 2, 2, 2, 211, 712, 3, 2, 2, 2, 213, 714, 3, 2, 2, 2, 215, 723, 3, 2, 2, 2, 217, 733, 3, 2, 2, 2, 219, 735, 3, 2, 2, 2, 221, 742, 3, 2, 2, 2, 223, 746, 3, 2, 2, 2, 225, 749, 3, 2, 2, 2, 227, 755, 3, 2, 2, 2, 229, 760, 3, 2, 2, 2, 231, 762, 3, 2, 2, 2, 233, 765, 3, 2, 2, 2, 235, 773, 3, 2, 2, 2, 237, 782, 3, 2, 2, 2, 239, 788, 3, 2, 2, 2, 241, 791, 3, 2, 2, 2, 243, 797, 3, 2, 2, 2, 245, 800, 3, 2, 2, 2, 247, 806, 3, 2, 2, 2, 249, 809, 3, 2, 2, 2, 251, 815, 3, 2, 2, 2, 253, 820, 3, 2, 2, 2, 255, 256, 7, 49, 2, 2, 256, 257, 7, 44, 2, 2, 257, 261, 3, 2, 2, 2, 258, 260, 11, 2, 2, 2, 259, 258, 3, 2, 2, 2, 260, 263, 3, 2, 2, 2, 261, 262, 3, 2, 2, 2, 261, 259, 3, 2, 2, 2, 262, 264, 3, 2, 2, 2, 263, 261, 3, 2, 2, 2, 264, 265, 7, 44, 2, 2, 265, 266, 7, 49, 2, 2, 266, 267, 3, 2, 2, 2, 267, 268, 8, 2, 2, 2, 268, 6, 3, 2, 2, 2, 269, 270, 7, 49, 2, 2, 270, 271, 7, 49, 2, 2, 271, 272, 3, 2, 2, 2, 272, 273, 5, 253, 126, 2, 273, 274, 3, 2, 2, 2, 274, 275, 8, 3, 2, 2, 275, 8, 3, 2, 2, 2, 276, 277, 7, 37, 2, 2, 277, 278, 7, 114, 2, 2, 278, 279, 7, 116, 2, 2, 279, 280, 7, 99, 2, 2, 280, 281, 7, 105, 2, 2, 281, 282, 7, 111, 2, 2, 282, 283, 7, 99, 2, 2, 283, 284, 3, 2, 2, 2, 284, 285, 5, 253, 126, 2, 285, 286, 3, 2, 2, 2, 286, 287, 8, 4, 3, 2, 287, 10, 3, 2, 2, 2, 288, 289, 7, 107, 2, 2, 289, 290, 7, 112, 2, 2, 290, 291, 7, 117, 2, 2, 291, 292, 7, 118, 2, 2, 292, 293, 7, 99, 2, 2, 293, 294, 7, 112, 2, 2, 294, 295, 7, 101, 2, 2, 295, 296, 7, 103, 2, 2, 296, 297, 7, 113, 2, 2, 297, 298, 7, 104, 2, 2, 298, 12, 3, 2, 2, 2, 299, 300, 7, 101, 2, 2, 300, 301, 7, 113, 2, 2, 301, 302, 7, 112, 2, 2, 302, 303, 7, 117, 2, 2, 303, 304, 7, 118, 2, 2, 304, 14, 3, 2, 2, 2, 305, 306, 7, 120, 2, 2, 306, 307, 7, 99, 2, 2, 307, 308, 7, 116, 2, 2, 308, 16, 3, 2, 2, 2, 309, 310, 7, 99, 2, 2, 310, 311, 7, 117, 2, 2, 311, 18, 3, 2, 2, 2, 312, 313, 7, 48, 2, 2, 313, 314, 7, 48, 2, 2, 314, 315, 7, 48, 2, 2, 315, 20, 3, 2, 2, 2, 316, 317, 7, 117, 2, 2, 317, 318, 7, 121, 2, 2, 318, 319, 7, 107, 2, 2, 319, 320, 7, 118, 2, 2, 320, 321, 7, 101, 2, 2, 321, 322, 7, 106, 2, 2, 322, 22, 3, 2, 2, 2, 323, 324, 7, 101, 2, 2, 324, 325, 7, 99, 2, 2, 325, 326, 7, 117, 2, 2, 326, 327, 7, 103, 2, 2, 327, 24, 3, 2, 2, 2, 328, 329, 7, 102, 2, 2, 329, 330, 7, 103, 2, 2, 330, 331, 7, 104, 2, 2, 331, 332, 7, 99, 2, 2, 332, 333, 7, 119, 2, 2, 333, 334, 7, 110, 2, 2, 334, 335, 7, 118, 2, 2, 335, 26, 3, 2, 2, 2, 336, 337, 7, 100, 2, 2, 337, 338, 7, 116, 2, 2, 338, 339, 7, 103, 2, 2, 339, 340, 7, 99, 2, 2, 340, 341, 7, 109, 2, 2, 341, 28, 3, 2, 2, 2, 342, 343, 7, 101, 2, 2, 343, 344, 7, 113, 2, 2, 344, 345, 7, 112, 2, 2, 345, 346, 7, 118, 2, 2, 346, 347, 7, 107, 2, 2, 347, 348, 7, 112, 2, 2, 348, 349, 7, 119, 2, 2, 349, 350, 7, 103, 2, 2, 350, 30, 3, 2, 2, 2, 351, 352, 7, 102, 2, 2, 352, 353, 7, 113, 2, 2, 353, 32, 3, 2, 2, 2, 354, 355, 7, 121, 2, 2, 355, 356, 7, 106, 2, 2, 356, 357, 7, 107, 2, 2, 357, 358, 7, 110, 2, 2, 358, 359, 7, 103, 2, 2, 359, 34, 3, 2, 2, 2, 360, 361, 7, 107, 2, 2, 361, 362, 7, 104, 2, 2, 362, 36, 3, 2, 2, 2, 363, 364, 7, 103, 2, 2, 364, 365, 7, 110, 2, 2, 365, 366, 7, 117, 2, 2, 366, 367, 7, 103, 2, 2, 367, 38, 3, 2, 2, 2, 368, 369, 7, 104, 2, 2, 369, 370, 7, 113, 2, 2, 370, 371, 7, 116, 2, 2, 371, 40, 3, 2, 2, 2, 372, 373, 7, 103, 2, 2, 373, 374, 7, 112, 2, 2, 374, 375, 7, 119, 2, 2, 375, 376, 7, 111, 2, 2, 376, 42, 3, 2, 2, 2, 377, 378, 7, 102, 2, 2, 378, 379, 7, 103, 2, 2, 379, 380, 7, 104, 2, 2, 380, 44, 3, 2, 2, 2, 381, 382, 7, 116, 2, 2, 382, 383, 7, 103, 2, 2, 383, 384, 7, 118, 2, 2, 384, 385, 7, 119, 2, 2, 385, 386, 7, 116, 2, 2, 386, 387, 7, 112, 2, 2, 387, 46, 3, 2, 2, 2, 388, 389, 7, 101, 2, 2, 389, 390, 7, 99, 2, 2, 390, 391, 7, 110, 2, 2, 391, 392, 7, 110, 2, 2, 392, 48, 3, 2, 2, 2, 393, 394, 7, 47, 2, 2, 394, 395, 7, 64, 2, 2, 395, 50, 3, 2, 2, 2, 396, 397, 7, 101, 2, 2, 397, 398, 7, 110, 2, 2, 398, 399, 7, 99, 2, 2, 399, 400, 7, 117, 2, 2, 400, 401, 7, 117, 2, 2, 401, 52, 3, 2, 2, 2, 402, 403, 7, 107, 2, 2, 403, 404, 7, 112, 2, 2, 404, 405, 7, 118, 2, 2, 405, 406, 7, 103, 2, 2, 406, 407, 7, 116, 2, 2, 407, 408, 7, 104, 2, 2, 408, 409, 7, 99, 2, 2, 409, 410, 7, 101, 2, 2, 410, 411, 7, 103, 2, 2, 411, 54, 3, 2, 2, 2, 412, 413, 7, 101, 2, 2, 413, 414, 7, 113, 2, 2, 414, 415, 7, 112, 2, 2, 415, 416, 7, 117, 2, 2, 416, 417, 7, 118, 2, 2, 417, 418, 7, 116, 2, 2, 418, 419, 7, 119, 2, 2, 419, 420, 7, 101, 2, 2, 420, 421, 7, 118, 2, 2, 421, 422, 7, 113, 2, 2, 422, 423, 7, 116, 2, 2, 423, 56, 3, 2, 2, 2, 424, 425, 7, 112, 2, 2, 425, 426, 7, 103, 2, 2, 426, 427, 7, 121, 2, 2, 427, 58, 3, 2, 2, 2, 428, 429, 7, 118, 2, 2, 429, 430, 7, 116, 2, 2, 430, 431, 7, 119, 2, 2, 431, 432, 7, 103, 2, 2, 432, 60, 3, 2, 2, 2, 433, 434, 7, 104, 2, 2, 434, 435, 7, 99, 2, 2, 435, 436, 7, 110, 2, 2, 436, 437, 7, 117, 2, 2, 437, 438, 7, 103, 2, 2, 438, 62, 3, 2, 2, 2, 439, 440, 7, 111, 2, 2, 440, 441, 7, 99, 2, 2, 441, 442, 7, 118, 2, 2, 442, 443, 7, 101, 2, 2, 443, 444, 7, 106, 2, 2, 444, 445, 7, 103, 2, 2, 445, 446, 7, 117, 2, 2, 446, 64, 3, 2, 2, 2, 447, 448, 7, 118, 2, 2, 448, 449, 7, 123, 2, 2, 449, 450, 7, 114, 2, 2, 450, 451, 7, 103, 2, 2, 451, 452, 7, 113, 2, 2, 452, 453, 7, 104, 2, 2, 453, 66, 3, 2, 2, 2, 454, 455, 7, 118, 2, 2, 455, 456, 7, 116, 2, 2, 456, 457, 7, 123, 2, 2, 457, 68, 3, 2, 2, 2, 458, 459, 7, 101, 2, 2, 459, 460, 7, 99, 2, 2, 460, 461, 7, 118, 2, 2, 461, 462, 7, 101, 2, 2, 462, 463, 7, 106, 2, 2, 463, 70, 3, 2, 2, 2, 464, 465, 7, 104, 2, 2, 465, 466, 7, 107, 2, 2, 466, 467, 7, 112, 2, 2, 467, 468, 7, 99, 2, 2, 468, 469, 7, 110, 2, 2, 469, 470, 7, 110, 2, 2, 470, 471, 7, 123, 2, 2, 471, 72, 3, 2, 2, 2, 472, 473, 7, 120, 2, 2, 473, 474, 7, 113, 2, 2, 474, 475, 7, 107, 2, 2, 475, 476, 7, 102, 2, 2, 476, 74, 3, 2, 2, 2, 477, 478, 7, 112, 2, 2, 478, 479, 7, 119, 2, 2, 479, 480, 7, 110, 2, 2, 480, 481, 7, 110, 2, 2, 481, 76, 3, 2, 2, 2, 482, 483, 7, 119, 2, 2, 483, 484, 7, 112, 2, 2, 484, 485, 7, 102, 2, 2, 485, 486, 7, 103, 2, 2, 486, 487, 7, 104, 2, 2, 487, 488, 7, 107, 2, 2, 488, 489, 7, 112, 2, 2, 489, 490, 7, 103, 2, 2, 490, 491, 7, 102, 2, 2, 491, 78, 3, 2, 2, 2, 492, 493, 7, 46, 2, 2, 493, 80, 3, 2, 2, 2, 494, 495, 7, 61, 2, 2, 495, 82, 3, 2, 2, 2, 496, 497, 7, 65, 2, 2, 497, 84, 3, 2, 2, 2, 498, 499, 7, 60, 2, 2, 499, 86, 3, 2, 2, 2, 500, 501, 7, 42, 2, 2, 501, 88, 3, 2, 2, 2, 502, 503, 7, 43, 2, 2, 503, 90, 3, 2, 2, 2, 504, 505, 7, 93, 2, 2, 505, 92, 3, 2, 2, 2, 506, 507, 7, 95, 2, 2, 507, 94, 3, 2, 2, 2, 508, 509, 6, 47, 2, 2, 509, 510, 7, 127, 2, 2, 510, 511, 3, 2, 2, 2, 511, 512, 8, 47, 4, 2, 512, 96, 3, 2, 2, 2, 513, 514, 7, 125, 2, 2, 514, 98, 3, 2, 2, 2, 515, 516, 7, 127, 2, 2, 516, 100, 3, 2, 2, 2, 517, 518, 7, 45, 2, 2, 518, 102, 3, 2, 2, 2, 519, 520, 7, 45, 2, 2, 520, 521, 7, 45, 2, 2, 521, 104, 3, 2, 2, 2, 522, 523, 7, 47, 2, 2, 523, 106, 3, 2, 2, 2, 524, 525, 7, 47, 2, 2, 525, 526, 7, 47, 2, 2, 526, 108, 3, 2, 2, 2, 527, 528, 7, 44, 2, 2, 528, 110, 3, 2, 2, 2, 529, 530, 7, 49, 2, 2, 530, 112, 3, 2, 2, 2, 531, 532, 7, 39, 2, 2, 532, 114, 3, 2, 2, 2, 533, 534, 7, 44, 2, 2, 534, 535, 7, 44, 2, 2, 535, 116, 3, 2, 2, 2, 536, 537, 7, 40, 2, 2, 537, 538, 7, 40, 2, 2, 538, 118, 3, 2, 2, 2, 539, 540, 7, 126, 2, 2, 540, 541, 7, 126, 2, 2, 541, 120, 3, 2, 2, 2, 542, 543, 7, 35, 2, 2, 543, 122, 3, 2, 2, 2, 544, 545, 7, 63, 2, 2, 545, 124, 3, 2, 2, 2, 546, 547, 7, 45, 2, 2, 547, 548, 7, 63, 2, 2, 548, 126, 3, 2, 2, 2, 549, 550, 7, 47, 2, 2, 550, 551, 7, 63, 2, 2, 551, 128, 3, 2, 2, 2, 552, 553, 7, 44, 2, 2, 553, 554, 7, 63, 2, 2, 554, 130, 3, 2, 2, 2, 555, 556, 7, 49, 2, 2, 556, 557, 7, 63, 2, 2, 557, 132, 3, 2, 2, 2, 558, 559, 7, 39, 2, 2, 559, 560, 7, 63, 2, 2, 560, 134, 3, 2, 2, 2, 561, 562, 7, 63, 2, 2, 562, 563, 7, 63, 2, 2, 563, 136, 3, 2, 2, 2, 564, 565, 7, 35, 2, 2, 565, 566, 7, 63, 2, 2, 566, 138, 3, 2, 2, 2, 567, 568, 7, 62, 2, 2, 568, 140, 3, 2, 2, 2, 569, 570, 7, 62, 2, 2, 570, 571, 7, 63, 2, 2, 571, 142, 3, 2, 2, 2, 572, 573, 7, 64, 2, 2, 573, 144, 3, 2, 2, 2, 574, 575, 7, 64, 2, 2, 575, 576, 7, 63, 2, 2, 576, 146, 3, 2, 2, 2, 577, 578, 7, 40, 2, 2, 578, 148, 3, 2, 2, 2, 579, 580, 7, 126, 2, 2, 580, 150, 3, 2, 2, 2, 581, 582, 7, 96, 2, 2, 582, 152, 3, 2, 2, 2, 583, 584, 7, 128, 2, 2, 584, 154, 3, 2, 2, 2, 585, 586, 7, 62, 2, 2, 586, 587, 7, 62, 2, 2, 587, 156, 3, 2, 2, 2, 588, 589, 7, 64, 2, 2, 589, 590, 7, 64, 2, 2, 590, 158, 3, 2, 2, 2, 591, 592, 7, 64, 2, 2, 592, 593, 7, 64, 2, 2, 593, 594, 7, 64, 2, 2, 594, 160, 3, 2, 2, 2, 595, 596, 7, 48, 2, 2, 596, 162, 3, 2, 2, 2, 597, 602, 5, 193, 96, 2, 598, 601, 5, 193, 96, 2, 599, 601, 5, 197, 98, 2, 600, 598, 3, 2, 2, 2, 600, 599, 3, 2, 2, 2, 601, 604, 3, 2, 2, 2, 602, 600, 3, 2, 2, 2, 602, 603, 3, 2, 2, 2, 603, 164, 3, 2, 2, 2, 604, 602, 3, 2, 2, 2, 605, 610, 5, 199, 99, 2, 606, 610, 5, 203, 101, 2, 607, 610, 5, 205, 102, 2, 608, 610, 5, 201, 100, 2, 609, 605, 3, 2, 2, 2, 609, 606, 3, 2, 2, 2, 609, 607, 3, 2, 2, 2, 609, 608, 3, 2, 2, 2, 610, 166, 3, 2, 2, 2, 611, 613, 7, 41, 2, 2, 612, 614, 5, 245, 122, 2, 613, 612, 3, 2, 2, 2, 613, 614, 3, 2, 2, 2, 614, 615, 3, 2, 2, 2, 615, 616, 7, 41, 2, 2, 616, 168, 3, 2, 2, 2, 617, 619, 7, 36, 2, 2, 618, 620, 5, 249, 124, 2, 619, 618, 3, 2, 2, 2, 619, 620, 3, 2, 2, 2, 620, 621, 3, 2, 2, 2, 621, 622, 7, 36, 2, 2, 622, 170, 3, 2, 2, 2, 623, 624, 5, 215, 107, 2, 624, 172, 3, 2, 2, 2, 625, 627, 9, 2, 2, 2, 626, 625, 3, 2, 2, 2, 627, 628, 3, 2, 2, 2, 628, 626, 3, 2, 2, 2, 628, 629, 3, 2, 2, 2, 629, 630, 3, 2, 2, 2, 630, 631, 8, 86, 5, 2, 631, 174, 3, 2, 2, 2, 632, 633, 9, 3, 2, 2, 633, 634, 3, 2, 2, 2, 634, 635, 8, 87, 5, 2, 635, 176, 3, 2, 2, 2, 636, 637, 7, 104, 2, 2, 637, 638, 7, 41, 2, 2, 638, 639, 3, 2, 2, 2, 639, 640, 8, 88, 6, 2, 640, 641, 3, 2, 2, 2, 641, 642, 8, 88, 7, 2, 642, 178, 3, 2, 2, 2, 643, 644, 7, 104, 2, 2, 644, 645, 7, 36, 2, 2, 645, 646, 3, 2, 2, 2, 646, 647, 8, 89, 8, 2, 647, 648, 3, 2, 2, 2, 648, 649, 8, 89, 9, 2, 649, 180, 3, 2, 2, 2, 650, 651, 6, 90, 3, 2, 651, 652, 7, 125, 2, 2, 652, 653, 3, 2, 2, 2, 653, 654, 8, 90, 10, 2, 654, 655, 8, 90, 11, 2, 655, 182, 3, 2, 2, 2, 656, 657, 7, 41, 2, 2, 657, 658, 8, 91, 12, 2, 658, 659, 3, 2, 2, 2, 659, 660, 8, 91, 4, 2, 660, 184, 3, 2, 2, 2, 661, 662, 5, 237, 118, 2, 662, 186, 3, 2, 2, 2, 663, 664, 6, 93, 4, 2, 664, 665, 7, 125, 2, 2, 665, 666, 3, 2, 2, 2, 666, 667, 8, 93, 10, 2, 667, 668, 8, 93, 11, 2, 668, 188, 3, 2, 2, 2, 669, 670, 7, 36, 2, 2, 670, 671, 8, 94, 13, 2, 671, 672, 3, 2, 2, 2, 672, 673, 8, 94, 4, 2, 673, 190, 3, 2, 2, 2, 674, 675, 5, 241, 120, 2, 675, 192, 3, 2, 2, 2, 676, 677, 5, 195, 97, 2, 677, 194, 3, 2, 2, 2, 678, 679, 9, 4, 2, 2, 679, 196, 3, 2, 2, 2, 680, 681, 9, 5, 2, 2, 681, 198, 3, 2, 2, 2, 682, 684, 5, 197, 98, 2, 683, 682, 3, 2, 2, 2, 684, 685, 3, 2, 2, 2, 685, 683, 3, 2, 2, 2, 685, 686, 3, 2, 2, 2, 686, 200, 3, 2, 2, 2, 687, 688, 7, 50, 2, 2, 688, 690, 9, 6, 2, 2, 689, 691, 5, 209, 104, 2, 690, 689, 3, 2, 2, 2, 691, 692, 3, 2, 2, 2, 692, 690, 3, 2, 2, 2, 692, 693, 3, 2, 2, 2, 693, 202, 3, 2, 2, 2, 694, 695, 7, 50, 2, 2, 695, 697, 9, 7, 2, 2, 696, 698, 5, 211, 105, 2, 697, 696, 3, 2, 2, 2, 698, 699, 3, 2, 2, 2, 699, 697, 3, 2, 2, 2, 699, 700, 3, 2, 2, 2, 700, 204, 3, 2, 2, 2, 701, 702, 7, 50, 2, 2, 702, 704, 9, 8, 2, 2, 703, 705, 5, 213, 106, 2, 704, 703, 3, 2, 2, 2, 705, 706, 3, 2, 2, 2, 706, 704, 3, 2, 2, 2, 706, 707, 3, 2, 2, 2, 707, 206, 3, 2, 2, 2, 708, 709, 9, 9, 2, 2, 709, 208, 3, 2, 2, 2, 710, 711, 9, 10, 2, 2, 711, 210, 3, 2, 2, 2, 712, 713, 9, 11, 2, 2, 713, 212, 3, 2, 2, 2, 714, 715, 9, 12, 2, 2, 715, 214, 3, 2, 2, 2, 716, 718, 5, 217, 108, 2, 717, 719, 5, 219, 109, 2, 718, 717, 3, 2, 2, 2, 718, 719, 3, 2, 2, 2, 719, 724, 3, 2, 2, 2, 720, 721, 5, 221, 110, 2, 721, 722, 5, 219, 109, 2, 722, 724, 3, 2, 2, 2, 723, 716, 3, 2, 2, 2, 723, 720, 3, 2, 2, 2, 724, 216, 3, 2, 2, 2, 725, 727, 5, 221, 110, 2, 726, 725, 3, 2, 2, 2, 726, 727, 3, 2, 2, 2, 727, 728, 3, 2, 2, 2, 728, 729, 7, 48, 2, 2, 729, 734, 5, 221, 110, 2, 730, 731, 5, 221, 110, 2, 731, 732, 7, 48, 2, 2, 732, 734, 3, 2, 2, 2, 733, 726, 3, 2, 2, 2, 733, 730, 3, 2, 2, 2, 734, 218, 3, 2, 2, 2, 735, 737, 9, 13, 2, 2, 736, 738, 5, 223, 111, 2, 737, 736, 3, 2, 2, 2, 737, 738, 3, 2, 2, 2, 738, 739, 3, 2, 2, 2, 739, 740, 5, 221, 110, 2, 740, 220, 3, 2, 2, 2, 741, 743, 5, 197, 98, 2, 742, 741, 3, 2, 2, 2, 743, 744, 3, 2, 2, 2, 744, 742, 3, 2, 2, 2, 744, 745, 3, 2, 2, 2, 745, 222, 3, 2, 2, 2, 746, 747, 9, 14, 2, 2, 747, 224, 3, 2, 2, 2, 748, 750, 5, 227, 113, 2, 749, 748, 3, 2, 2, 2, 750, 751, 3, 2, 2, 2, 751, 749, 3, 2, 2, 2, 751, 752, 3, 2, 2, 2, 752, 226, 3, 2, 2, 2, 753, 756, 10, 15, 2, 2, 754, 756, 5, 229, 114, 2, 755, 753, 3, 2, 2, 2, 755, 754, 3, 2, 2, 2, 756, 228, 3, 2, 2, 2, 757, 761, 5, 231, 115, 2, 758, 761, 5, 233, 116, 2, 759, 761, 5, 235, 117, 2, 760, 757, 3, 2, 2, 2, 760, 758, 3, 2, 2, 2, 760, 759, 3, 2, 2, 2, 761, 230, 3, 2, 2, 2, 762, 763, 7, 94, 2, 2, 763, 764, 9, 16, 2, 2, 764, 232, 3, 2, 2, 2, 765, 766, 7, 94, 2, 2, 766, 768, 5, 211, 105, 2, 767, 769, 5, 211, 105, 2, 768, 767, 3, 2, 2, 2, 768, 769, 3, 2, 2, 2, 769, 771, 3, 2, 2, 2, 770, 772, 5, 211, 105, 2, 771, 770, 3, 2, 2, 2, 771, 772, 3, 2, 2, 2, 772, 234, 3, 2, 2, 2, 773, 774, 7, 94, 2, 2, 774, 775, 7, 122, 2, 2, 775, 777, 3, 2, 2, 2, 776, 778, 5, 213, 106, 2, 777, 776, 3, 2, 2, 2, 778, 779, 3, 2, 2, 2, 779, 777, 3, 2, 2, 2, 779, 780, 3, 2, 2, 2, 780, 236, 3, 2, 2, 2, 781, 783, 5, 239, 119, 2, 782, 781, 3, 2, 2, 2, 783, 784, 3, 2, 2, 2, 784, 782, 3, 2, 2, 2, 784, 785, 3, 2, 2, 2, 785, 238, 3, 2, 2, 2, 786, 789, 10, 17, 2, 2, 787, 789, 5, 229, 114, 2, 788, 786, 3, 2, 2, 2, 788, 787, 3, 2, 2, 2, 789, 240, 3, 2, 2, 2, 790, 792, 5, 243, 121, 2, 791, 790, 3, 2, 2, 2, 792, 793, 3, 2, 2, 2, 793, 791, 3, 2, 2, 2, 793, 794, 3, 2, 2, 2, 794, 242, 3, 2, 2, 2, 795, 798, 10, 18, 2, 2, 796, 798, 5, 229, 114, 2, 797, 795, 3, 2, 2, 2, 797, 796, 3, 2, 2, 2, 798, 244, 3, 2, 2, 2, 799, 801, 5, 247, 123, 2, 800, 799, 3, 2, 2, 2, 801, 802, 3, 2, 2, 2, 802, 800, 3, 2, 2, 2, 802, 803, 3, 2, 2, 2, 803, 246, 3, 2, 2, 2, 804, 807, 10, 15, 2, 2, 805, 807, 5, 229, 114, 2, 806, 804, 3, 2, 2, 2, 806, 805, 3, 2, 2, 2, 807, 248, 3, 2, 2, 2, 808, 810, 5, 251, 125, 2, 809, 808, 3, 2, 2, 2, 810, 811, 3, 2, 2, 2, 811, 809, 3, 2, 2, 2, 811, 812, 3, 2, 2, 2, 812, 250, 3, 2, 2, 2, 813, 816, 10, 19, 2, 2, 814, 816, 5, 229, 114, 2, 815, 813, 3, 2, 2, 2, 815, 814, 3, 2, 2, 2, 816, 252, 3, 2, 2, 2, 817, 819, 10, 3, 2, 2, 818, 817, 3, 2, 2, 2, 819, 822, 3, 2, 2, 2, 820, 818, 3, 2, 2, 2, 820, 821, 3, 2, 2, 2, 821, 254, 3, 2, 2, 2, 822, 820, 3, 2, 2, 2, 37, 2, 3, 4, 261, 600, 602, 609, 613, 619, 628, 685, 692, 699, 706, 718, 723, 726, 733, 737, 744, 751, 755, 760, 768, 771, 779, 784, 788, 793, 797, 802, 806, 811, 815, 820, 14, 2, 4, 2, 2, 5, 2, 6, 2, 2, 2, 3, 2, 3, 88, 2, 7, 3, 2, 3, 89, 3, 7, 4, 2, 9, 3, 2, 7, 2, 2, 3, 91, 4, 3, 94, 5]
\ No newline at end of file
diff --git a/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.tokens b/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.tokens
index 5aaa0a78a..ae7f9374f 100644
--- a/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.tokens
+++ b/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.tokens
@@ -2,161 +2,167 @@ FStringExpStart=1
BlockComment=2
LineComment=3
Pragma=4
-Const=5
-Var=6
-As=7
-Spread=8
-Switch=9
-Case=10
-Default=11
-Break=12
-Continue=13
-Do=14
-While=15
-If=16
-Else=17
-For=18
-Enum=19
-DefFunc=20
-Return=21
-CallFunc=22
-RetIndicator=23
-Class=24
-Interface=25
-Constructor=26
-True=27
-False=28
-Typeof=29
-Try=30
-Catch=31
-Finally=32
-Void=33
-Null=34
-Undefined=35
-Comma=36
-SemiColon=37
-QuestionMark=38
-Colon=39
-LeftParen=40
-RightParen=41
-LeftBracket=42
-RightBracket=43
-FStringExpEnd=44
-LeftBrace=45
-RightBrace=46
-Plus=47
-PlusPlus=48
-Minus=49
-MinusMinus=50
-Star=51
-Div=52
-Mod=53
-PowerTo=54
-AndAnd=55
-OrOr=56
-Not=57
-Assign=58
-PlusAssign=59
-MinusAssign=60
-StarAssign=61
-DivAssign=62
-ModAssign=63
-Equal=64
-NotEqual=65
-Less=66
-LessEqual=67
-Greater=68
-GreaterEqual=69
-BitwiseAnd=70
-BitwiseOr=71
-BitwiseXor=72
-BitwiseNot=73
-BitwiseZeroFillLeftShift=74
-BitwiseSignedRightShift=75
-BitwiseZeroFillRightShift=76
-Dot=77
-Identifier=78
-IntegerConstant=79
-SingleQuoteStringLiteral=80
-DoubleQuoteStringLiteral=81
-FloatingConstant=82
-Whitespace=83
-Newline=84
-FStringSingleQuoteStart=85
-FStringDoubleQuoteStart=86
-FStringSingleQuoteEnd=87
-FStringSingleQuoteAtom=88
-FStringDoubleQuoteEnd=89
-FStringDoubleQuoteAtom=90
-'const'=5
-'var'=6
-'as'=7
-'...'=8
-'switch'=9
-'case'=10
-'default'=11
-'break'=12
-'continue'=13
-'do'=14
-'while'=15
-'if'=16
-'else'=17
-'for'=18
-'enum'=19
-'def'=20
-'return'=21
-'call'=22
-'->'=23
-'class'=24
-'interface'=25
-'constructor'=26
-'true'=27
-'false'=28
-'typeof'=29
-'try'=30
-'catch'=31
-'finally'=32
-'void'=33
-'null'=34
-'undefined'=35
-','=36
-';'=37
-'?'=38
-':'=39
-'('=40
-')'=41
-'['=42
-']'=43
-'{'=45
-'}'=46
-'+'=47
-'++'=48
-'-'=49
-'--'=50
-'*'=51
-'/'=52
-'%'=53
-'**'=54
-'&&'=55
-'||'=56
-'!'=57
-'='=58
-'+='=59
-'-='=60
-'*='=61
-'/='=62
-'%='=63
-'=='=64
-'!='=65
-'<'=66
-'<='=67
-'>'=68
-'>='=69
-'&'=70
-'|'=71
-'^'=72
-'~'=73
-'<<'=74
-'>>'=75
-'>>>'=76
-'.'=77
+InstanceOf=5
+Const=6
+Var=7
+As=8
+Spread=9
+Switch=10
+Case=11
+Default=12
+Break=13
+Continue=14
+Do=15
+While=16
+If=17
+Else=18
+For=19
+Enum=20
+DefFunc=21
+Return=22
+CallFunc=23
+RetIndicator=24
+Class=25
+Interface=26
+Constructor=27
+New=28
+True=29
+False=30
+Matches=31
+Typeof=32
+Try=33
+Catch=34
+Finally=35
+Void=36
+Null=37
+Undefined=38
+Comma=39
+SemiColon=40
+QuestionMark=41
+Colon=42
+LeftParen=43
+RightParen=44
+LeftBracket=45
+RightBracket=46
+FStringExpEnd=47
+LeftBrace=48
+RightBrace=49
+Plus=50
+PlusPlus=51
+Minus=52
+MinusMinus=53
+Star=54
+Div=55
+Mod=56
+PowerTo=57
+AndAnd=58
+OrOr=59
+Not=60
+Assign=61
+PlusAssign=62
+MinusAssign=63
+StarAssign=64
+DivAssign=65
+ModAssign=66
+Equal=67
+NotEqual=68
+Less=69
+LessEqual=70
+Greater=71
+GreaterEqual=72
+BitwiseAnd=73
+BitwiseOr=74
+BitwiseXor=75
+BitwiseNot=76
+BitwiseZeroFillLeftShift=77
+BitwiseSignedRightShift=78
+BitwiseZeroFillRightShift=79
+Dot=80
+Identifier=81
+IntegerConstant=82
+SingleQuoteStringLiteral=83
+DoubleQuoteStringLiteral=84
+FloatingConstant=85
+Whitespace=86
+Newline=87
+FStringSingleQuoteStart=88
+FStringDoubleQuoteStart=89
+FStringSingleQuoteEnd=90
+FStringSingleQuoteAtom=91
+FStringDoubleQuoteEnd=92
+FStringDoubleQuoteAtom=93
+'instanceof'=5
+'const'=6
+'var'=7
+'as'=8
+'...'=9
+'switch'=10
+'case'=11
+'default'=12
+'break'=13
+'continue'=14
+'do'=15
+'while'=16
+'if'=17
+'else'=18
+'for'=19
+'enum'=20
+'def'=21
+'return'=22
+'call'=23
+'->'=24
+'class'=25
+'interface'=26
+'constructor'=27
+'new'=28
+'true'=29
+'false'=30
+'matches'=31
+'typeof'=32
+'try'=33
+'catch'=34
+'finally'=35
+'void'=36
+'null'=37
+'undefined'=38
+','=39
+';'=40
+'?'=41
+':'=42
+'('=43
+')'=44
+'['=45
+']'=46
+'{'=48
+'}'=49
+'+'=50
+'++'=51
+'-'=52
+'--'=53
+'*'=54
+'/'=55
+'%'=56
+'**'=57
+'&&'=58
+'||'=59
+'!'=60
+'='=61
+'+='=62
+'-='=63
+'*='=64
+'/='=65
+'%='=66
+'=='=67
+'!='=68
+'<'=69
+'<='=70
+'>'=71
+'>='=72
+'&'=73
+'|'=74
+'^'=75
+'~'=76
+'<<'=77
+'>>'=78
+'>>>'=79
+'.'=80
diff --git a/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.ts b/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.ts
index 5b044c43f..055156fa0 100644
--- a/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.ts
+++ b/kipper/core/src/compiler/lexer-parser/antlr/KipperLexer.ts
@@ -5,10 +5,7 @@ import KipperLexerBase from "./base/KipperLexerBase";
import { ATN } from "antlr4ts/atn/ATN";
import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer";
import { CharStream } from "antlr4ts/CharStream";
-import { Lexer } from "antlr4ts/Lexer";
import { LexerATNSimulator } from "antlr4ts/atn/LexerATNSimulator";
-import { NotNull } from "antlr4ts/Decorators";
-import { Override } from "antlr4ts/Decorators";
import { RuleContext } from "antlr4ts/RuleContext";
import { Vocabulary } from "antlr4ts/Vocabulary";
import { VocabularyImpl } from "antlr4ts/VocabularyImpl";
@@ -20,92 +17,95 @@ export class KipperLexer extends KipperLexerBase {
public static readonly BlockComment = 2;
public static readonly LineComment = 3;
public static readonly Pragma = 4;
- public static readonly Const = 5;
- public static readonly Var = 6;
- public static readonly As = 7;
- public static readonly Spread = 8;
- public static readonly Switch = 9;
- public static readonly Case = 10;
- public static readonly Default = 11;
- public static readonly Break = 12;
- public static readonly Continue = 13;
- public static readonly Do = 14;
- public static readonly While = 15;
- public static readonly If = 16;
- public static readonly Else = 17;
- public static readonly For = 18;
- public static readonly Enum = 19;
- public static readonly DefFunc = 20;
- public static readonly Return = 21;
- public static readonly CallFunc = 22;
- public static readonly RetIndicator = 23;
- public static readonly Class = 24;
- public static readonly Interface = 25;
- public static readonly Constructor = 26;
- public static readonly True = 27;
- public static readonly False = 28;
- public static readonly Typeof = 29;
- public static readonly Try = 30;
- public static readonly Catch = 31;
- public static readonly Finally = 32;
- public static readonly Void = 33;
- public static readonly Null = 34;
- public static readonly Undefined = 35;
- public static readonly Comma = 36;
- public static readonly SemiColon = 37;
- public static readonly QuestionMark = 38;
- public static readonly Colon = 39;
- public static readonly LeftParen = 40;
- public static readonly RightParen = 41;
- public static readonly LeftBracket = 42;
- public static readonly RightBracket = 43;
- public static readonly FStringExpEnd = 44;
- public static readonly LeftBrace = 45;
- public static readonly RightBrace = 46;
- public static readonly Plus = 47;
- public static readonly PlusPlus = 48;
- public static readonly Minus = 49;
- public static readonly MinusMinus = 50;
- public static readonly Star = 51;
- public static readonly Div = 52;
- public static readonly Mod = 53;
- public static readonly PowerTo = 54;
- public static readonly AndAnd = 55;
- public static readonly OrOr = 56;
- public static readonly Not = 57;
- public static readonly Assign = 58;
- public static readonly PlusAssign = 59;
- public static readonly MinusAssign = 60;
- public static readonly StarAssign = 61;
- public static readonly DivAssign = 62;
- public static readonly ModAssign = 63;
- public static readonly Equal = 64;
- public static readonly NotEqual = 65;
- public static readonly Less = 66;
- public static readonly LessEqual = 67;
- public static readonly Greater = 68;
- public static readonly GreaterEqual = 69;
- public static readonly BitwiseAnd = 70;
- public static readonly BitwiseOr = 71;
- public static readonly BitwiseXor = 72;
- public static readonly BitwiseNot = 73;
- public static readonly BitwiseZeroFillLeftShift = 74;
- public static readonly BitwiseSignedRightShift = 75;
- public static readonly BitwiseZeroFillRightShift = 76;
- public static readonly Dot = 77;
- public static readonly Identifier = 78;
- public static readonly IntegerConstant = 79;
- public static readonly SingleQuoteStringLiteral = 80;
- public static readonly DoubleQuoteStringLiteral = 81;
- public static readonly FloatingConstant = 82;
- public static readonly Whitespace = 83;
- public static readonly Newline = 84;
- public static readonly FStringSingleQuoteStart = 85;
- public static readonly FStringDoubleQuoteStart = 86;
- public static readonly FStringSingleQuoteEnd = 87;
- public static readonly FStringSingleQuoteAtom = 88;
- public static readonly FStringDoubleQuoteEnd = 89;
- public static readonly FStringDoubleQuoteAtom = 90;
+ public static readonly InstanceOf = 5;
+ public static readonly Const = 6;
+ public static readonly Var = 7;
+ public static readonly As = 8;
+ public static readonly Spread = 9;
+ public static readonly Switch = 10;
+ public static readonly Case = 11;
+ public static readonly Default = 12;
+ public static readonly Break = 13;
+ public static readonly Continue = 14;
+ public static readonly Do = 15;
+ public static readonly While = 16;
+ public static readonly If = 17;
+ public static readonly Else = 18;
+ public static readonly For = 19;
+ public static readonly Enum = 20;
+ public static readonly DefFunc = 21;
+ public static readonly Return = 22;
+ public static readonly CallFunc = 23;
+ public static readonly RetIndicator = 24;
+ public static readonly Class = 25;
+ public static readonly Interface = 26;
+ public static readonly Constructor = 27;
+ public static readonly New = 28;
+ public static readonly True = 29;
+ public static readonly False = 30;
+ public static readonly Matches = 31;
+ public static readonly Typeof = 32;
+ public static readonly Try = 33;
+ public static readonly Catch = 34;
+ public static readonly Finally = 35;
+ public static readonly Void = 36;
+ public static readonly Null = 37;
+ public static readonly Undefined = 38;
+ public static readonly Comma = 39;
+ public static readonly SemiColon = 40;
+ public static readonly QuestionMark = 41;
+ public static readonly Colon = 42;
+ public static readonly LeftParen = 43;
+ public static readonly RightParen = 44;
+ public static readonly LeftBracket = 45;
+ public static readonly RightBracket = 46;
+ public static readonly FStringExpEnd = 47;
+ public static readonly LeftBrace = 48;
+ public static readonly RightBrace = 49;
+ public static readonly Plus = 50;
+ public static readonly PlusPlus = 51;
+ public static readonly Minus = 52;
+ public static readonly MinusMinus = 53;
+ public static readonly Star = 54;
+ public static readonly Div = 55;
+ public static readonly Mod = 56;
+ public static readonly PowerTo = 57;
+ public static readonly AndAnd = 58;
+ public static readonly OrOr = 59;
+ public static readonly Not = 60;
+ public static readonly Assign = 61;
+ public static readonly PlusAssign = 62;
+ public static readonly MinusAssign = 63;
+ public static readonly StarAssign = 64;
+ public static readonly DivAssign = 65;
+ public static readonly ModAssign = 66;
+ public static readonly Equal = 67;
+ public static readonly NotEqual = 68;
+ public static readonly Less = 69;
+ public static readonly LessEqual = 70;
+ public static readonly Greater = 71;
+ public static readonly GreaterEqual = 72;
+ public static readonly BitwiseAnd = 73;
+ public static readonly BitwiseOr = 74;
+ public static readonly BitwiseXor = 75;
+ public static readonly BitwiseNot = 76;
+ public static readonly BitwiseZeroFillLeftShift = 77;
+ public static readonly BitwiseSignedRightShift = 78;
+ public static readonly BitwiseZeroFillRightShift = 79;
+ public static readonly Dot = 80;
+ public static readonly Identifier = 81;
+ public static readonly IntegerConstant = 82;
+ public static readonly SingleQuoteStringLiteral = 83;
+ public static readonly DoubleQuoteStringLiteral = 84;
+ public static readonly FloatingConstant = 85;
+ public static readonly Whitespace = 86;
+ public static readonly Newline = 87;
+ public static readonly FStringSingleQuoteStart = 88;
+ public static readonly FStringDoubleQuoteStart = 89;
+ public static readonly FStringSingleQuoteEnd = 90;
+ public static readonly FStringSingleQuoteAtom = 91;
+ public static readonly FStringDoubleQuoteEnd = 92;
+ public static readonly FStringDoubleQuoteAtom = 93;
public static readonly COMMENT = 2;
public static readonly PRAGMA = 3;
public static readonly SINGLE_QUOTE_FSTRING = 1;
@@ -121,6 +121,7 @@ export class KipperLexer extends KipperLexerBase {
"BlockComment",
"LineComment",
"Pragma",
+ "InstanceOf",
"Const",
"Var",
"As",
@@ -143,8 +144,10 @@ export class KipperLexer extends KipperLexerBase {
"Class",
"Interface",
"Constructor",
+ "New",
"True",
"False",
+ "Matches",
"Typeof",
"Try",
"Catch",
@@ -248,6 +251,7 @@ export class KipperLexer extends KipperLexerBase {
undefined,
undefined,
undefined,
+ "'instanceof'",
"'const'",
"'var'",
"'as'",
@@ -270,8 +274,10 @@ export class KipperLexer extends KipperLexerBase {
"'class'",
"'interface'",
"'constructor'",
+ "'new'",
"'true'",
"'false'",
+ "'matches'",
"'typeof'",
"'try'",
"'catch'",
@@ -328,6 +334,7 @@ export class KipperLexer extends KipperLexerBase {
"BlockComment",
"LineComment",
"Pragma",
+ "InstanceOf",
"Const",
"Var",
"As",
@@ -350,8 +357,10 @@ export class KipperLexer extends KipperLexerBase {
"Class",
"Interface",
"Constructor",
+ "New",
"True",
"False",
+ "Matches",
"Typeof",
"Try",
"Catch",
@@ -461,19 +470,19 @@ export class KipperLexer extends KipperLexerBase {
// @Override
public action(_localctx: RuleContext, ruleIndex: number, actionIndex: number): void {
switch (ruleIndex) {
- case 83:
+ case 86:
this.FStringSingleQuoteStart_action(_localctx, actionIndex);
break;
- case 84:
+ case 87:
this.FStringDoubleQuoteStart_action(_localctx, actionIndex);
break;
- case 86:
+ case 89:
this.FStringSingleQuoteEnd_action(_localctx, actionIndex);
break;
- case 89:
+ case 92:
this.FStringDoubleQuoteEnd_action(_localctx, actionIndex);
break;
}
@@ -509,13 +518,13 @@ export class KipperLexer extends KipperLexerBase {
// @Override
public sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean {
switch (ruleIndex) {
- case 42:
+ case 45:
return this.FStringExpEnd_sempred(_localctx, predIndex);
- case 85:
+ case 88:
return this.FStringSingleQuoteExpStart_sempred(_localctx, predIndex);
- case 88:
+ case 91:
return this.FStringDoubleQuoteExpStart_sempred(_localctx, predIndex);
}
return true;
@@ -544,7 +553,7 @@ export class KipperLexer extends KipperLexerBase {
private static readonly _serializedATNSegments: number = 2;
private static readonly _serializedATNSegment0: string =
- "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02\\\u031A\b\x01" +
+ "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02_\u0337\b\x01" +
"\b\x01\b\x01\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04" +
"\x06\t\x06\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f" +
"\t\f\x04\r\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11" +
@@ -561,76 +570,79 @@ export class KipperLexer extends KipperLexerBase {
"^\x04_\t_\x04`\t`\x04a\ta\x04b\tb\x04c\tc\x04d\td\x04e\te\x04f\tf\x04" +
"g\tg\x04h\th\x04i\ti\x04j\tj\x04k\tk\x04l\tl\x04m\tm\x04n\tn\x04o\to\x04" +
"p\tp\x04q\tq\x04r\tr\x04s\ts\x04t\tt\x04u\tu\x04v\tv\x04w\tw\x04x\tx\x04" +
- "y\ty\x04z\tz\x04{\t{\x03\x02\x03\x02\x03\x02\x03\x02\x07\x02\xFE\n\x02" +
- "\f\x02\x0E\x02\u0101\v\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03" +
- "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x04\x03\x04\x03" +
- "\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03" +
- "\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x06\x03\x06\x03" +
- "\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03\b\x03\t\x03" +
- "\t\x03\t\x03\t\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03\n\x03\v\x03" +
- "\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\f\x03\f\x03\f\x03\f\x03\f\x03" +
- "\f\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\x0E\x03\x0E" +
- "\x03\x0E\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x10\x03\x10" +
- "\x03\x10\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x12\x03\x12\x03\x12" +
- "\x03\x12\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x14\x03\x14\x03\x14" +
- "\x03\x14\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x16" +
- "\x03\x16\x03\x16\x03\x16\x03\x16\x03\x17\x03\x17\x03\x17\x03\x18\x03\x18" +
- "\x03\x18\x03\x18\x03\x18\x03\x18\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19" +
- "\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A" +
- "\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1B" +
- "\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C" +
- "\x03\x1C\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1E" +
+ "y\ty\x04z\tz\x04{\t{\x04|\t|\x04}\t}\x04~\t~\x03\x02\x03\x02\x03\x02\x03" +
+ "\x02\x07\x02\u0104\n\x02\f\x02\x0E\x02\u0107\v\x02\x03\x02\x03\x02\x03" +
+ "\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" +
+ "\x03\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03" +
+ "\x04\x03\x04\x03\x04\x03\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03" +
+ "\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x06\x03\x06\x03\x06\x03" +
+ "\x06\x03\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03\b" +
+ "\x03\t\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03\n\x03\n\x03\n\x03" +
+ "\v\x03\v\x03\v\x03\v\x03\v\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03" +
+ "\f\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0E\x03\x0E" +
+ "\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0F\x03\x0F\x03\x0F\x03\x10" +
+ "\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x11\x03\x12" +
+ "\x03\x12\x03\x12\x03\x12\x03\x12\x03\x13\x03\x13\x03\x13\x03\x13\x03\x14" +
+ "\x03\x14\x03\x14\x03\x14\x03\x14\x03\x15\x03\x15\x03\x15\x03\x15\x03\x16" +
+ "\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x17\x03\x17\x03\x17" +
+ "\x03\x17\x03\x17\x03\x18\x03\x18\x03\x18\x03\x19\x03\x19\x03\x19\x03\x19" +
+ "\x03\x19\x03\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A" +
+ "\x03\x1A\x03\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B" +
+ "\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1C\x03\x1C\x03\x1C" +
+ "\x03\x1C\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1E\x03\x1E\x03\x1E" +
"\x03\x1E\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F" +
- "\x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03!\x03!\x03!\x03!\x03!\x03" +
- '"\x03"\x03"\x03"\x03"\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03#\x03' +
- "#\x03#\x03$\x03$\x03%\x03%\x03&\x03&\x03'\x03'\x03(\x03(\x03)\x03)\x03" +
- "*\x03*\x03+\x03+\x03,\x03,\x03,\x03,\x03,\x03-\x03-\x03.\x03.\x03/\x03" +
- "/\x030\x030\x030\x031\x031\x032\x032\x032\x033\x033\x034\x034\x035\x03" +
- "5\x036\x036\x036\x037\x037\x037\x038\x038\x038\x039\x039\x03:\x03:\x03" +
- ";\x03;\x03;\x03<\x03<\x03<\x03=\x03=\x03=\x03>\x03>\x03>\x03?\x03?\x03" +
- "?\x03@\x03@\x03@\x03A\x03A\x03A\x03B\x03B\x03C\x03C\x03C\x03D\x03D\x03" +
- "E\x03E\x03E\x03F\x03F\x03G\x03G\x03H\x03H\x03I\x03I\x03J\x03J\x03J\x03" +
- "K\x03K\x03K\x03L\x03L\x03L\x03L\x03M\x03M\x03N\x03N\x03N\x07N\u023C\n" +
- "N\fN\x0EN\u023F\vN\x03O\x03O\x03O\x03O\x05O\u0245\nO\x03P\x03P\x05P\u0249" +
- "\nP\x03P\x03P\x03Q\x03Q\x05Q\u024F\nQ\x03Q\x03Q\x03R\x03R\x03S\x06S\u0256" +
- "\nS\rS\x0ES\u0257\x03S\x03S\x03T\x03T\x03T\x03T\x03U\x03U\x03U\x03U\x03" +
- "U\x03U\x03U\x03V\x03V\x03V\x03V\x03V\x03V\x03V\x03W\x03W\x03W\x03W\x03" +
- "W\x03W\x03X\x03X\x03X\x03X\x03X\x03Y\x03Y\x03Z\x03Z\x03Z\x03Z\x03Z\x03" +
- "Z\x03[\x03[\x03[\x03[\x03[\x03\\\x03\\\x03]\x03]\x03^\x03^\x03_\x03_\x03" +
- "`\x06`\u028F\n`\r`\x0E`\u0290\x03a\x03a\x03a\x06a\u0296\na\ra\x0Ea\u0297" +
- "\x03b\x03b\x03b\x06b\u029D\nb\rb\x0Eb\u029E\x03c\x03c\x03c\x06c\u02A4" +
- "\nc\rc\x0Ec\u02A5\x03d\x03d\x03e\x03e\x03f\x03f\x03g\x03g\x03h\x03h\x05" +
- "h\u02B2\nh\x03h\x03h\x03h\x05h\u02B7\nh\x03i\x05i\u02BA\ni\x03i\x03i\x03" +
- "i\x03i\x03i\x05i\u02C1\ni\x03j\x03j\x05j\u02C5\nj\x03j\x03j\x03k\x06k" +
- "\u02CA\nk\rk\x0Ek\u02CB\x03l\x03l\x03m\x06m\u02D1\nm\rm\x0Em\u02D2\x03" +
- "n\x03n\x05n\u02D7\nn\x03o\x03o\x03o\x05o\u02DC\no\x03p\x03p\x03p\x03q" +
- "\x03q\x03q\x05q\u02E4\nq\x03q\x05q\u02E7\nq\x03r\x03r\x03r\x03r\x06r\u02ED" +
- "\nr\rr\x0Er\u02EE\x03s\x06s\u02F2\ns\rs\x0Es\u02F3\x03t\x03t\x05t\u02F8" +
- "\nt\x03u\x06u\u02FB\nu\ru\x0Eu\u02FC\x03v\x03v\x05v\u0301\nv\x03w\x06" +
- "w\u0304\nw\rw\x0Ew\u0305\x03x\x03x\x05x\u030A\nx\x03y\x06y\u030D\ny\r" +
- "y\x0Ey\u030E\x03z\x03z\x05z\u0313\nz\x03{\x07{\u0316\n{\f{\x0E{\u0319" +
- "\v{\x03\xFF\x02\x02|\x05\x02\x04\x07\x02\x05\t\x02\x06\v\x02\x07\r\x02" +
- "\b\x0F\x02\t\x11\x02\n\x13\x02\v\x15\x02\f\x17\x02\r\x19\x02\x0E\x1B\x02" +
- "\x0F\x1D\x02\x10\x1F\x02\x11!\x02\x12#\x02\x13%\x02\x14'\x02\x15)\x02" +
- "\x16+\x02\x17-\x02\x18/\x02\x191\x02\x1A3\x02\x1B5\x02\x1C7\x02\x1D9\x02" +
- "\x1E;\x02\x1F=\x02 ?\x02!A\x02\"C\x02#E\x02$G\x02%I\x02&K\x02'M\x02(" +
- "O\x02)Q\x02*S\x02+U\x02,W\x02-Y\x02.[\x02/]\x020_\x021a\x022c\x023e\x02" +
- "4g\x025i\x026k\x027m\x028o\x029q\x02:s\x02;u\x02{\x02?}\x02" +
- "@\x7F\x02A\x81\x02B\x83\x02C\x85\x02D\x87\x02E\x89\x02F\x8B\x02G\x8D\x02" +
- "H\x8F\x02I\x91\x02J\x93\x02K\x95\x02L\x97\x02M\x99\x02N\x9B\x02O\x9D\x02" +
- "P\x9F\x02Q\xA1\x02R\xA3\x02S\xA5\x02T\xA7\x02U\xA9\x02V\xAB\x02W\xAD\x02" +
- "X\xAF\x02\x02\xB1\x02Y\xB3\x02Z\xB5\x02\x02\xB7\x02[\xB9\x02\\\xBB\x02" +
- "\x02\xBD\x02\x02\xBF\x02\x02\xC1\x02\x02\xC3\x02\x02\xC5\x02\x02\xC7\x02" +
- "\x02\xC9\x02\x02\xCB\x02\x02\xCD\x02\x02\xCF\x02\x02\xD1\x02\x02\xD3\x02" +
- "\x02\xD5\x02\x02\xD7\x02\x02\xD9\x02\x02\xDB\x02\x02\xDD\x02\x02\xDF\x02" +
- "\x02\xE1\x02\x02\xE3\x02\x02\xE5\x02\x02\xE7\x02\x02\xE9\x02\x02\xEB\x02" +
- "\x02\xED\x02\x02\xEF\x02\x02\xF1\x02\x02\xF3\x02\x02\xF5\x02\x02\xF7\x02" +
+ "\x03\x1F\x03\x1F\x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03!\x03!\x03!\x03" +
+ '!\x03"\x03"\x03"\x03"\x03"\x03"\x03#\x03#\x03#\x03#\x03#\x03#\x03' +
+ "#\x03#\x03$\x03$\x03$\x03$\x03$\x03%\x03%\x03%\x03%\x03%\x03&\x03&\x03" +
+ "&\x03&\x03&\x03&\x03&\x03&\x03&\x03&\x03'\x03'\x03(\x03(\x03)\x03)\x03" +
+ "*\x03*\x03+\x03+\x03,\x03,\x03-\x03-\x03.\x03.\x03/\x03/\x03/\x03/\x03" +
+ "/\x030\x030\x031\x031\x032\x032\x033\x033\x033\x034\x034\x035\x035\x03" +
+ "5\x036\x036\x037\x037\x038\x038\x039\x039\x039\x03:\x03:\x03:\x03;\x03" +
+ ";\x03;\x03<\x03<\x03=\x03=\x03>\x03>\x03>\x03?\x03?\x03?\x03@\x03@\x03" +
+ "@\x03A\x03A\x03A\x03B\x03B\x03B\x03C\x03C\x03C\x03D\x03D\x03D\x03E\x03" +
+ "E\x03F\x03F\x03F\x03G\x03G\x03H\x03H\x03H\x03I\x03I\x03J\x03J\x03K\x03" +
+ "K\x03L\x03L\x03M\x03M\x03M\x03N\x03N\x03N\x03O\x03O\x03O\x03O\x03P\x03" +
+ "P\x03Q\x03Q\x03Q\x07Q\u0259\nQ\fQ\x0EQ\u025C\vQ\x03R\x03R\x03R\x03R\x05" +
+ "R\u0262\nR\x03S\x03S\x05S\u0266\nS\x03S\x03S\x03T\x03T\x05T\u026C\nT\x03" +
+ "T\x03T\x03U\x03U\x03V\x06V\u0273\nV\rV\x0EV\u0274\x03V\x03V\x03W\x03W" +
+ "\x03W\x03W\x03X\x03X\x03X\x03X\x03X\x03X\x03X\x03Y\x03Y\x03Y\x03Y\x03" +
+ "Y\x03Y\x03Y\x03Z\x03Z\x03Z\x03Z\x03Z\x03Z\x03[\x03[\x03[\x03[\x03[\x03" +
+ "\\\x03\\\x03]\x03]\x03]\x03]\x03]\x03]\x03^\x03^\x03^\x03^\x03^\x03_\x03" +
+ "_\x03`\x03`\x03a\x03a\x03b\x03b\x03c\x06c\u02AC\nc\rc\x0Ec\u02AD\x03d" +
+ "\x03d\x03d\x06d\u02B3\nd\rd\x0Ed\u02B4\x03e\x03e\x03e\x06e\u02BA\ne\r" +
+ "e\x0Ee\u02BB\x03f\x03f\x03f\x06f\u02C1\nf\rf\x0Ef\u02C2\x03g\x03g\x03" +
+ "h\x03h\x03i\x03i\x03j\x03j\x03k\x03k\x05k\u02CF\nk\x03k\x03k\x03k\x05" +
+ "k\u02D4\nk\x03l\x05l\u02D7\nl\x03l\x03l\x03l\x03l\x03l\x05l\u02DE\nl\x03" +
+ "m\x03m\x05m\u02E2\nm\x03m\x03m\x03n\x06n\u02E7\nn\rn\x0En\u02E8\x03o\x03" +
+ "o\x03p\x06p\u02EE\np\rp\x0Ep\u02EF\x03q\x03q\x05q\u02F4\nq\x03r\x03r\x03" +
+ "r\x05r\u02F9\nr\x03s\x03s\x03s\x03t\x03t\x03t\x05t\u0301\nt\x03t\x05t" +
+ "\u0304\nt\x03u\x03u\x03u\x03u\x06u\u030A\nu\ru\x0Eu\u030B\x03v\x06v\u030F" +
+ "\nv\rv\x0Ev\u0310\x03w\x03w\x05w\u0315\nw\x03x\x06x\u0318\nx\rx\x0Ex\u0319" +
+ "\x03y\x03y\x05y\u031E\ny\x03z\x06z\u0321\nz\rz\x0Ez\u0322\x03{\x03{\x05" +
+ "{\u0327\n{\x03|\x06|\u032A\n|\r|\x0E|\u032B\x03}\x03}\x05}\u0330\n}\x03" +
+ "~\x07~\u0333\n~\f~\x0E~\u0336\v~\x03\u0105\x02\x02\x7F\x05\x02\x04\x07" +
+ "\x02\x05\t\x02\x06\v\x02\x07\r\x02\b\x0F\x02\t\x11\x02\n\x13\x02\v\x15" +
+ "\x02\f\x17\x02\r\x19\x02\x0E\x1B\x02\x0F\x1D\x02\x10\x1F\x02\x11!\x02" +
+ "\x12#\x02\x13%\x02\x14'\x02\x15)\x02\x16+\x02\x17-\x02\x18/\x02\x191" +
+ "\x02\x1A3\x02\x1B5\x02\x1C7\x02\x1D9\x02\x1E;\x02\x1F=\x02 ?\x02!A\x02" +
+ "\"C\x02#E\x02$G\x02%I\x02&K\x02'M\x02(O\x02)Q\x02*S\x02+U\x02,W\x02-" +
+ "Y\x02.[\x02/]\x020_\x021a\x022c\x023e\x024g\x025i\x026k\x027m\x028o\x02" +
+ "9q\x02:s\x02;u\x02{\x02?}\x02@\x7F\x02A\x81\x02B\x83\x02" +
+ "C\x85\x02D\x87\x02E\x89\x02F\x8B\x02G\x8D\x02H\x8F\x02I\x91\x02J\x93\x02" +
+ "K\x95\x02L\x97\x02M\x99\x02N\x9B\x02O\x9D\x02P\x9F\x02Q\xA1\x02R\xA3\x02" +
+ "S\xA5\x02T\xA7\x02U\xA9\x02V\xAB\x02W\xAD\x02X\xAF\x02Y\xB1\x02Z\xB3\x02" +
+ "[\xB5\x02\x02\xB7\x02\\\xB9\x02]\xBB\x02\x02\xBD\x02^\xBF\x02_\xC1\x02" +
+ "\x02\xC3\x02\x02\xC5\x02\x02\xC7\x02\x02\xC9\x02\x02\xCB\x02\x02\xCD\x02" +
+ "\x02\xCF\x02\x02\xD1\x02\x02\xD3\x02\x02\xD5\x02\x02\xD7\x02\x02\xD9\x02" +
+ "\x02\xDB\x02\x02\xDD\x02\x02\xDF\x02\x02\xE1\x02\x02\xE3\x02\x02\xE5\x02" +
+ "\x02\xE7\x02\x02\xE9\x02\x02\xEB\x02\x02\xED\x02\x02\xEF\x02\x02\xF1\x02" +
+ "\x02\xF3\x02\x02\xF5\x02\x02\xF7\x02\x02\xF9\x02\x02\xFB\x02\x02\xFD\x02" +
'\x02\x05\x02\x03\x04\x14\x06\x02\v\v\r\x0E""\xA2\xA2\x05\x02\f\f\x0F' +
"\x0F\u202A\u202B\x05\x02C\\aac|\x03\x022;\x04\x02DDdd\x04\x02QQqq\x04" +
"\x02ZZzz\x03\x023;\x03\x0223\x03\x0229\x05\x022;CHch\x04\x02GGgg\x04\x02" +
"--//\x06\x02\f\f\x0F\x0F))^^\x0E\x02$$))AA^^cdhhppttvvxx}}\x7F\x7F\b\x02" +
"\f\f\x0F\x0F))^^}}\x7F\x7F\b\x02\f\f\x0F\x0F$$^^}}\x7F\x7F\x06\x02\f\f" +
- "\x0F\x0F$$^^\x02\u031B\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02" +
+ "\x0F\x0F$$^^\x02\u0338\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02" +
"\x02\t\x03\x02\x02\x02\x02\v\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02" +
"\x0F\x03\x02\x02\x02\x02\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02\x02\x02" +
"\x15\x03\x02\x02\x02\x02\x17\x03\x02\x02\x02\x02\x19\x03\x02\x02\x02\x02" +
@@ -656,267 +668,278 @@ export class KipperLexer extends KipperLexerBase {
"\x02\x02\x02\x02\x99\x03\x02\x02\x02\x02\x9B\x03\x02\x02\x02\x02\x9D\x03" +
"\x02\x02\x02\x02\x9F\x03\x02\x02\x02\x02\xA1\x03\x02\x02\x02\x02\xA3\x03" +
"\x02\x02\x02\x02\xA5\x03\x02\x02\x02\x02\xA7\x03\x02\x02\x02\x02\xA9\x03" +
- "\x02\x02\x02\x02\xAB\x03\x02\x02\x02\x02\xAD\x03\x02\x02\x02\x03\xAF\x03" +
- "\x02\x02\x02\x03\xB1\x03\x02\x02\x02\x03\xB3\x03\x02\x02\x02\x04\xB5\x03" +
- "\x02\x02\x02\x04\xB7\x03\x02\x02\x02\x04\xB9\x03\x02\x02\x02\x05\xF9\x03" +
- "\x02\x02\x02\x07\u0107\x03\x02\x02\x02\t\u010E\x03\x02\x02\x02\v\u011A" +
- "\x03\x02\x02\x02\r\u0120\x03\x02\x02\x02\x0F\u0124\x03\x02\x02\x02\x11" +
- "\u0127\x03\x02\x02\x02\x13\u012B\x03\x02\x02\x02\x15\u0132\x03\x02\x02" +
- "\x02\x17\u0137\x03\x02\x02\x02\x19\u013F\x03\x02\x02\x02\x1B\u0145\x03" +
- "\x02\x02\x02\x1D\u014E\x03\x02\x02\x02\x1F\u0151\x03\x02\x02\x02!\u0157" +
- "\x03\x02\x02\x02#\u015A\x03\x02\x02\x02%\u015F\x03\x02\x02\x02'\u0163" +
- "\x03\x02\x02\x02)\u0168\x03\x02\x02\x02+\u016C\x03\x02\x02\x02-\u0173" +
- "\x03\x02\x02\x02/\u0178\x03\x02\x02\x021\u017B\x03\x02\x02\x023\u0181" +
- "\x03\x02\x02\x025\u018B\x03\x02\x02\x027\u0197\x03\x02\x02\x029\u019C" +
- "\x03\x02\x02\x02;\u01A2\x03\x02\x02\x02=\u01A9\x03\x02\x02\x02?\u01AD" +
- "\x03\x02\x02\x02A\u01B3\x03\x02\x02\x02C\u01BB\x03\x02\x02\x02E\u01C0" +
- "\x03\x02\x02\x02G\u01C5\x03\x02\x02\x02I\u01CF\x03\x02\x02\x02K\u01D1" +
- "\x03\x02\x02\x02M\u01D3\x03\x02\x02\x02O\u01D5\x03\x02\x02\x02Q\u01D7" +
- "\x03\x02\x02\x02S\u01D9\x03\x02\x02\x02U\u01DB\x03\x02\x02\x02W\u01DD" +
- "\x03\x02\x02\x02Y\u01DF\x03\x02\x02\x02[\u01E4\x03\x02\x02\x02]\u01E6" +
- "\x03\x02\x02\x02_\u01E8\x03\x02\x02\x02a\u01EA\x03\x02\x02\x02c\u01ED" +
- "\x03\x02\x02\x02e\u01EF\x03\x02\x02\x02g\u01F2\x03\x02\x02\x02i\u01F4" +
- "\x03\x02\x02\x02k\u01F6\x03\x02\x02\x02m\u01F8\x03\x02\x02\x02o\u01FB" +
- "\x03\x02\x02\x02q\u01FE\x03\x02\x02\x02s\u0201\x03\x02\x02\x02u\u0203" +
- "\x03\x02\x02\x02w\u0205\x03\x02\x02\x02y\u0208\x03\x02\x02\x02{\u020B" +
- "\x03\x02\x02\x02}\u020E\x03\x02\x02\x02\x7F\u0211\x03\x02\x02\x02\x81" +
- "\u0214\x03\x02\x02\x02\x83\u0217\x03\x02\x02\x02\x85\u021A\x03\x02\x02" +
- "\x02\x87\u021C\x03\x02\x02\x02\x89\u021F\x03\x02\x02\x02\x8B\u0221\x03" +
- "\x02\x02\x02\x8D\u0224\x03\x02\x02\x02\x8F\u0226\x03\x02\x02\x02\x91\u0228" +
- "\x03\x02\x02\x02\x93\u022A\x03\x02\x02\x02\x95\u022C\x03\x02\x02\x02\x97" +
- "\u022F\x03\x02\x02\x02\x99\u0232\x03\x02\x02\x02\x9B\u0236\x03\x02\x02" +
- "\x02\x9D\u0238\x03\x02\x02\x02\x9F\u0244\x03\x02\x02\x02\xA1\u0246\x03" +
- "\x02\x02\x02\xA3\u024C\x03\x02\x02\x02\xA5\u0252\x03\x02\x02\x02\xA7\u0255" +
- "\x03\x02\x02\x02\xA9\u025B\x03\x02\x02\x02\xAB\u025F\x03\x02\x02\x02\xAD" +
- "\u0266\x03\x02\x02\x02\xAF\u026D\x03\x02\x02\x02\xB1\u0273\x03\x02\x02" +
- "\x02\xB3\u0278\x03\x02\x02\x02\xB5\u027A\x03\x02\x02\x02\xB7\u0280\x03" +
- "\x02\x02\x02\xB9\u0285\x03\x02\x02\x02\xBB\u0287\x03\x02\x02\x02\xBD\u0289" +
- "\x03\x02\x02\x02\xBF\u028B\x03\x02\x02\x02\xC1\u028E\x03\x02\x02\x02\xC3" +
- "\u0292\x03\x02\x02\x02\xC5\u0299\x03\x02\x02\x02\xC7\u02A0\x03\x02\x02" +
- "\x02\xC9\u02A7\x03\x02\x02\x02\xCB\u02A9\x03\x02\x02\x02\xCD\u02AB\x03" +
- "\x02\x02\x02\xCF\u02AD\x03\x02\x02\x02\xD1\u02B6\x03\x02\x02\x02\xD3\u02C0" +
- "\x03\x02\x02\x02\xD5\u02C2\x03\x02\x02\x02\xD7\u02C9\x03\x02\x02\x02\xD9" +
- "\u02CD\x03\x02\x02\x02\xDB\u02D0\x03\x02\x02\x02\xDD\u02D6\x03\x02\x02" +
- "\x02\xDF\u02DB\x03\x02\x02\x02\xE1\u02DD\x03\x02\x02\x02\xE3\u02E0\x03" +
- "\x02\x02\x02\xE5\u02E8\x03\x02\x02\x02\xE7\u02F1\x03\x02\x02\x02\xE9\u02F7" +
- "\x03\x02\x02\x02\xEB\u02FA\x03\x02\x02\x02\xED\u0300\x03\x02\x02\x02\xEF" +
- "\u0303\x03\x02\x02\x02\xF1\u0309\x03\x02\x02\x02\xF3\u030C\x03\x02\x02" +
- "\x02\xF5\u0312\x03\x02\x02\x02\xF7\u0317\x03\x02\x02\x02\xF9\xFA\x071" +
- "\x02\x02\xFA\xFB\x07,\x02\x02\xFB\xFF\x03\x02\x02\x02\xFC\xFE\v\x02\x02" +
- "\x02\xFD\xFC\x03\x02\x02\x02\xFE\u0101\x03\x02\x02\x02\xFF\u0100\x03\x02" +
- "\x02\x02\xFF\xFD\x03\x02\x02\x02\u0100\u0102\x03\x02\x02\x02\u0101\xFF" +
- "\x03\x02\x02\x02\u0102\u0103\x07,\x02\x02\u0103\u0104\x071\x02\x02\u0104" +
- "\u0105\x03\x02\x02\x02\u0105\u0106\b\x02\x02\x02\u0106\x06\x03\x02\x02" +
- "\x02\u0107\u0108\x071\x02\x02\u0108\u0109\x071\x02\x02\u0109\u010A\x03" +
- "\x02\x02\x02\u010A\u010B\x05\xF7{\x02\u010B\u010C\x03\x02\x02\x02\u010C" +
- "\u010D\b\x03\x02\x02\u010D\b\x03\x02\x02\x02\u010E\u010F\x07%\x02\x02" +
- "\u010F\u0110\x07r\x02\x02\u0110\u0111\x07t\x02\x02\u0111\u0112\x07c\x02" +
- "\x02\u0112\u0113\x07i\x02\x02\u0113\u0114\x07o\x02\x02\u0114\u0115\x07" +
- "c\x02\x02\u0115\u0116\x03\x02\x02\x02\u0116\u0117\x05\xF7{\x02\u0117\u0118" +
- "\x03\x02\x02\x02\u0118\u0119\b\x04\x03\x02\u0119\n\x03\x02\x02\x02\u011A" +
- "\u011B\x07e\x02\x02\u011B\u011C\x07q\x02\x02\u011C\u011D\x07p\x02\x02" +
- "\u011D\u011E\x07u\x02\x02\u011E\u011F\x07v\x02\x02\u011F\f\x03\x02\x02" +
- "\x02\u0120\u0121\x07x\x02\x02\u0121\u0122\x07c\x02\x02\u0122\u0123\x07" +
- "t\x02\x02\u0123\x0E\x03\x02\x02\x02\u0124\u0125\x07c\x02\x02\u0125\u0126" +
- "\x07u\x02\x02\u0126\x10\x03\x02\x02\x02\u0127\u0128\x070\x02\x02\u0128" +
- "\u0129\x070\x02\x02\u0129\u012A\x070\x02\x02\u012A\x12\x03\x02\x02\x02" +
- "\u012B\u012C\x07u\x02\x02\u012C\u012D\x07y\x02\x02\u012D\u012E\x07k\x02" +
- "\x02\u012E\u012F\x07v\x02\x02\u012F\u0130\x07e\x02\x02\u0130\u0131\x07" +
- "j\x02\x02\u0131\x14\x03\x02\x02\x02\u0132\u0133\x07e\x02\x02\u0133\u0134" +
- "\x07c\x02\x02\u0134\u0135\x07u\x02\x02\u0135\u0136\x07g\x02\x02\u0136" +
- "\x16\x03\x02\x02\x02\u0137\u0138\x07f\x02\x02\u0138\u0139\x07g\x02\x02" +
- "\u0139\u013A\x07h\x02\x02\u013A\u013B\x07c\x02\x02\u013B\u013C\x07w\x02" +
- "\x02\u013C\u013D\x07n\x02\x02\u013D\u013E\x07v\x02\x02\u013E\x18\x03\x02" +
- "\x02\x02\u013F\u0140\x07d\x02\x02\u0140\u0141\x07t\x02\x02\u0141\u0142" +
- "\x07g\x02\x02\u0142\u0143\x07c\x02\x02\u0143\u0144\x07m\x02\x02\u0144" +
- "\x1A\x03\x02\x02\x02\u0145\u0146\x07e\x02\x02\u0146\u0147\x07q\x02\x02" +
- "\u0147\u0148\x07p\x02\x02\u0148\u0149\x07v\x02\x02\u0149\u014A\x07k\x02" +
- "\x02\u014A\u014B\x07p\x02\x02\u014B\u014C\x07w\x02\x02\u014C\u014D\x07" +
- "g\x02\x02\u014D\x1C\x03\x02\x02\x02\u014E\u014F\x07f\x02\x02\u014F\u0150" +
- "\x07q\x02\x02\u0150\x1E\x03\x02\x02\x02\u0151\u0152\x07y\x02\x02\u0152" +
- "\u0153\x07j\x02\x02\u0153\u0154\x07k\x02\x02\u0154\u0155\x07n\x02\x02" +
- "\u0155\u0156\x07g\x02\x02\u0156 \x03\x02\x02\x02\u0157\u0158\x07k\x02" +
- '\x02\u0158\u0159\x07h\x02\x02\u0159"\x03\x02\x02\x02\u015A\u015B\x07' +
- "g\x02\x02\u015B\u015C\x07n\x02\x02\u015C\u015D\x07u\x02\x02\u015D\u015E" +
- "\x07g\x02\x02\u015E$\x03\x02\x02\x02\u015F\u0160\x07h\x02\x02\u0160\u0161" +
- "\x07q\x02\x02\u0161\u0162\x07t\x02\x02\u0162&\x03\x02\x02\x02\u0163\u0164" +
- "\x07g\x02\x02\u0164\u0165\x07p\x02\x02\u0165\u0166\x07w\x02\x02\u0166" +
- "\u0167\x07o\x02\x02\u0167(\x03\x02\x02\x02\u0168\u0169\x07f\x02\x02\u0169" +
- "\u016A\x07g\x02\x02\u016A\u016B\x07h\x02\x02\u016B*\x03\x02\x02\x02\u016C" +
- "\u016D\x07t\x02\x02\u016D\u016E\x07g\x02\x02\u016E\u016F\x07v\x02\x02" +
- "\u016F\u0170\x07w\x02\x02\u0170\u0171\x07t\x02\x02\u0171\u0172\x07p\x02" +
- "\x02\u0172,\x03\x02\x02\x02\u0173\u0174\x07e\x02\x02\u0174\u0175\x07c" +
- "\x02\x02\u0175\u0176\x07n\x02\x02\u0176\u0177\x07n\x02\x02\u0177.\x03" +
- "\x02\x02\x02\u0178\u0179\x07/\x02\x02\u0179\u017A\x07@\x02\x02\u017A0" +
- "\x03\x02\x02\x02\u017B\u017C\x07e\x02\x02\u017C\u017D\x07n\x02\x02\u017D" +
- "\u017E\x07c\x02\x02\u017E\u017F\x07u\x02\x02\u017F\u0180\x07u\x02\x02" +
- "\u01802\x03\x02\x02\x02\u0181\u0182\x07k\x02\x02\u0182\u0183\x07p\x02" +
- "\x02\u0183\u0184\x07v\x02\x02\u0184\u0185\x07g\x02\x02\u0185\u0186\x07" +
- "t\x02\x02\u0186\u0187\x07h\x02\x02\u0187\u0188\x07c\x02\x02\u0188\u0189" +
- "\x07e\x02\x02\u0189\u018A\x07g\x02\x02\u018A4\x03\x02\x02\x02\u018B\u018C" +
- "\x07e\x02\x02\u018C\u018D\x07q\x02\x02\u018D\u018E\x07p\x02\x02\u018E" +
- "\u018F\x07u\x02\x02\u018F\u0190\x07v\x02\x02\u0190\u0191\x07t\x02\x02" +
- "\u0191\u0192\x07w\x02\x02\u0192\u0193\x07e\x02\x02\u0193\u0194\x07v\x02" +
- "\x02\u0194\u0195\x07q\x02\x02\u0195\u0196\x07t\x02\x02\u01966\x03\x02" +
- "\x02\x02\u0197\u0198\x07v\x02\x02\u0198\u0199\x07t\x02\x02\u0199\u019A" +
- "\x07w\x02\x02\u019A\u019B\x07g\x02\x02\u019B8\x03\x02\x02\x02\u019C\u019D" +
- "\x07h\x02\x02\u019D\u019E\x07c\x02\x02\u019E\u019F\x07n\x02\x02\u019F" +
- "\u01A0\x07u\x02\x02\u01A0\u01A1\x07g\x02\x02\u01A1:\x03\x02\x02\x02\u01A2" +
- "\u01A3\x07v\x02\x02\u01A3\u01A4\x07{\x02\x02\u01A4\u01A5\x07r\x02\x02" +
- "\u01A5\u01A6\x07g\x02\x02\u01A6\u01A7\x07q\x02\x02\u01A7\u01A8\x07h\x02" +
- "\x02\u01A8<\x03\x02\x02\x02\u01A9\u01AA\x07v\x02\x02\u01AA\u01AB\x07t" +
- "\x02\x02\u01AB\u01AC\x07{\x02\x02\u01AC>\x03\x02\x02\x02\u01AD\u01AE\x07" +
- "e\x02\x02\u01AE\u01AF\x07c\x02\x02\u01AF\u01B0\x07v\x02\x02\u01B0\u01B1" +
- "\x07e\x02\x02\u01B1\u01B2\x07j\x02\x02\u01B2@\x03\x02\x02\x02\u01B3\u01B4" +
- "\x07h\x02\x02\u01B4\u01B5\x07k\x02\x02\u01B5\u01B6\x07p\x02\x02\u01B6" +
- "\u01B7\x07c\x02\x02\u01B7\u01B8\x07n\x02\x02\u01B8\u01B9\x07n\x02\x02" +
- "\u01B9\u01BA\x07{\x02\x02\u01BAB\x03\x02\x02\x02\u01BB\u01BC\x07x\x02" +
- "\x02\u01BC\u01BD\x07q\x02\x02\u01BD\u01BE\x07k\x02\x02\u01BE\u01BF\x07" +
- "f\x02\x02\u01BFD\x03\x02\x02\x02\u01C0\u01C1\x07p\x02\x02\u01C1\u01C2" +
- "\x07w\x02\x02\u01C2\u01C3\x07n\x02\x02\u01C3\u01C4\x07n\x02\x02\u01C4" +
- "F\x03\x02\x02\x02\u01C5\u01C6\x07w\x02\x02\u01C6\u01C7\x07p\x02\x02\u01C7" +
- "\u01C8\x07f\x02\x02\u01C8\u01C9\x07g\x02\x02\u01C9\u01CA\x07h\x02\x02" +
- "\u01CA\u01CB\x07k\x02\x02\u01CB\u01CC\x07p\x02\x02\u01CC\u01CD\x07g\x02" +
- "\x02\u01CD\u01CE\x07f\x02\x02\u01CEH\x03\x02\x02\x02\u01CF\u01D0\x07." +
- "\x02\x02\u01D0J\x03\x02\x02\x02\u01D1\u01D2\x07=\x02\x02\u01D2L\x03\x02" +
- "\x02\x02\u01D3\u01D4\x07A\x02\x02\u01D4N\x03\x02\x02\x02\u01D5\u01D6\x07" +
- "<\x02\x02\u01D6P\x03\x02\x02\x02\u01D7\u01D8\x07*\x02\x02\u01D8R\x03\x02" +
- "\x02\x02\u01D9\u01DA\x07+\x02\x02\u01DAT\x03\x02\x02\x02\u01DB\u01DC\x07" +
- "]\x02\x02\u01DCV\x03\x02\x02\x02\u01DD\u01DE\x07_\x02\x02\u01DEX\x03\x02" +
- "\x02\x02\u01DF\u01E0\x06,\x02\x02\u01E0\u01E1\x07\x7F\x02\x02\u01E1\u01E2" +
- "\x03\x02\x02\x02\u01E2\u01E3\b,\x04\x02\u01E3Z\x03\x02\x02\x02\u01E4\u01E5" +
- "\x07}\x02\x02\u01E5\\\x03\x02\x02\x02\u01E6\u01E7\x07\x7F\x02\x02\u01E7" +
- "^\x03\x02\x02\x02\u01E8\u01E9\x07-\x02\x02\u01E9`\x03\x02\x02\x02\u01EA" +
- "\u01EB\x07-\x02\x02\u01EB\u01EC\x07-\x02\x02\u01ECb\x03\x02\x02\x02\u01ED" +
- "\u01EE\x07/\x02\x02\u01EEd\x03\x02\x02\x02\u01EF\u01F0\x07/\x02\x02\u01F0" +
- "\u01F1\x07/\x02\x02\u01F1f\x03\x02\x02\x02\u01F2\u01F3\x07,\x02\x02\u01F3" +
- "h\x03\x02\x02\x02\u01F4\u01F5\x071\x02\x02\u01F5j\x03\x02\x02\x02\u01F6" +
- "\u01F7\x07'\x02\x02\u01F7l\x03\x02\x02\x02\u01F8\u01F9\x07,\x02\x02\u01F9" +
- "\u01FA\x07,\x02\x02";
+ "\x02\x02\x02\x02\xAB\x03\x02\x02\x02\x02\xAD\x03\x02\x02\x02\x02\xAF\x03" +
+ "\x02\x02\x02\x02\xB1\x03\x02\x02\x02\x02\xB3\x03\x02\x02\x02\x03\xB5\x03" +
+ "\x02\x02\x02\x03\xB7\x03\x02\x02\x02\x03\xB9\x03\x02\x02\x02\x04\xBB\x03" +
+ "\x02\x02\x02\x04\xBD\x03\x02\x02\x02\x04\xBF\x03\x02\x02\x02\x05\xFF\x03" +
+ "\x02\x02\x02\x07\u010D\x03\x02\x02\x02\t\u0114\x03\x02\x02\x02\v\u0120" +
+ "\x03\x02\x02\x02\r\u012B\x03\x02\x02\x02\x0F\u0131\x03\x02\x02\x02\x11" +
+ "\u0135\x03\x02\x02\x02\x13\u0138\x03\x02\x02\x02\x15\u013C\x03\x02\x02" +
+ "\x02\x17\u0143\x03\x02\x02\x02\x19\u0148\x03\x02\x02\x02\x1B\u0150\x03" +
+ "\x02\x02\x02\x1D\u0156\x03\x02\x02\x02\x1F\u015F\x03\x02\x02\x02!\u0162" +
+ "\x03\x02\x02\x02#\u0168\x03\x02\x02\x02%\u016B\x03\x02\x02\x02'\u0170" +
+ "\x03\x02\x02\x02)\u0174\x03\x02\x02\x02+\u0179\x03\x02\x02\x02-\u017D" +
+ "\x03\x02\x02\x02/\u0184\x03\x02\x02\x021\u0189\x03\x02\x02\x023\u018C" +
+ "\x03\x02\x02\x025\u0192\x03\x02\x02\x027\u019C\x03\x02\x02\x029\u01A8" +
+ "\x03\x02\x02\x02;\u01AC\x03\x02\x02\x02=\u01B1\x03\x02\x02\x02?\u01B7" +
+ "\x03\x02\x02\x02A\u01BF\x03\x02\x02\x02C\u01C6\x03\x02\x02\x02E\u01CA" +
+ "\x03\x02\x02\x02G\u01D0\x03\x02\x02\x02I\u01D8\x03\x02\x02\x02K\u01DD" +
+ "\x03\x02\x02\x02M\u01E2\x03\x02\x02\x02O\u01EC\x03\x02\x02\x02Q\u01EE" +
+ "\x03\x02\x02\x02S\u01F0\x03\x02\x02\x02U\u01F2\x03\x02\x02\x02W\u01F4" +
+ "\x03\x02\x02\x02Y\u01F6\x03\x02\x02\x02[\u01F8\x03\x02\x02\x02]\u01FA" +
+ "\x03\x02\x02\x02_\u01FC\x03\x02\x02\x02a\u0201\x03\x02\x02\x02c\u0203" +
+ "\x03\x02\x02\x02e\u0205\x03\x02\x02\x02g\u0207\x03\x02\x02\x02i\u020A" +
+ "\x03\x02\x02\x02k\u020C\x03\x02\x02\x02m\u020F\x03\x02\x02\x02o\u0211" +
+ "\x03\x02\x02\x02q\u0213\x03\x02\x02\x02s\u0215\x03\x02\x02\x02u\u0218" +
+ "\x03\x02\x02\x02w\u021B\x03\x02\x02\x02y\u021E\x03\x02\x02\x02{\u0220" +
+ "\x03\x02\x02\x02}\u0222\x03\x02\x02\x02\x7F\u0225\x03\x02\x02\x02\x81" +
+ "\u0228\x03\x02\x02\x02\x83\u022B\x03\x02\x02\x02\x85\u022E\x03\x02\x02" +
+ "\x02\x87\u0231\x03\x02\x02\x02\x89\u0234\x03\x02\x02\x02\x8B\u0237\x03" +
+ "\x02\x02\x02\x8D\u0239\x03\x02\x02\x02\x8F\u023C\x03\x02\x02\x02\x91\u023E" +
+ "\x03\x02\x02\x02\x93\u0241\x03\x02\x02\x02\x95\u0243\x03\x02\x02\x02\x97" +
+ "\u0245\x03\x02\x02\x02\x99\u0247\x03\x02\x02\x02\x9B\u0249\x03\x02\x02" +
+ "\x02\x9D\u024C\x03\x02\x02\x02\x9F\u024F\x03\x02\x02\x02\xA1\u0253\x03" +
+ "\x02\x02\x02\xA3\u0255\x03\x02\x02\x02\xA5\u0261\x03\x02\x02\x02\xA7\u0263" +
+ "\x03\x02\x02\x02\xA9\u0269\x03\x02\x02\x02\xAB\u026F\x03\x02\x02\x02\xAD" +
+ "\u0272\x03\x02\x02\x02\xAF\u0278\x03\x02\x02\x02\xB1\u027C\x03\x02\x02" +
+ "\x02\xB3\u0283\x03\x02\x02\x02\xB5\u028A\x03\x02\x02\x02\xB7\u0290\x03" +
+ "\x02\x02\x02\xB9\u0295\x03\x02\x02\x02\xBB\u0297\x03\x02\x02\x02\xBD\u029D" +
+ "\x03\x02\x02\x02\xBF\u02A2\x03\x02\x02\x02\xC1\u02A4\x03\x02\x02\x02\xC3" +
+ "\u02A6\x03\x02\x02\x02\xC5\u02A8\x03\x02\x02\x02\xC7\u02AB\x03\x02\x02" +
+ "\x02\xC9\u02AF\x03\x02\x02\x02\xCB\u02B6\x03\x02\x02\x02\xCD\u02BD\x03" +
+ "\x02\x02\x02\xCF\u02C4\x03\x02\x02\x02\xD1\u02C6\x03\x02\x02\x02\xD3\u02C8" +
+ "\x03\x02\x02\x02\xD5\u02CA\x03\x02\x02\x02\xD7\u02D3\x03\x02\x02\x02\xD9" +
+ "\u02DD\x03\x02\x02\x02\xDB\u02DF\x03\x02\x02\x02\xDD\u02E6\x03\x02\x02" +
+ "\x02\xDF\u02EA\x03\x02\x02\x02\xE1\u02ED\x03\x02\x02\x02\xE3\u02F3\x03" +
+ "\x02\x02\x02\xE5\u02F8\x03\x02\x02\x02\xE7\u02FA\x03\x02\x02\x02\xE9\u02FD" +
+ "\x03\x02\x02\x02\xEB\u0305\x03\x02\x02\x02\xED\u030E\x03\x02\x02\x02\xEF" +
+ "\u0314\x03\x02\x02\x02\xF1\u0317\x03\x02\x02\x02\xF3\u031D\x03\x02\x02" +
+ "\x02\xF5\u0320\x03\x02\x02\x02\xF7\u0326\x03\x02\x02\x02\xF9\u0329\x03" +
+ "\x02\x02\x02\xFB\u032F\x03\x02\x02\x02\xFD\u0334\x03\x02\x02\x02\xFF\u0100" +
+ "\x071\x02\x02\u0100\u0101\x07,\x02\x02\u0101\u0105\x03\x02\x02\x02\u0102" +
+ "\u0104\v\x02\x02\x02\u0103\u0102\x03\x02\x02\x02\u0104\u0107\x03\x02\x02" +
+ "\x02\u0105\u0106\x03\x02\x02\x02\u0105\u0103\x03\x02\x02\x02\u0106\u0108" +
+ "\x03\x02\x02\x02\u0107\u0105\x03\x02\x02\x02\u0108\u0109\x07,\x02\x02" +
+ "\u0109\u010A\x071\x02\x02\u010A\u010B\x03\x02\x02\x02\u010B\u010C\b\x02" +
+ "\x02\x02\u010C\x06\x03\x02\x02\x02\u010D\u010E\x071\x02\x02\u010E\u010F" +
+ "\x071\x02\x02\u010F\u0110\x03\x02\x02\x02\u0110\u0111\x05\xFD~\x02\u0111" +
+ "\u0112\x03\x02\x02\x02\u0112\u0113\b\x03\x02\x02\u0113\b\x03\x02\x02\x02" +
+ "\u0114\u0115\x07%\x02\x02\u0115\u0116\x07r\x02\x02\u0116\u0117\x07t\x02" +
+ "\x02\u0117\u0118\x07c\x02\x02\u0118\u0119\x07i\x02\x02\u0119\u011A\x07" +
+ "o\x02\x02\u011A\u011B\x07c\x02\x02\u011B\u011C\x03\x02\x02\x02\u011C\u011D" +
+ "\x05\xFD~\x02\u011D\u011E\x03\x02\x02\x02\u011E\u011F\b\x04\x03\x02\u011F" +
+ "\n\x03\x02\x02\x02\u0120\u0121\x07k\x02\x02\u0121\u0122\x07p\x02\x02\u0122" +
+ "\u0123\x07u\x02\x02\u0123\u0124\x07v\x02\x02\u0124\u0125\x07c\x02\x02" +
+ "\u0125\u0126\x07p\x02\x02\u0126\u0127\x07e\x02\x02\u0127\u0128\x07g\x02" +
+ "\x02\u0128\u0129\x07q\x02\x02\u0129\u012A\x07h\x02\x02\u012A\f\x03\x02" +
+ "\x02\x02\u012B\u012C\x07e\x02\x02\u012C\u012D\x07q\x02\x02\u012D\u012E" +
+ "\x07p\x02\x02\u012E\u012F\x07u\x02\x02\u012F\u0130\x07v\x02\x02\u0130" +
+ "\x0E\x03\x02\x02\x02\u0131\u0132\x07x\x02\x02\u0132\u0133\x07c\x02\x02" +
+ "\u0133\u0134\x07t\x02\x02\u0134\x10\x03\x02\x02\x02\u0135\u0136\x07c\x02" +
+ "\x02\u0136\u0137\x07u\x02\x02\u0137\x12\x03\x02\x02\x02\u0138\u0139\x07" +
+ "0\x02\x02\u0139\u013A\x070\x02\x02\u013A\u013B\x070\x02\x02\u013B\x14" +
+ "\x03\x02\x02\x02\u013C\u013D\x07u\x02\x02\u013D\u013E\x07y\x02\x02\u013E" +
+ "\u013F\x07k\x02\x02\u013F\u0140\x07v\x02\x02\u0140\u0141\x07e\x02\x02" +
+ "\u0141\u0142\x07j\x02\x02\u0142\x16\x03\x02\x02\x02\u0143\u0144\x07e\x02" +
+ "\x02\u0144\u0145\x07c\x02\x02\u0145\u0146\x07u\x02\x02\u0146\u0147\x07" +
+ "g\x02\x02\u0147\x18\x03\x02\x02\x02\u0148\u0149\x07f\x02\x02\u0149\u014A" +
+ "\x07g\x02\x02\u014A\u014B\x07h\x02\x02\u014B\u014C\x07c\x02\x02\u014C" +
+ "\u014D\x07w\x02\x02\u014D\u014E\x07n\x02\x02\u014E\u014F\x07v\x02\x02" +
+ "\u014F\x1A\x03\x02\x02\x02\u0150\u0151\x07d\x02\x02\u0151\u0152\x07t\x02" +
+ "\x02\u0152\u0153\x07g\x02\x02\u0153\u0154\x07c\x02\x02\u0154\u0155\x07" +
+ "m\x02\x02\u0155\x1C\x03\x02\x02\x02\u0156\u0157\x07e\x02\x02\u0157\u0158" +
+ "\x07q\x02\x02\u0158\u0159\x07p\x02\x02\u0159\u015A\x07v\x02\x02\u015A" +
+ "\u015B\x07k\x02\x02\u015B\u015C\x07p\x02\x02\u015C\u015D\x07w\x02\x02" +
+ "\u015D\u015E\x07g\x02\x02\u015E\x1E\x03\x02\x02\x02\u015F\u0160\x07f\x02" +
+ "\x02\u0160\u0161\x07q\x02\x02\u0161 \x03\x02\x02\x02\u0162\u0163\x07y" +
+ "\x02\x02\u0163\u0164\x07j\x02\x02\u0164\u0165\x07k\x02\x02\u0165\u0166" +
+ '\x07n\x02\x02\u0166\u0167\x07g\x02\x02\u0167"\x03\x02\x02\x02\u0168\u0169' +
+ "\x07k\x02\x02\u0169\u016A\x07h\x02\x02\u016A$\x03\x02\x02\x02\u016B\u016C" +
+ "\x07g\x02\x02\u016C\u016D\x07n\x02\x02\u016D\u016E\x07u\x02\x02\u016E" +
+ "\u016F\x07g\x02\x02\u016F&\x03\x02\x02\x02\u0170\u0171\x07h\x02\x02\u0171" +
+ "\u0172\x07q\x02\x02\u0172\u0173\x07t\x02\x02\u0173(\x03\x02\x02\x02\u0174" +
+ "\u0175\x07g\x02\x02\u0175\u0176\x07p\x02\x02\u0176\u0177\x07w\x02\x02" +
+ "\u0177\u0178\x07o\x02\x02\u0178*\x03\x02\x02\x02\u0179\u017A\x07f\x02" +
+ "\x02\u017A\u017B\x07g\x02\x02\u017B\u017C\x07h\x02\x02\u017C,\x03\x02" +
+ "\x02\x02\u017D\u017E\x07t\x02\x02\u017E\u017F\x07g\x02\x02\u017F\u0180" +
+ "\x07v\x02\x02\u0180\u0181\x07w\x02\x02\u0181\u0182\x07t\x02\x02\u0182" +
+ "\u0183\x07p\x02\x02\u0183.\x03\x02\x02\x02\u0184\u0185\x07e\x02\x02\u0185" +
+ "\u0186\x07c\x02\x02\u0186\u0187\x07n\x02\x02\u0187\u0188\x07n\x02\x02" +
+ "\u01880\x03\x02\x02\x02\u0189\u018A\x07/\x02\x02\u018A\u018B\x07@\x02" +
+ "\x02\u018B2\x03\x02\x02\x02\u018C\u018D\x07e\x02\x02\u018D\u018E\x07n" +
+ "\x02\x02\u018E\u018F\x07c\x02\x02\u018F\u0190\x07u\x02\x02\u0190\u0191" +
+ "\x07u\x02\x02\u01914\x03\x02\x02\x02\u0192\u0193\x07k\x02\x02\u0193\u0194" +
+ "\x07p\x02\x02\u0194\u0195\x07v\x02\x02\u0195\u0196\x07g\x02\x02\u0196" +
+ "\u0197\x07t\x02\x02\u0197\u0198\x07h\x02\x02\u0198\u0199\x07c\x02\x02" +
+ "\u0199\u019A\x07e\x02\x02\u019A\u019B\x07g\x02\x02\u019B6\x03\x02\x02" +
+ "\x02\u019C\u019D\x07e\x02\x02\u019D\u019E\x07q\x02\x02\u019E\u019F\x07" +
+ "p\x02\x02\u019F\u01A0\x07u\x02\x02\u01A0\u01A1\x07v\x02\x02\u01A1\u01A2" +
+ "\x07t\x02\x02\u01A2\u01A3\x07w\x02\x02\u01A3\u01A4\x07e\x02\x02\u01A4" +
+ "\u01A5\x07v\x02\x02\u01A5\u01A6\x07q\x02\x02\u01A6\u01A7\x07t\x02\x02" +
+ "\u01A78\x03\x02\x02\x02\u01A8\u01A9\x07p\x02\x02\u01A9\u01AA\x07g\x02" +
+ "\x02\u01AA\u01AB\x07y\x02\x02\u01AB:\x03\x02\x02\x02\u01AC\u01AD\x07v" +
+ "\x02\x02\u01AD\u01AE\x07t\x02\x02\u01AE\u01AF\x07w\x02\x02\u01AF\u01B0" +
+ "\x07g\x02\x02\u01B0<\x03\x02\x02\x02\u01B1\u01B2\x07h\x02\x02\u01B2\u01B3" +
+ "\x07c\x02\x02\u01B3\u01B4\x07n\x02\x02\u01B4\u01B5\x07u\x02\x02\u01B5" +
+ "\u01B6\x07g\x02\x02\u01B6>\x03\x02\x02\x02\u01B7\u01B8\x07o\x02\x02\u01B8" +
+ "\u01B9\x07c\x02\x02\u01B9\u01BA\x07v\x02\x02\u01BA\u01BB\x07e\x02\x02" +
+ "\u01BB\u01BC\x07j\x02\x02\u01BC\u01BD\x07g\x02\x02\u01BD\u01BE\x07u\x02" +
+ "\x02\u01BE@\x03\x02\x02\x02\u01BF\u01C0\x07v\x02\x02\u01C0\u01C1\x07{" +
+ "\x02\x02\u01C1\u01C2\x07r\x02\x02\u01C2\u01C3\x07g\x02\x02\u01C3\u01C4" +
+ "\x07q\x02\x02\u01C4\u01C5\x07h\x02\x02\u01C5B\x03\x02\x02\x02\u01C6\u01C7" +
+ "\x07v\x02\x02\u01C7\u01C8\x07t\x02\x02\u01C8\u01C9\x07{\x02\x02\u01C9" +
+ "D\x03\x02\x02\x02\u01CA\u01CB\x07e\x02\x02\u01CB\u01CC\x07c\x02\x02\u01CC" +
+ "\u01CD\x07v\x02\x02\u01CD\u01CE\x07e\x02\x02\u01CE\u01CF\x07j\x02\x02" +
+ "\u01CFF\x03\x02\x02\x02\u01D0\u01D1\x07h\x02\x02\u01D1\u01D2\x07k\x02" +
+ "\x02\u01D2\u01D3\x07p\x02\x02\u01D3\u01D4\x07c\x02\x02\u01D4\u01D5\x07" +
+ "n\x02\x02\u01D5\u01D6\x07n\x02\x02\u01D6\u01D7\x07{\x02\x02\u01D7H\x03" +
+ "\x02\x02\x02\u01D8\u01D9\x07x\x02\x02\u01D9\u01DA\x07q\x02\x02\u01DA\u01DB" +
+ "\x07k\x02\x02\u01DB\u01DC\x07f\x02\x02\u01DCJ\x03\x02\x02\x02\u01DD\u01DE" +
+ "\x07p\x02\x02\u01DE\u01DF\x07w\x02\x02\u01DF\u01E0\x07n\x02\x02\u01E0" +
+ "\u01E1\x07n\x02\x02\u01E1L\x03\x02\x02\x02\u01E2\u01E3\x07w\x02\x02\u01E3" +
+ "\u01E4\x07p\x02\x02\u01E4\u01E5\x07f\x02\x02\u01E5\u01E6\x07g\x02\x02" +
+ "\u01E6\u01E7\x07h\x02\x02\u01E7\u01E8\x07k\x02\x02\u01E8\u01E9\x07p\x02" +
+ "\x02\u01E9\u01EA\x07g\x02\x02\u01EA\u01EB\x07f\x02\x02\u01EBN\x03\x02" +
+ "\x02\x02\u01EC\u01ED\x07.\x02\x02\u01EDP\x03\x02\x02\x02\u01EE\u01EF\x07" +
+ "=\x02";
private static readonly _serializedATNSegment1: string =
- "\u01FAn\x03\x02\x02\x02\u01FB\u01FC\x07(\x02\x02\u01FC\u01FD\x07(\x02" +
- "\x02\u01FDp\x03\x02\x02\x02\u01FE\u01FF\x07~\x02\x02\u01FF\u0200\x07~" +
- "\x02\x02\u0200r\x03\x02\x02\x02\u0201\u0202\x07#\x02\x02\u0202t\x03\x02" +
- "\x02\x02\u0203\u0204\x07?\x02\x02\u0204v\x03\x02\x02\x02\u0205\u0206\x07" +
- "-\x02\x02\u0206\u0207\x07?\x02\x02\u0207x\x03\x02\x02\x02\u0208\u0209" +
- "\x07/\x02\x02\u0209\u020A\x07?\x02\x02\u020Az\x03\x02\x02\x02\u020B\u020C" +
- "\x07,\x02\x02\u020C\u020D\x07?\x02\x02\u020D|\x03\x02\x02\x02\u020E\u020F" +
- "\x071\x02\x02\u020F\u0210\x07?\x02\x02\u0210~\x03\x02\x02\x02\u0211\u0212" +
- "\x07'\x02\x02\u0212\u0213\x07?\x02\x02\u0213\x80\x03\x02\x02\x02\u0214" +
- "\u0215\x07?\x02\x02\u0215\u0216\x07?\x02\x02\u0216\x82\x03\x02\x02\x02" +
- "\u0217\u0218\x07#\x02\x02\u0218\u0219\x07?\x02\x02\u0219\x84\x03\x02\x02" +
- "\x02\u021A\u021B\x07>\x02\x02\u021B\x86\x03\x02\x02\x02\u021C\u021D\x07" +
- ">\x02\x02\u021D\u021E\x07?\x02\x02\u021E\x88\x03\x02\x02\x02\u021F\u0220" +
- "\x07@\x02\x02\u0220\x8A\x03\x02\x02\x02\u0221\u0222\x07@\x02\x02\u0222" +
- "\u0223\x07?\x02\x02\u0223\x8C\x03\x02\x02\x02\u0224\u0225\x07(\x02\x02" +
- "\u0225\x8E\x03\x02\x02\x02\u0226\u0227\x07~\x02\x02\u0227\x90\x03\x02" +
- "\x02\x02\u0228\u0229\x07`\x02\x02\u0229\x92\x03\x02\x02\x02\u022A\u022B" +
- "\x07\x80\x02\x02\u022B\x94\x03\x02\x02\x02\u022C\u022D\x07>\x02\x02\u022D" +
- "\u022E\x07>\x02\x02\u022E\x96\x03\x02\x02\x02\u022F\u0230\x07@\x02\x02" +
- "\u0230\u0231\x07@\x02\x02\u0231\x98\x03\x02\x02\x02\u0232\u0233\x07@\x02" +
- "\x02\u0233\u0234\x07@\x02\x02\u0234\u0235\x07@\x02\x02\u0235\x9A\x03\x02" +
- "\x02\x02\u0236\u0237\x070\x02\x02\u0237\x9C\x03\x02\x02\x02\u0238\u023D" +
- "\x05\xBB]\x02\u0239\u023C\x05\xBB]\x02\u023A\u023C\x05\xBF_\x02\u023B" +
- "\u0239\x03\x02\x02\x02\u023B\u023A\x03\x02\x02\x02\u023C\u023F\x03\x02" +
- "\x02\x02\u023D\u023B\x03\x02\x02\x02\u023D\u023E\x03\x02\x02\x02\u023E" +
- "\x9E\x03\x02\x02\x02\u023F\u023D\x03\x02\x02\x02\u0240\u0245\x05\xC1`" +
- "\x02\u0241\u0245\x05\xC5b\x02\u0242\u0245\x05\xC7c\x02\u0243\u0245\x05" +
- "\xC3a\x02\u0244\u0240\x03\x02\x02\x02\u0244\u0241\x03\x02\x02\x02\u0244" +
- "\u0242\x03\x02\x02\x02\u0244\u0243\x03\x02\x02\x02\u0245\xA0\x03\x02\x02" +
- "\x02\u0246\u0248\x07)\x02\x02\u0247\u0249\x05\xEFw\x02\u0248\u0247\x03" +
- "\x02\x02\x02\u0248\u0249\x03\x02\x02\x02\u0249\u024A\x03\x02\x02\x02\u024A" +
- "\u024B\x07)\x02\x02\u024B\xA2\x03\x02\x02\x02\u024C\u024E\x07$\x02\x02" +
- "\u024D\u024F\x05\xF3y\x02\u024E\u024D\x03\x02\x02\x02\u024E\u024F\x03" +
- "\x02\x02\x02\u024F\u0250\x03\x02\x02\x02\u0250\u0251\x07$\x02\x02\u0251" +
- "\xA4\x03\x02\x02\x02\u0252\u0253\x05\xD1h\x02\u0253\xA6\x03\x02\x02\x02" +
- "\u0254\u0256\t\x02\x02\x02\u0255\u0254\x03\x02\x02\x02\u0256\u0257\x03" +
- "\x02\x02\x02\u0257\u0255\x03\x02\x02\x02\u0257\u0258\x03\x02\x02\x02\u0258" +
- "\u0259\x03\x02\x02\x02\u0259\u025A\bS\x05\x02\u025A\xA8\x03\x02\x02\x02" +
- "\u025B\u025C\t\x03\x02\x02\u025C\u025D\x03\x02\x02\x02\u025D\u025E\bT" +
- "\x05\x02\u025E\xAA\x03\x02\x02\x02\u025F\u0260\x07h\x02\x02\u0260\u0261" +
- "\x07)\x02\x02\u0261\u0262\x03\x02\x02\x02\u0262\u0263\bU\x06\x02\u0263" +
- "\u0264\x03\x02\x02\x02\u0264\u0265\bU\x07\x02\u0265\xAC\x03\x02\x02\x02" +
- "\u0266\u0267\x07h\x02\x02\u0267\u0268\x07$\x02\x02\u0268\u0269\x03\x02" +
- "\x02\x02\u0269\u026A\bV\b\x02\u026A\u026B\x03\x02\x02\x02\u026B\u026C" +
- "\bV\t\x02\u026C\xAE\x03\x02\x02\x02\u026D\u026E\x06W\x03\x02\u026E\u026F" +
- "\x07}\x02\x02\u026F\u0270\x03\x02\x02\x02\u0270\u0271\bW\n\x02\u0271\u0272" +
- "\bW\v\x02\u0272\xB0\x03\x02\x02\x02\u0273\u0274\x07)\x02\x02\u0274\u0275" +
- "\bX\f\x02\u0275\u0276\x03\x02\x02\x02\u0276\u0277\bX\x04\x02\u0277\xB2" +
- "\x03\x02\x02\x02\u0278\u0279\x05\xE7s\x02\u0279\xB4\x03\x02\x02\x02\u027A" +
- "\u027B\x06Z\x04\x02\u027B\u027C\x07}\x02\x02\u027C\u027D\x03\x02\x02\x02" +
- "\u027D\u027E\bZ\n\x02\u027E\u027F\bZ\v\x02\u027F\xB6\x03\x02\x02\x02\u0280" +
- "\u0281\x07$\x02\x02\u0281\u0282\b[\r\x02\u0282\u0283\x03\x02\x02\x02\u0283" +
- "\u0284\b[\x04\x02\u0284\xB8\x03\x02\x02\x02\u0285\u0286\x05\xEBu\x02\u0286" +
- "\xBA\x03\x02\x02\x02\u0287\u0288\x05\xBD^\x02\u0288\xBC\x03\x02\x02\x02" +
- "\u0289\u028A\t\x04\x02\x02\u028A\xBE\x03\x02\x02\x02\u028B\u028C\t\x05" +
- "\x02\x02\u028C\xC0\x03\x02\x02\x02\u028D\u028F\x05\xBF_\x02\u028E\u028D" +
- "\x03\x02\x02\x02\u028F\u0290\x03\x02\x02\x02\u0290\u028E\x03\x02\x02\x02" +
- "\u0290\u0291\x03\x02\x02\x02\u0291\xC2\x03\x02\x02\x02\u0292\u0293\x07" +
- "2\x02\x02\u0293\u0295\t\x06\x02\x02\u0294\u0296\x05\xCBe\x02\u0295\u0294" +
- "\x03\x02\x02\x02\u0296\u0297\x03\x02\x02\x02\u0297\u0295\x03\x02\x02\x02" +
- "\u0297\u0298\x03\x02\x02\x02\u0298\xC4\x03\x02\x02\x02\u0299\u029A\x07" +
- "2\x02\x02\u029A\u029C\t\x07\x02\x02\u029B\u029D\x05\xCDf\x02\u029C\u029B" +
- "\x03\x02\x02\x02\u029D\u029E\x03\x02\x02\x02\u029E\u029C\x03\x02\x02\x02" +
- "\u029E\u029F\x03\x02\x02\x02\u029F\xC6\x03\x02\x02\x02\u02A0\u02A1\x07" +
- "2\x02\x02\u02A1\u02A3\t\b\x02\x02\u02A2\u02A4\x05\xCFg\x02\u02A3\u02A2" +
- "\x03\x02\x02\x02\u02A4\u02A5\x03\x02\x02\x02\u02A5\u02A3\x03\x02\x02\x02" +
- "\u02A5\u02A6\x03\x02\x02\x02\u02A6\xC8\x03\x02\x02\x02\u02A7\u02A8\t\t" +
- "\x02\x02\u02A8\xCA\x03\x02\x02\x02\u02A9\u02AA\t\n\x02\x02\u02AA\xCC\x03" +
- "\x02\x02\x02\u02AB\u02AC\t\v\x02\x02\u02AC\xCE\x03\x02\x02\x02\u02AD\u02AE" +
- "\t\f\x02\x02\u02AE\xD0\x03\x02\x02\x02\u02AF\u02B1\x05\xD3i\x02\u02B0" +
- "\u02B2\x05\xD5j\x02\u02B1\u02B0\x03\x02\x02\x02\u02B1\u02B2\x03\x02\x02" +
- "\x02\u02B2\u02B7\x03\x02\x02\x02\u02B3\u02B4\x05\xD7k\x02\u02B4\u02B5" +
- "\x05\xD5j\x02\u02B5\u02B7\x03\x02\x02\x02\u02B6\u02AF\x03\x02\x02\x02" +
- "\u02B6\u02B3\x03\x02\x02\x02\u02B7\xD2\x03\x02\x02\x02\u02B8\u02BA\x05" +
- "\xD7k\x02\u02B9\u02B8\x03\x02\x02\x02\u02B9\u02BA\x03\x02\x02\x02\u02BA" +
- "\u02BB\x03\x02\x02\x02\u02BB\u02BC\x070\x02\x02\u02BC\u02C1\x05\xD7k\x02" +
- "\u02BD\u02BE\x05\xD7k\x02\u02BE\u02BF\x070\x02\x02\u02BF\u02C1\x03\x02" +
- "\x02\x02\u02C0\u02B9\x03\x02\x02\x02\u02C0\u02BD\x03\x02\x02\x02\u02C1" +
- "\xD4\x03\x02\x02\x02\u02C2\u02C4\t\r\x02\x02\u02C3\u02C5\x05\xD9l\x02" +
- "\u02C4\u02C3\x03\x02\x02\x02\u02C4\u02C5\x03\x02\x02\x02\u02C5\u02C6\x03" +
- "\x02\x02\x02\u02C6\u02C7\x05\xD7k\x02\u02C7\xD6\x03\x02\x02\x02\u02C8" +
- "\u02CA\x05\xBF_\x02\u02C9\u02C8\x03\x02\x02\x02\u02CA\u02CB\x03\x02\x02" +
- "\x02\u02CB\u02C9\x03\x02\x02\x02\u02CB\u02CC\x03\x02\x02\x02\u02CC\xD8" +
- "\x03\x02\x02\x02\u02CD\u02CE\t\x0E\x02\x02\u02CE\xDA\x03\x02\x02\x02\u02CF" +
- "\u02D1\x05\xDDn\x02\u02D0\u02CF\x03\x02\x02\x02\u02D1\u02D2\x03\x02\x02" +
- "\x02\u02D2\u02D0\x03\x02\x02\x02\u02D2\u02D3\x03\x02\x02\x02\u02D3\xDC" +
- "\x03\x02\x02\x02\u02D4\u02D7\n\x0F\x02\x02\u02D5\u02D7\x05\xDFo\x02\u02D6" +
- "\u02D4\x03\x02\x02\x02\u02D6\u02D5\x03\x02\x02\x02\u02D7\xDE\x03\x02\x02" +
- "\x02\u02D8\u02DC\x05\xE1p\x02\u02D9\u02DC\x05\xE3q\x02\u02DA\u02DC\x05" +
- "\xE5r\x02\u02DB\u02D8\x03\x02\x02\x02\u02DB\u02D9\x03\x02\x02\x02\u02DB" +
- "\u02DA\x03\x02\x02\x02\u02DC\xE0\x03\x02\x02\x02\u02DD\u02DE\x07^\x02" +
- "\x02\u02DE\u02DF\t\x10\x02\x02\u02DF\xE2\x03\x02\x02\x02\u02E0\u02E1\x07" +
- "^\x02\x02\u02E1\u02E3\x05\xCDf\x02\u02E2\u02E4\x05\xCDf\x02\u02E3\u02E2" +
- "\x03\x02\x02\x02\u02E3\u02E4\x03\x02\x02\x02\u02E4\u02E6\x03\x02\x02\x02" +
- "\u02E5\u02E7\x05\xCDf\x02\u02E6\u02E5\x03\x02\x02\x02\u02E6\u02E7\x03" +
- "\x02\x02\x02\u02E7\xE4\x03\x02\x02\x02\u02E8\u02E9\x07^\x02\x02\u02E9" +
- "\u02EA\x07z\x02\x02\u02EA\u02EC\x03\x02\x02\x02\u02EB\u02ED\x05\xCFg\x02" +
- "\u02EC\u02EB\x03\x02\x02\x02\u02ED\u02EE\x03\x02\x02\x02\u02EE\u02EC\x03" +
- "\x02\x02\x02\u02EE\u02EF\x03\x02\x02\x02\u02EF\xE6\x03\x02\x02\x02\u02F0" +
- "\u02F2\x05\xE9t\x02\u02F1\u02F0\x03\x02\x02\x02\u02F2\u02F3\x03\x02\x02" +
- "\x02\u02F3\u02F1\x03\x02\x02\x02\u02F3\u02F4\x03\x02\x02\x02\u02F4\xE8" +
- "\x03\x02\x02\x02\u02F5\u02F8\n\x11\x02\x02\u02F6\u02F8\x05\xDFo\x02\u02F7" +
- "\u02F5\x03\x02\x02\x02\u02F7\u02F6\x03\x02\x02\x02\u02F8\xEA\x03\x02\x02" +
- "\x02\u02F9\u02FB\x05\xEDv\x02\u02FA\u02F9\x03\x02\x02\x02\u02FB\u02FC" +
- "\x03\x02\x02\x02\u02FC\u02FA\x03\x02\x02\x02\u02FC\u02FD\x03\x02\x02\x02" +
- "\u02FD\xEC\x03\x02\x02\x02\u02FE\u0301\n\x12\x02\x02\u02FF\u0301\x05\xDF" +
- "o\x02\u0300\u02FE\x03\x02\x02\x02\u0300\u02FF\x03\x02\x02\x02\u0301\xEE" +
- "\x03\x02\x02\x02\u0302\u0304\x05\xF1x\x02\u0303\u0302\x03\x02\x02\x02" +
- "\u0304\u0305\x03\x02\x02\x02\u0305\u0303\x03\x02\x02\x02\u0305\u0306\x03" +
- "\x02\x02\x02\u0306\xF0\x03\x02\x02\x02\u0307\u030A\n\x0F\x02\x02\u0308" +
- "\u030A\x05\xDFo\x02\u0309\u0307\x03\x02\x02\x02\u0309\u0308\x03\x02\x02" +
- "\x02\u030A\xF2\x03\x02\x02\x02\u030B\u030D\x05\xF5z\x02\u030C\u030B\x03" +
- "\x02\x02\x02\u030D\u030E\x03\x02\x02\x02\u030E\u030C\x03\x02\x02\x02\u030E" +
- "\u030F\x03\x02\x02\x02\u030F\xF4\x03\x02\x02\x02\u0310\u0313\n\x13\x02" +
- "\x02\u0311\u0313\x05\xDFo\x02\u0312\u0310\x03\x02\x02\x02\u0312\u0311" +
- "\x03\x02\x02\x02\u0313\xF6\x03\x02\x02\x02\u0314\u0316\n\x03\x02\x02\u0315" +
- "\u0314\x03\x02\x02\x02\u0316\u0319\x03\x02\x02\x02\u0317\u0315\x03\x02" +
- "\x02\x02\u0317\u0318\x03\x02\x02\x02\u0318\xF8\x03\x02\x02\x02\u0319\u0317" +
- "\x03\x02\x02\x02%\x02\x03\x04\xFF\u023B\u023D\u0244\u0248\u024E\u0257" +
- "\u0290\u0297\u029E\u02A5\u02B1\u02B6\u02B9\u02C0\u02C4\u02CB\u02D2\u02D6" +
- "\u02DB\u02E3\u02E6\u02EE\u02F3\u02F7\u02FC\u0300\u0305\u0309\u030E\u0312" +
- "\u0317\x0E\x02\x04\x02\x02\x05\x02\x06\x02\x02\x02\x03\x02\x03U\x02\x07" +
- "\x03\x02\x03V\x03\x07\x04\x02\t\x03\x02\x07\x02\x02\x03X\x04\x03[\x05";
+ "\x02\u01EFR\x03\x02\x02\x02\u01F0\u01F1\x07A\x02\x02\u01F1T\x03\x02\x02" +
+ "\x02\u01F2\u01F3\x07<\x02\x02\u01F3V\x03\x02\x02\x02\u01F4\u01F5\x07*" +
+ "\x02\x02\u01F5X\x03\x02\x02\x02\u01F6\u01F7\x07+\x02\x02\u01F7Z\x03\x02" +
+ "\x02\x02\u01F8\u01F9\x07]\x02\x02\u01F9\\\x03\x02\x02\x02\u01FA\u01FB" +
+ "\x07_\x02\x02\u01FB^\x03\x02\x02\x02\u01FC\u01FD\x06/\x02\x02\u01FD\u01FE" +
+ "\x07\x7F\x02\x02\u01FE\u01FF\x03\x02\x02\x02\u01FF\u0200\b/\x04\x02\u0200" +
+ "`\x03\x02\x02\x02\u0201\u0202\x07}\x02\x02\u0202b\x03\x02\x02\x02\u0203" +
+ "\u0204\x07\x7F\x02\x02\u0204d\x03\x02\x02\x02\u0205\u0206\x07-\x02\x02" +
+ "\u0206f\x03\x02\x02\x02\u0207\u0208\x07-\x02\x02\u0208\u0209\x07-\x02" +
+ "\x02\u0209h\x03\x02\x02\x02\u020A\u020B\x07/\x02\x02\u020Bj\x03\x02\x02" +
+ "\x02\u020C\u020D\x07/\x02\x02\u020D\u020E\x07/\x02\x02\u020El\x03\x02" +
+ "\x02\x02\u020F\u0210\x07,\x02\x02\u0210n\x03\x02\x02\x02\u0211\u0212\x07" +
+ "1\x02\x02\u0212p\x03\x02\x02\x02\u0213\u0214\x07'\x02\x02\u0214r\x03" +
+ "\x02\x02\x02\u0215\u0216\x07,\x02\x02\u0216\u0217\x07,\x02\x02\u0217t" +
+ "\x03\x02\x02\x02\u0218\u0219\x07(\x02\x02\u0219\u021A\x07(\x02\x02\u021A" +
+ "v\x03\x02\x02\x02\u021B\u021C\x07~\x02\x02\u021C\u021D\x07~\x02\x02\u021D" +
+ "x\x03\x02\x02\x02\u021E\u021F\x07#\x02\x02\u021Fz\x03\x02\x02\x02\u0220" +
+ "\u0221\x07?\x02\x02\u0221|\x03\x02\x02\x02\u0222\u0223\x07-\x02\x02\u0223" +
+ "\u0224\x07?\x02\x02\u0224~\x03\x02\x02\x02\u0225\u0226\x07/\x02\x02\u0226" +
+ "\u0227\x07?\x02\x02\u0227\x80\x03\x02\x02\x02\u0228\u0229\x07,\x02\x02" +
+ "\u0229\u022A\x07?\x02\x02\u022A\x82\x03\x02\x02\x02\u022B\u022C\x071\x02" +
+ "\x02\u022C\u022D\x07?\x02\x02\u022D\x84\x03\x02\x02\x02\u022E\u022F\x07" +
+ "'\x02\x02\u022F\u0230\x07?\x02\x02\u0230\x86\x03\x02\x02\x02\u0231\u0232" +
+ "\x07?\x02\x02\u0232\u0233\x07?\x02\x02\u0233\x88\x03\x02\x02\x02\u0234" +
+ "\u0235\x07#\x02\x02\u0235\u0236\x07?\x02\x02\u0236\x8A\x03\x02\x02\x02" +
+ "\u0237\u0238\x07>\x02\x02\u0238\x8C\x03\x02\x02\x02\u0239\u023A\x07>\x02" +
+ "\x02\u023A\u023B\x07?\x02\x02\u023B\x8E\x03\x02\x02\x02\u023C\u023D\x07" +
+ "@\x02\x02\u023D\x90\x03\x02\x02\x02\u023E\u023F\x07@\x02\x02\u023F\u0240" +
+ "\x07?\x02\x02\u0240\x92\x03\x02\x02\x02\u0241\u0242\x07(\x02\x02\u0242" +
+ "\x94\x03\x02\x02\x02\u0243\u0244\x07~\x02\x02\u0244\x96\x03\x02\x02\x02" +
+ "\u0245\u0246\x07`\x02\x02\u0246\x98\x03\x02\x02\x02\u0247\u0248\x07\x80" +
+ "\x02\x02\u0248\x9A\x03\x02\x02\x02\u0249\u024A\x07>\x02\x02\u024A\u024B" +
+ "\x07>\x02\x02\u024B\x9C\x03\x02\x02\x02\u024C\u024D\x07@\x02\x02\u024D" +
+ "\u024E\x07@\x02\x02\u024E\x9E\x03\x02\x02\x02\u024F\u0250\x07@\x02\x02" +
+ "\u0250\u0251\x07@\x02\x02\u0251\u0252\x07@\x02\x02\u0252\xA0\x03\x02\x02" +
+ "\x02\u0253\u0254\x070\x02\x02\u0254\xA2\x03\x02\x02\x02\u0255\u025A\x05" +
+ "\xC1`\x02\u0256\u0259\x05\xC1`\x02\u0257\u0259\x05\xC5b\x02\u0258\u0256" +
+ "\x03\x02\x02\x02\u0258\u0257\x03\x02\x02\x02\u0259\u025C\x03\x02\x02\x02" +
+ "\u025A\u0258\x03\x02\x02\x02\u025A\u025B\x03\x02\x02\x02\u025B\xA4\x03" +
+ "\x02\x02\x02\u025C\u025A\x03\x02\x02\x02\u025D\u0262\x05\xC7c\x02\u025E" +
+ "\u0262\x05\xCBe\x02\u025F\u0262\x05\xCDf\x02\u0260\u0262\x05\xC9d\x02" +
+ "\u0261\u025D\x03\x02\x02\x02\u0261\u025E\x03\x02\x02\x02\u0261\u025F\x03" +
+ "\x02\x02\x02\u0261\u0260\x03\x02\x02\x02\u0262\xA6\x03\x02\x02\x02\u0263" +
+ "\u0265\x07)\x02\x02\u0264\u0266\x05\xF5z\x02\u0265\u0264\x03\x02\x02\x02" +
+ "\u0265\u0266\x03\x02\x02\x02\u0266\u0267\x03\x02\x02\x02\u0267\u0268\x07" +
+ ")\x02\x02\u0268\xA8\x03\x02\x02\x02\u0269\u026B\x07$\x02\x02\u026A\u026C" +
+ "\x05\xF9|\x02\u026B\u026A\x03\x02\x02\x02\u026B\u026C\x03\x02\x02\x02" +
+ "\u026C\u026D\x03\x02\x02\x02\u026D\u026E\x07$\x02\x02\u026E\xAA\x03\x02" +
+ "\x02\x02\u026F\u0270\x05\xD7k\x02\u0270\xAC\x03\x02\x02\x02\u0271\u0273" +
+ "\t\x02\x02\x02\u0272\u0271\x03\x02\x02\x02\u0273\u0274\x03\x02\x02\x02" +
+ "\u0274\u0272\x03\x02\x02\x02\u0274\u0275\x03\x02\x02\x02\u0275\u0276\x03" +
+ "\x02\x02\x02\u0276\u0277\bV\x05\x02\u0277\xAE\x03\x02\x02\x02\u0278\u0279" +
+ "\t\x03\x02\x02\u0279\u027A\x03\x02\x02\x02\u027A\u027B\bW\x05\x02\u027B" +
+ "\xB0\x03\x02\x02\x02\u027C\u027D\x07h\x02\x02\u027D\u027E\x07)\x02\x02" +
+ "\u027E\u027F\x03\x02\x02\x02\u027F\u0280\bX\x06\x02\u0280\u0281\x03\x02" +
+ "\x02\x02\u0281\u0282\bX\x07\x02\u0282\xB2\x03\x02\x02\x02\u0283\u0284" +
+ "\x07h\x02\x02\u0284\u0285\x07$\x02\x02\u0285\u0286\x03\x02\x02\x02\u0286" +
+ "\u0287\bY\b\x02\u0287\u0288\x03\x02\x02\x02\u0288\u0289\bY\t\x02\u0289" +
+ "\xB4\x03\x02\x02\x02\u028A\u028B\x06Z\x03\x02\u028B\u028C\x07}\x02\x02" +
+ "\u028C\u028D\x03\x02\x02\x02\u028D\u028E\bZ\n\x02\u028E\u028F\bZ\v\x02" +
+ "\u028F\xB6\x03\x02\x02\x02\u0290\u0291\x07)\x02\x02\u0291\u0292\b[\f\x02" +
+ "\u0292\u0293\x03\x02\x02\x02\u0293\u0294\b[\x04\x02\u0294\xB8\x03\x02" +
+ "\x02\x02\u0295\u0296\x05\xEDv\x02\u0296\xBA\x03\x02\x02\x02\u0297\u0298" +
+ "\x06]\x04\x02\u0298\u0299\x07}\x02\x02\u0299\u029A\x03\x02\x02\x02\u029A" +
+ "\u029B\b]\n\x02\u029B\u029C\b]\v\x02\u029C\xBC\x03\x02\x02\x02\u029D\u029E" +
+ "\x07$\x02\x02\u029E\u029F\b^\r\x02\u029F\u02A0\x03\x02\x02\x02\u02A0\u02A1" +
+ "\b^\x04\x02\u02A1\xBE\x03\x02\x02\x02\u02A2\u02A3\x05\xF1x\x02\u02A3\xC0" +
+ "\x03\x02\x02\x02\u02A4\u02A5\x05\xC3a\x02\u02A5\xC2\x03\x02\x02\x02\u02A6" +
+ "\u02A7\t\x04\x02\x02\u02A7\xC4\x03\x02\x02\x02\u02A8\u02A9\t\x05\x02\x02" +
+ "\u02A9\xC6\x03\x02\x02\x02\u02AA\u02AC\x05\xC5b\x02\u02AB\u02AA\x03\x02" +
+ "\x02\x02\u02AC\u02AD\x03\x02\x02\x02\u02AD\u02AB\x03\x02\x02\x02\u02AD" +
+ "\u02AE\x03\x02\x02\x02\u02AE\xC8\x03\x02\x02\x02\u02AF\u02B0\x072\x02" +
+ "\x02\u02B0\u02B2\t\x06\x02\x02\u02B1\u02B3\x05\xD1h\x02\u02B2\u02B1\x03" +
+ "\x02\x02\x02\u02B3\u02B4\x03\x02\x02\x02\u02B4\u02B2\x03\x02\x02\x02\u02B4" +
+ "\u02B5\x03\x02\x02\x02\u02B5\xCA\x03\x02\x02\x02\u02B6\u02B7\x072\x02" +
+ "\x02\u02B7\u02B9\t\x07\x02\x02\u02B8\u02BA\x05\xD3i\x02\u02B9\u02B8\x03" +
+ "\x02\x02\x02\u02BA\u02BB\x03\x02\x02\x02\u02BB\u02B9\x03\x02\x02\x02\u02BB" +
+ "\u02BC\x03\x02\x02\x02\u02BC\xCC\x03\x02\x02\x02\u02BD\u02BE\x072\x02" +
+ "\x02\u02BE\u02C0\t\b\x02\x02\u02BF\u02C1\x05\xD5j\x02\u02C0\u02BF\x03" +
+ "\x02\x02\x02\u02C1\u02C2\x03\x02\x02\x02\u02C2\u02C0\x03\x02\x02\x02\u02C2" +
+ "\u02C3\x03\x02\x02\x02\u02C3\xCE\x03\x02\x02\x02\u02C4\u02C5\t\t\x02\x02" +
+ "\u02C5\xD0\x03\x02\x02\x02\u02C6\u02C7\t\n\x02\x02\u02C7\xD2\x03\x02\x02" +
+ "\x02\u02C8\u02C9\t\v\x02\x02\u02C9\xD4\x03\x02\x02\x02\u02CA\u02CB\t\f" +
+ "\x02\x02\u02CB\xD6\x03\x02\x02\x02\u02CC\u02CE\x05\xD9l\x02\u02CD\u02CF" +
+ "\x05\xDBm\x02\u02CE\u02CD\x03\x02\x02\x02\u02CE\u02CF\x03\x02\x02\x02" +
+ "\u02CF\u02D4\x03\x02\x02\x02\u02D0\u02D1\x05\xDDn\x02\u02D1\u02D2\x05" +
+ "\xDBm\x02\u02D2\u02D4\x03\x02\x02\x02\u02D3\u02CC\x03\x02\x02\x02\u02D3" +
+ "\u02D0\x03\x02\x02\x02\u02D4\xD8\x03\x02\x02\x02\u02D5\u02D7\x05\xDDn" +
+ "\x02\u02D6\u02D5\x03\x02\x02\x02\u02D6\u02D7\x03\x02\x02\x02\u02D7\u02D8" +
+ "\x03\x02\x02\x02\u02D8\u02D9\x070\x02\x02\u02D9\u02DE\x05\xDDn\x02\u02DA" +
+ "\u02DB\x05\xDDn\x02\u02DB\u02DC\x070\x02\x02\u02DC\u02DE\x03\x02\x02\x02" +
+ "\u02DD\u02D6\x03\x02\x02\x02\u02DD\u02DA\x03\x02\x02\x02\u02DE\xDA\x03" +
+ "\x02\x02\x02\u02DF\u02E1\t\r\x02\x02\u02E0\u02E2\x05\xDFo\x02\u02E1\u02E0" +
+ "\x03\x02\x02\x02\u02E1\u02E2\x03\x02\x02\x02\u02E2\u02E3\x03\x02\x02\x02" +
+ "\u02E3\u02E4\x05\xDDn\x02\u02E4\xDC\x03\x02\x02\x02\u02E5\u02E7\x05\xC5" +
+ "b\x02\u02E6\u02E5\x03\x02\x02\x02\u02E7\u02E8\x03\x02\x02\x02\u02E8\u02E6" +
+ "\x03\x02\x02\x02\u02E8\u02E9\x03\x02\x02\x02\u02E9\xDE\x03\x02\x02\x02" +
+ "\u02EA\u02EB\t\x0E\x02\x02\u02EB\xE0\x03\x02\x02\x02\u02EC\u02EE\x05\xE3" +
+ "q\x02\u02ED\u02EC\x03\x02\x02\x02\u02EE\u02EF\x03\x02\x02\x02\u02EF\u02ED" +
+ "\x03\x02\x02\x02\u02EF\u02F0\x03\x02\x02\x02\u02F0\xE2\x03\x02\x02\x02" +
+ "\u02F1\u02F4\n\x0F\x02\x02\u02F2\u02F4\x05\xE5r\x02\u02F3\u02F1\x03\x02" +
+ "\x02\x02\u02F3\u02F2\x03\x02\x02\x02\u02F4\xE4\x03\x02\x02\x02\u02F5\u02F9" +
+ "\x05\xE7s\x02\u02F6\u02F9\x05\xE9t\x02\u02F7\u02F9\x05\xEBu\x02\u02F8" +
+ "\u02F5\x03\x02\x02\x02\u02F8\u02F6\x03\x02\x02\x02\u02F8\u02F7\x03\x02" +
+ "\x02\x02\u02F9\xE6\x03\x02\x02\x02\u02FA\u02FB\x07^\x02\x02\u02FB\u02FC" +
+ "\t\x10\x02\x02\u02FC\xE8\x03\x02\x02\x02\u02FD\u02FE\x07^\x02\x02\u02FE" +
+ "\u0300\x05\xD3i\x02\u02FF\u0301\x05\xD3i\x02\u0300\u02FF\x03\x02\x02\x02" +
+ "\u0300\u0301\x03\x02\x02\x02\u0301\u0303\x03\x02\x02\x02\u0302\u0304\x05" +
+ "\xD3i\x02\u0303\u0302\x03\x02\x02\x02\u0303\u0304\x03\x02\x02\x02\u0304" +
+ "\xEA\x03\x02\x02\x02\u0305\u0306\x07^\x02\x02\u0306\u0307\x07z\x02\x02" +
+ "\u0307\u0309\x03\x02\x02\x02\u0308\u030A\x05\xD5j\x02\u0309\u0308\x03" +
+ "\x02\x02\x02\u030A\u030B\x03\x02\x02\x02\u030B\u0309\x03\x02\x02\x02\u030B" +
+ "\u030C\x03\x02\x02\x02\u030C\xEC\x03\x02\x02\x02\u030D\u030F\x05\xEFw" +
+ "\x02\u030E\u030D\x03\x02\x02\x02\u030F\u0310\x03\x02\x02\x02\u0310\u030E" +
+ "\x03\x02\x02\x02\u0310\u0311\x03\x02\x02\x02\u0311\xEE\x03\x02\x02\x02" +
+ "\u0312\u0315\n\x11\x02\x02\u0313\u0315\x05\xE5r\x02\u0314\u0312\x03\x02" +
+ "\x02\x02\u0314\u0313\x03\x02\x02\x02\u0315\xF0\x03\x02\x02\x02\u0316\u0318" +
+ "\x05\xF3y\x02\u0317\u0316\x03\x02\x02\x02\u0318\u0319\x03\x02\x02\x02" +
+ "\u0319\u0317\x03\x02\x02\x02\u0319\u031A\x03\x02\x02\x02\u031A\xF2\x03" +
+ "\x02\x02\x02\u031B\u031E\n\x12\x02\x02\u031C\u031E\x05\xE5r\x02\u031D" +
+ "\u031B\x03\x02\x02\x02\u031D\u031C\x03\x02\x02\x02\u031E\xF4\x03\x02\x02" +
+ "\x02\u031F\u0321\x05\xF7{\x02\u0320\u031F\x03\x02\x02\x02\u0321\u0322" +
+ "\x03\x02\x02\x02\u0322\u0320\x03\x02\x02\x02\u0322\u0323\x03\x02\x02\x02" +
+ "\u0323\xF6\x03\x02\x02\x02\u0324\u0327\n\x0F\x02\x02\u0325\u0327\x05\xE5" +
+ "r\x02\u0326\u0324\x03\x02\x02\x02\u0326\u0325\x03\x02\x02\x02\u0327\xF8" +
+ "\x03\x02\x02\x02\u0328\u032A\x05\xFB}\x02\u0329\u0328\x03\x02\x02\x02" +
+ "\u032A\u032B\x03\x02\x02\x02\u032B\u0329\x03\x02\x02\x02\u032B\u032C\x03" +
+ "\x02\x02\x02\u032C\xFA\x03\x02\x02\x02\u032D\u0330\n\x13\x02\x02\u032E" +
+ "\u0330\x05\xE5r\x02\u032F\u032D\x03\x02\x02\x02\u032F\u032E\x03\x02\x02" +
+ "\x02\u0330\xFC\x03\x02\x02\x02\u0331\u0333\n\x03\x02\x02\u0332\u0331\x03" +
+ "\x02\x02\x02\u0333\u0336\x03\x02\x02\x02\u0334\u0332\x03\x02\x02\x02\u0334" +
+ "\u0335\x03\x02\x02\x02\u0335\xFE\x03\x02\x02\x02\u0336\u0334\x03\x02\x02" +
+ "\x02%\x02\x03\x04\u0105\u0258\u025A\u0261\u0265\u026B\u0274\u02AD\u02B4" +
+ "\u02BB\u02C2\u02CE\u02D3\u02D6\u02DD\u02E1\u02E8\u02EF\u02F3\u02F8\u0300" +
+ "\u0303\u030B\u0310\u0314\u0319\u031D\u0322\u0326\u032B\u032F\u0334\x0E" +
+ "\x02\x04\x02\x02\x05\x02\x06\x02\x02\x02\x03\x02\x03X\x02\x07\x03\x02" +
+ "\x03Y\x03\x07\x04\x02\t\x03\x02\x07\x02\x02\x03[\x04\x03^\x05";
public static readonly _serializedATN: string = Utils.join(
[KipperLexer._serializedATNSegment0, KipperLexer._serializedATNSegment1],
"",
diff --git a/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.interp b/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.interp
index 9de61c1be..c44fa50d6 100644
--- a/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.interp
+++ b/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.interp
@@ -4,6 +4,7 @@ null
null
null
null
+'instanceof'
'const'
'var'
'as'
@@ -26,8 +27,10 @@ null
'class'
'interface'
'constructor'
+'new'
'true'
'false'
+'matches'
'typeof'
'try'
'catch'
@@ -97,6 +100,7 @@ FStringExpStart
BlockComment
LineComment
Pragma
+InstanceOf
Const
Var
As
@@ -119,8 +123,10 @@ RetIndicator
Class
Interface
Constructor
+New
True
False
+Matches
Typeof
Try
Catch
@@ -260,6 +266,8 @@ multiplicativeExpression
additiveExpression
bitwiseShiftExpression
bitwiseShiftOperators
+instanceOfExpression
+matchesExpression
relationalExpression
equalityExpression
bitwiseAndExpression
@@ -279,4 +287,4 @@ typeSpecifierIdentifier
atn:
-[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 3, 92, 846, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 3, 2, 5, 2, 186, 10, 2, 3, 2, 3, 2, 3, 3, 6, 3, 191, 10, 3, 13, 3, 14, 3, 192, 3, 4, 3, 4, 3, 5, 6, 5, 198, 10, 5, 13, 5, 14, 5, 199, 3, 6, 3, 6, 3, 6, 5, 6, 205, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 213, 10, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 225, 10, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 237, 10, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 243, 10, 14, 3, 15, 3, 15, 3, 15, 7, 15, 248, 10, 15, 12, 15, 14, 15, 251, 11, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 7, 17, 261, 10, 17, 12, 17, 14, 17, 264, 11, 17, 3, 17, 3, 17, 3, 18, 3, 18, 5, 18, 270, 10, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 5, 20, 280, 10, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 7, 21, 292, 10, 21, 12, 21, 14, 21, 295, 11, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 5, 22, 302, 10, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 5, 24, 311, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 317, 10, 24, 3, 25, 3, 25, 3, 25, 5, 25, 322, 10, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 334, 10, 26, 3, 27, 3, 27, 3, 27, 5, 27, 339, 10, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 5, 29, 350, 10, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 5, 30, 359, 10, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 7, 31, 367, 10, 31, 12, 31, 14, 31, 370, 11, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 5, 32, 382, 10, 32, 3, 33, 3, 33, 3, 33, 5, 33, 387, 10, 33, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 393, 10, 34, 3, 34, 3, 34, 5, 34, 397, 10, 34, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 403, 10, 34, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 409, 10, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 5, 38, 433, 10, 38, 3, 38, 3, 38, 3, 39, 3, 39, 7, 39, 439, 10, 39, 12, 39, 14, 39, 442, 11, 39, 3, 39, 5, 39, 445, 10, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 5, 41, 453, 10, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 5, 43, 471, 10, 43, 3, 44, 3, 44, 5, 44, 475, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 5, 44, 483, 10, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 5, 49, 497, 10, 49, 3, 50, 3, 50, 3, 51, 3, 51, 7, 51, 503, 10, 51, 12, 51, 14, 51, 506, 11, 51, 3, 51, 3, 51, 3, 51, 7, 51, 511, 10, 51, 12, 51, 14, 51, 514, 11, 51, 3, 51, 5, 51, 517, 10, 51, 3, 52, 3, 52, 3, 52, 5, 52, 522, 10, 52, 3, 52, 5, 52, 525, 10, 52, 3, 53, 3, 53, 3, 53, 5, 53, 530, 10, 53, 3, 53, 5, 53, 533, 10, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 7, 55, 541, 10, 55, 12, 55, 14, 55, 544, 11, 55, 5, 55, 546, 10, 55, 3, 55, 5, 55, 549, 10, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 7, 56, 557, 10, 56, 12, 56, 14, 56, 560, 11, 56, 5, 56, 562, 10, 56, 3, 56, 5, 56, 565, 10, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 581, 10, 59, 3, 59, 3, 59, 3, 59, 5, 59, 586, 10, 59, 3, 59, 3, 59, 3, 59, 5, 59, 591, 10, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 7, 59, 607, 10, 59, 12, 59, 14, 59, 610, 11, 59, 3, 60, 3, 60, 3, 60, 7, 60, 615, 10, 60, 12, 60, 14, 60, 618, 11, 60, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 631, 10, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 637, 10, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 5, 64, 644, 10, 64, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 655, 10, 66, 3, 67, 3, 67, 3, 67, 5, 67, 660, 10, 67, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 5, 72, 677, 10, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 7, 73, 685, 10, 73, 12, 73, 14, 73, 688, 11, 73, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 7, 74, 696, 10, 74, 12, 74, 14, 74, 699, 11, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 7, 75, 708, 10, 75, 12, 75, 14, 75, 711, 11, 75, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 7, 77, 721, 10, 77, 12, 77, 14, 77, 724, 11, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 7, 78, 732, 10, 78, 12, 78, 14, 78, 735, 11, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 7, 79, 743, 10, 79, 12, 79, 14, 79, 746, 11, 79, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 7, 80, 754, 10, 80, 12, 80, 14, 80, 757, 11, 80, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 7, 81, 765, 10, 81, 12, 81, 14, 81, 768, 11, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 7, 82, 776, 10, 82, 12, 82, 14, 82, 779, 11, 82, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 7, 83, 787, 10, 83, 12, 83, 14, 83, 790, 11, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 5, 84, 799, 10, 84, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 5, 85, 806, 10, 85, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 7, 87, 813, 10, 87, 12, 87, 14, 87, 816, 11, 87, 3, 88, 3, 88, 3, 88, 5, 88, 821, 10, 88, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 7, 90, 830, 10, 90, 12, 90, 14, 90, 833, 11, 90, 5, 90, 835, 10, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 2, 2, 13, 116, 144, 146, 148, 152, 154, 156, 158, 160, 162, 164, 93, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 24, 2, 26, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 48, 2, 50, 2, 52, 2, 54, 2, 56, 2, 58, 2, 60, 2, 62, 2, 64, 2, 66, 2, 68, 2, 70, 2, 72, 2, 74, 2, 76, 2, 78, 2, 80, 2, 82, 2, 84, 2, 86, 2, 88, 2, 90, 2, 92, 2, 94, 2, 96, 2, 98, 2, 100, 2, 102, 2, 104, 2, 106, 2, 108, 2, 110, 2, 112, 2, 114, 2, 116, 2, 118, 2, 120, 2, 122, 2, 124, 2, 126, 2, 128, 2, 130, 2, 132, 2, 134, 2, 136, 2, 138, 2, 140, 2, 142, 2, 144, 2, 146, 2, 148, 2, 150, 2, 152, 2, 154, 2, 156, 2, 158, 2, 160, 2, 162, 2, 164, 2, 166, 2, 168, 2, 170, 2, 172, 2, 174, 2, 176, 2, 178, 2, 180, 2, 182, 2, 2, 17, 3, 2, 7, 8, 3, 2, 14, 15, 3, 2, 29, 30, 3, 2, 82, 83, 4, 2, 81, 81, 84, 84, 3, 2, 35, 37, 4, 2, 50, 50, 52, 52, 6, 2, 49, 49, 51, 51, 59, 59, 75, 75, 3, 2, 53, 56, 4, 2, 49, 49, 51, 51, 3, 2, 76, 78, 3, 2, 68, 71, 3, 2, 66, 67, 3, 2, 60, 65, 4, 2, 35, 37, 80, 80, 2, 855, 2, 185, 3, 2, 2, 2, 4, 190, 3, 2, 2, 2, 6, 194, 3, 2, 2, 2, 8, 197, 3, 2, 2, 2, 10, 204, 3, 2, 2, 2, 12, 212, 3, 2, 2, 2, 14, 214, 3, 2, 2, 2, 16, 217, 3, 2, 2, 2, 18, 219, 3, 2, 2, 2, 20, 226, 3, 2, 2, 2, 22, 228, 3, 2, 2, 2, 24, 230, 3, 2, 2, 2, 26, 232, 3, 2, 2, 2, 28, 244, 3, 2, 2, 2, 30, 252, 3, 2, 2, 2, 32, 256, 3, 2, 2, 2, 34, 269, 3, 2, 2, 2, 36, 271, 3, 2, 2, 2, 38, 276, 3, 2, 2, 2, 40, 286, 3, 2, 2, 2, 42, 301, 3, 2, 2, 2, 44, 303, 3, 2, 2, 2, 46, 307, 3, 2, 2, 2, 48, 318, 3, 2, 2, 2, 50, 333, 3, 2, 2, 2, 52, 335, 3, 2, 2, 2, 54, 342, 3, 2, 2, 2, 56, 349, 3, 2, 2, 2, 58, 351, 3, 2, 2, 2, 60, 360, 3, 2, 2, 2, 62, 381, 3, 2, 2, 2, 64, 386, 3, 2, 2, 2, 66, 388, 3, 2, 2, 2, 68, 413, 3, 2, 2, 2, 70, 419, 3, 2, 2, 2, 72, 427, 3, 2, 2, 2, 74, 430, 3, 2, 2, 2, 76, 436, 3, 2, 2, 2, 78, 446, 3, 2, 2, 2, 80, 449, 3, 2, 2, 2, 82, 457, 3, 2, 2, 2, 84, 470, 3, 2, 2, 2, 86, 472, 3, 2, 2, 2, 88, 484, 3, 2, 2, 2, 90, 488, 3, 2, 2, 2, 92, 490, 3, 2, 2, 2, 94, 492, 3, 2, 2, 2, 96, 496, 3, 2, 2, 2, 98, 498, 3, 2, 2, 2, 100, 516, 3, 2, 2, 2, 102, 524, 3, 2, 2, 2, 104, 532, 3, 2, 2, 2, 106, 534, 3, 2, 2, 2, 108, 536, 3, 2, 2, 2, 110, 552, 3, 2, 2, 2, 112, 568, 3, 2, 2, 2, 114, 572, 3, 2, 2, 2, 116, 585, 3, 2, 2, 2, 118, 611, 3, 2, 2, 2, 120, 619, 3, 2, 2, 2, 122, 622, 3, 2, 2, 2, 124, 626, 3, 2, 2, 2, 126, 643, 3, 2, 2, 2, 128, 645, 3, 2, 2, 2, 130, 648, 3, 2, 2, 2, 132, 659, 3, 2, 2, 2, 134, 661, 3, 2, 2, 2, 136, 664, 3, 2, 2, 2, 138, 667, 3, 2, 2, 2, 140, 669, 3, 2, 2, 2, 142, 676, 3, 2, 2, 2, 144, 678, 3, 2, 2, 2, 146, 689, 3, 2, 2, 2, 148, 700, 3, 2, 2, 2, 150, 712, 3, 2, 2, 2, 152, 714, 3, 2, 2, 2, 154, 725, 3, 2, 2, 2, 156, 736, 3, 2, 2, 2, 158, 747, 3, 2, 2, 2, 160, 758, 3, 2, 2, 2, 162, 769, 3, 2, 2, 2, 164, 780, 3, 2, 2, 2, 166, 798, 3, 2, 2, 2, 168, 805, 3, 2, 2, 2, 170, 807, 3, 2, 2, 2, 172, 809, 3, 2, 2, 2, 174, 820, 3, 2, 2, 2, 176, 822, 3, 2, 2, 2, 178, 824, 3, 2, 2, 2, 180, 838, 3, 2, 2, 2, 182, 843, 3, 2, 2, 2, 184, 186, 5, 4, 3, 2, 185, 184, 3, 2, 2, 2, 185, 186, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 188, 7, 2, 2, 3, 188, 3, 3, 2, 2, 2, 189, 191, 5, 6, 4, 2, 190, 189, 3, 2, 2, 2, 191, 192, 3, 2, 2, 2, 192, 190, 3, 2, 2, 2, 192, 193, 3, 2, 2, 2, 193, 5, 3, 2, 2, 2, 194, 195, 5, 8, 5, 2, 195, 7, 3, 2, 2, 2, 196, 198, 5, 10, 6, 2, 197, 196, 3, 2, 2, 2, 198, 199, 3, 2, 2, 2, 199, 197, 3, 2, 2, 2, 199, 200, 3, 2, 2, 2, 200, 9, 3, 2, 2, 2, 201, 205, 5, 50, 26, 2, 202, 205, 5, 12, 7, 2, 203, 205, 7, 39, 2, 2, 204, 201, 3, 2, 2, 2, 204, 202, 3, 2, 2, 2, 204, 203, 3, 2, 2, 2, 205, 11, 3, 2, 2, 2, 206, 207, 5, 14, 8, 2, 207, 208, 7, 39, 2, 2, 208, 213, 3, 2, 2, 2, 209, 213, 5, 26, 14, 2, 210, 213, 5, 32, 17, 2, 211, 213, 5, 40, 21, 2, 212, 206, 3, 2, 2, 2, 212, 209, 3, 2, 2, 2, 212, 210, 3, 2, 2, 2, 212, 211, 3, 2, 2, 2, 213, 13, 3, 2, 2, 2, 214, 215, 5, 16, 9, 2, 215, 216, 5, 18, 10, 2, 216, 15, 3, 2, 2, 2, 217, 218, 9, 2, 2, 2, 218, 17, 3, 2, 2, 2, 219, 220, 5, 22, 12, 2, 220, 221, 7, 41, 2, 2, 221, 224, 5, 174, 88, 2, 222, 223, 7, 60, 2, 2, 223, 225, 5, 20, 11, 2, 224, 222, 3, 2, 2, 2, 224, 225, 3, 2, 2, 2, 225, 19, 3, 2, 2, 2, 226, 227, 5, 168, 85, 2, 227, 21, 3, 2, 2, 2, 228, 229, 5, 24, 13, 2, 229, 23, 3, 2, 2, 2, 230, 231, 7, 80, 2, 2, 231, 25, 3, 2, 2, 2, 232, 233, 7, 22, 2, 2, 233, 234, 5, 22, 12, 2, 234, 236, 7, 42, 2, 2, 235, 237, 5, 28, 15, 2, 236, 235, 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 238, 3, 2, 2, 2, 238, 239, 7, 43, 2, 2, 239, 240, 7, 25, 2, 2, 240, 242, 5, 174, 88, 2, 241, 243, 5, 52, 27, 2, 242, 241, 3, 2, 2, 2, 242, 243, 3, 2, 2, 2, 243, 27, 3, 2, 2, 2, 244, 249, 5, 30, 16, 2, 245, 246, 7, 38, 2, 2, 246, 248, 5, 30, 16, 2, 247, 245, 3, 2, 2, 2, 248, 251, 3, 2, 2, 2, 249, 247, 3, 2, 2, 2, 249, 250, 3, 2, 2, 2, 250, 29, 3, 2, 2, 2, 251, 249, 3, 2, 2, 2, 252, 253, 5, 22, 12, 2, 253, 254, 7, 41, 2, 2, 254, 255, 5, 174, 88, 2, 255, 31, 3, 2, 2, 2, 256, 257, 7, 27, 2, 2, 257, 258, 5, 22, 12, 2, 258, 262, 7, 47, 2, 2, 259, 261, 5, 34, 18, 2, 260, 259, 3, 2, 2, 2, 261, 264, 3, 2, 2, 2, 262, 260, 3, 2, 2, 2, 262, 263, 3, 2, 2, 2, 263, 265, 3, 2, 2, 2, 264, 262, 3, 2, 2, 2, 265, 266, 7, 48, 2, 2, 266, 33, 3, 2, 2, 2, 267, 270, 5, 36, 19, 2, 268, 270, 5, 38, 20, 2, 269, 267, 3, 2, 2, 2, 269, 268, 3, 2, 2, 2, 270, 35, 3, 2, 2, 2, 271, 272, 5, 22, 12, 2, 272, 273, 7, 41, 2, 2, 273, 274, 5, 174, 88, 2, 274, 275, 7, 39, 2, 2, 275, 37, 3, 2, 2, 2, 276, 277, 5, 22, 12, 2, 277, 279, 7, 42, 2, 2, 278, 280, 5, 28, 15, 2, 279, 278, 3, 2, 2, 2, 279, 280, 3, 2, 2, 2, 280, 281, 3, 2, 2, 2, 281, 282, 7, 43, 2, 2, 282, 283, 7, 41, 2, 2, 283, 284, 5, 174, 88, 2, 284, 285, 7, 39, 2, 2, 285, 39, 3, 2, 2, 2, 286, 287, 7, 26, 2, 2, 287, 288, 5, 22, 12, 2, 288, 293, 7, 47, 2, 2, 289, 292, 5, 42, 22, 2, 290, 292, 7, 39, 2, 2, 291, 289, 3, 2, 2, 2, 291, 290, 3, 2, 2, 2, 292, 295, 3, 2, 2, 2, 293, 291, 3, 2, 2, 2, 293, 294, 3, 2, 2, 2, 294, 296, 3, 2, 2, 2, 295, 293, 3, 2, 2, 2, 296, 297, 7, 48, 2, 2, 297, 41, 3, 2, 2, 2, 298, 302, 5, 44, 23, 2, 299, 302, 5, 46, 24, 2, 300, 302, 5, 48, 25, 2, 301, 298, 3, 2, 2, 2, 301, 299, 3, 2, 2, 2, 301, 300, 3, 2, 2, 2, 302, 43, 3, 2, 2, 2, 303, 304, 5, 22, 12, 2, 304, 305, 7, 41, 2, 2, 305, 306, 5, 174, 88, 2, 306, 45, 3, 2, 2, 2, 307, 308, 5, 22, 12, 2, 308, 310, 7, 42, 2, 2, 309, 311, 5, 28, 15, 2, 310, 309, 3, 2, 2, 2, 310, 311, 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312, 313, 7, 43, 2, 2, 313, 314, 7, 41, 2, 2, 314, 316, 5, 174, 88, 2, 315, 317, 5, 52, 27, 2, 316, 315, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 47, 3, 2, 2, 2, 318, 319, 7, 28, 2, 2, 319, 321, 7, 42, 2, 2, 320, 322, 5, 28, 15, 2, 321, 320, 3, 2, 2, 2, 321, 322, 3, 2, 2, 2, 322, 323, 3, 2, 2, 2, 323, 324, 7, 43, 2, 2, 324, 325, 5, 52, 27, 2, 325, 49, 3, 2, 2, 2, 326, 334, 5, 54, 28, 2, 327, 334, 5, 56, 29, 2, 328, 334, 5, 64, 33, 2, 329, 334, 5, 72, 37, 2, 330, 334, 5, 74, 38, 2, 331, 334, 5, 52, 27, 2, 332, 334, 5, 76, 39, 2, 333, 326, 3, 2, 2, 2, 333, 327, 3, 2, 2, 2, 333, 328, 3, 2, 2, 2, 333, 329, 3, 2, 2, 2, 333, 330, 3, 2, 2, 2, 333, 331, 3, 2, 2, 2, 333, 332, 3, 2, 2, 2, 334, 51, 3, 2, 2, 2, 335, 336, 6, 27, 2, 2, 336, 338, 7, 47, 2, 2, 337, 339, 5, 8, 5, 2, 338, 337, 3, 2, 2, 2, 338, 339, 3, 2, 2, 2, 339, 340, 3, 2, 2, 2, 340, 341, 7, 48, 2, 2, 341, 53, 3, 2, 2, 2, 342, 343, 8, 28, 1, 2, 343, 344, 5, 172, 87, 2, 344, 345, 7, 39, 2, 2, 345, 346, 8, 28, 1, 2, 346, 55, 3, 2, 2, 2, 347, 350, 5, 58, 30, 2, 348, 350, 5, 60, 31, 2, 349, 347, 3, 2, 2, 2, 349, 348, 3, 2, 2, 2, 350, 57, 3, 2, 2, 2, 351, 352, 7, 18, 2, 2, 352, 353, 7, 42, 2, 2, 353, 354, 5, 172, 87, 2, 354, 355, 7, 43, 2, 2, 355, 358, 5, 50, 26, 2, 356, 357, 7, 19, 2, 2, 357, 359, 5, 50, 26, 2, 358, 356, 3, 2, 2, 2, 358, 359, 3, 2, 2, 2, 359, 59, 3, 2, 2, 2, 360, 361, 7, 11, 2, 2, 361, 362, 7, 42, 2, 2, 362, 363, 5, 172, 87, 2, 363, 364, 7, 43, 2, 2, 364, 368, 7, 47, 2, 2, 365, 367, 5, 62, 32, 2, 366, 365, 3, 2, 2, 2, 367, 370, 3, 2, 2, 2, 368, 366, 3, 2, 2, 2, 368, 369, 3, 2, 2, 2, 369, 371, 3, 2, 2, 2, 370, 368, 3, 2, 2, 2, 371, 372, 7, 48, 2, 2, 372, 61, 3, 2, 2, 2, 373, 374, 7, 12, 2, 2, 374, 375, 5, 172, 87, 2, 375, 376, 7, 41, 2, 2, 376, 377, 5, 50, 26, 2, 377, 382, 3, 2, 2, 2, 378, 379, 7, 13, 2, 2, 379, 380, 7, 41, 2, 2, 380, 382, 5, 50, 26, 2, 381, 373, 3, 2, 2, 2, 381, 378, 3, 2, 2, 2, 382, 63, 3, 2, 2, 2, 383, 387, 5, 66, 34, 2, 384, 387, 5, 68, 35, 2, 385, 387, 5, 70, 36, 2, 386, 383, 3, 2, 2, 2, 386, 384, 3, 2, 2, 2, 386, 385, 3, 2, 2, 2, 387, 65, 3, 2, 2, 2, 388, 389, 7, 20, 2, 2, 389, 396, 7, 42, 2, 2, 390, 393, 5, 14, 8, 2, 391, 393, 5, 172, 87, 2, 392, 390, 3, 2, 2, 2, 392, 391, 3, 2, 2, 2, 393, 394, 3, 2, 2, 2, 394, 395, 8, 34, 1, 2, 395, 397, 3, 2, 2, 2, 396, 392, 3, 2, 2, 2, 396, 397, 3, 2, 2, 2, 397, 398, 3, 2, 2, 2, 398, 402, 7, 39, 2, 2, 399, 400, 5, 172, 87, 2, 400, 401, 8, 34, 1, 2, 401, 403, 3, 2, 2, 2, 402, 399, 3, 2, 2, 2, 402, 403, 3, 2, 2, 2, 403, 404, 3, 2, 2, 2, 404, 408, 7, 39, 2, 2, 405, 406, 5, 172, 87, 2, 406, 407, 8, 34, 1, 2, 407, 409, 3, 2, 2, 2, 408, 405, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, 409, 410, 3, 2, 2, 2, 410, 411, 7, 43, 2, 2, 411, 412, 5, 50, 26, 2, 412, 67, 3, 2, 2, 2, 413, 414, 7, 17, 2, 2, 414, 415, 7, 42, 2, 2, 415, 416, 5, 172, 87, 2, 416, 417, 7, 43, 2, 2, 417, 418, 5, 50, 26, 2, 418, 69, 3, 2, 2, 2, 419, 420, 7, 16, 2, 2, 420, 421, 5, 50, 26, 2, 421, 422, 7, 17, 2, 2, 422, 423, 7, 42, 2, 2, 423, 424, 5, 172, 87, 2, 424, 425, 7, 43, 2, 2, 425, 426, 7, 39, 2, 2, 426, 71, 3, 2, 2, 2, 427, 428, 9, 3, 2, 2, 428, 429, 7, 39, 2, 2, 429, 73, 3, 2, 2, 2, 430, 432, 7, 23, 2, 2, 431, 433, 5, 172, 87, 2, 432, 431, 3, 2, 2, 2, 432, 433, 3, 2, 2, 2, 433, 434, 3, 2, 2, 2, 434, 435, 7, 39, 2, 2, 435, 75, 3, 2, 2, 2, 436, 440, 5, 78, 40, 2, 437, 439, 5, 80, 41, 2, 438, 437, 3, 2, 2, 2, 439, 442, 3, 2, 2, 2, 440, 438, 3, 2, 2, 2, 440, 441, 3, 2, 2, 2, 441, 444, 3, 2, 2, 2, 442, 440, 3, 2, 2, 2, 443, 445, 5, 82, 42, 2, 444, 443, 3, 2, 2, 2, 444, 445, 3, 2, 2, 2, 445, 77, 3, 2, 2, 2, 446, 447, 7, 32, 2, 2, 447, 448, 5, 52, 27, 2, 448, 79, 3, 2, 2, 2, 449, 450, 7, 33, 2, 2, 450, 452, 7, 42, 2, 2, 451, 453, 5, 30, 16, 2, 452, 451, 3, 2, 2, 2, 452, 453, 3, 2, 2, 2, 453, 454, 3, 2, 2, 2, 454, 455, 7, 43, 2, 2, 455, 456, 5, 52, 27, 2, 456, 81, 3, 2, 2, 2, 457, 458, 7, 34, 2, 2, 458, 459, 5, 52, 27, 2, 459, 83, 3, 2, 2, 2, 460, 471, 5, 88, 45, 2, 461, 471, 5, 86, 44, 2, 462, 471, 5, 108, 55, 2, 463, 471, 5, 110, 56, 2, 464, 471, 5, 90, 46, 2, 465, 471, 5, 92, 47, 2, 466, 471, 5, 98, 50, 2, 467, 471, 5, 100, 51, 2, 468, 471, 5, 106, 54, 2, 469, 471, 5, 114, 58, 2, 470, 460, 3, 2, 2, 2, 470, 461, 3, 2, 2, 2, 470, 462, 3, 2, 2, 2, 470, 463, 3, 2, 2, 2, 470, 464, 3, 2, 2, 2, 470, 465, 3, 2, 2, 2, 470, 466, 3, 2, 2, 2, 470, 467, 3, 2, 2, 2, 470, 468, 3, 2, 2, 2, 470, 469, 3, 2, 2, 2, 471, 85, 3, 2, 2, 2, 472, 474, 7, 42, 2, 2, 473, 475, 5, 28, 15, 2, 474, 473, 3, 2, 2, 2, 474, 475, 3, 2, 2, 2, 475, 476, 3, 2, 2, 2, 476, 477, 7, 43, 2, 2, 477, 478, 7, 41, 2, 2, 478, 479, 5, 174, 88, 2, 479, 482, 7, 25, 2, 2, 480, 483, 5, 172, 87, 2, 481, 483, 5, 52, 27, 2, 482, 480, 3, 2, 2, 2, 482, 481, 3, 2, 2, 2, 483, 87, 3, 2, 2, 2, 484, 485, 7, 42, 2, 2, 485, 486, 5, 172, 87, 2, 486, 487, 7, 43, 2, 2, 487, 89, 3, 2, 2, 2, 488, 489, 9, 4, 2, 2, 489, 91, 3, 2, 2, 2, 490, 491, 5, 94, 48, 2, 491, 93, 3, 2, 2, 2, 492, 493, 7, 80, 2, 2, 493, 95, 3, 2, 2, 2, 494, 497, 5, 94, 48, 2, 495, 497, 5, 98, 50, 2, 496, 494, 3, 2, 2, 2, 496, 495, 3, 2, 2, 2, 497, 97, 3, 2, 2, 2, 498, 499, 9, 5, 2, 2, 499, 99, 3, 2, 2, 2, 500, 504, 7, 87, 2, 2, 501, 503, 5, 102, 52, 2, 502, 501, 3, 2, 2, 2, 503, 506, 3, 2, 2, 2, 504, 502, 3, 2, 2, 2, 504, 505, 3, 2, 2, 2, 505, 507, 3, 2, 2, 2, 506, 504, 3, 2, 2, 2, 507, 517, 7, 89, 2, 2, 508, 512, 7, 88, 2, 2, 509, 511, 5, 104, 53, 2, 510, 509, 3, 2, 2, 2, 511, 514, 3, 2, 2, 2, 512, 510, 3, 2, 2, 2, 512, 513, 3, 2, 2, 2, 513, 515, 3, 2, 2, 2, 514, 512, 3, 2, 2, 2, 515, 517, 7, 91, 2, 2, 516, 500, 3, 2, 2, 2, 516, 508, 3, 2, 2, 2, 517, 101, 3, 2, 2, 2, 518, 525, 7, 90, 2, 2, 519, 521, 7, 3, 2, 2, 520, 522, 5, 172, 87, 2, 521, 520, 3, 2, 2, 2, 521, 522, 3, 2, 2, 2, 522, 523, 3, 2, 2, 2, 523, 525, 7, 46, 2, 2, 524, 518, 3, 2, 2, 2, 524, 519, 3, 2, 2, 2, 525, 103, 3, 2, 2, 2, 526, 533, 7, 92, 2, 2, 527, 529, 7, 3, 2, 2, 528, 530, 5, 172, 87, 2, 529, 528, 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, 530, 531, 3, 2, 2, 2, 531, 533, 7, 46, 2, 2, 532, 526, 3, 2, 2, 2, 532, 527, 3, 2, 2, 2, 533, 105, 3, 2, 2, 2, 534, 535, 9, 6, 2, 2, 535, 107, 3, 2, 2, 2, 536, 545, 7, 44, 2, 2, 537, 542, 5, 172, 87, 2, 538, 539, 7, 38, 2, 2, 539, 541, 5, 172, 87, 2, 540, 538, 3, 2, 2, 2, 541, 544, 3, 2, 2, 2, 542, 540, 3, 2, 2, 2, 542, 543, 3, 2, 2, 2, 543, 546, 3, 2, 2, 2, 544, 542, 3, 2, 2, 2, 545, 537, 3, 2, 2, 2, 545, 546, 3, 2, 2, 2, 546, 548, 3, 2, 2, 2, 547, 549, 7, 38, 2, 2, 548, 547, 3, 2, 2, 2, 548, 549, 3, 2, 2, 2, 549, 550, 3, 2, 2, 2, 550, 551, 7, 45, 2, 2, 551, 109, 3, 2, 2, 2, 552, 561, 7, 47, 2, 2, 553, 558, 5, 112, 57, 2, 554, 555, 7, 38, 2, 2, 555, 557, 5, 112, 57, 2, 556, 554, 3, 2, 2, 2, 557, 560, 3, 2, 2, 2, 558, 556, 3, 2, 2, 2, 558, 559, 3, 2, 2, 2, 559, 562, 3, 2, 2, 2, 560, 558, 3, 2, 2, 2, 561, 553, 3, 2, 2, 2, 561, 562, 3, 2, 2, 2, 562, 564, 3, 2, 2, 2, 563, 565, 7, 38, 2, 2, 564, 563, 3, 2, 2, 2, 564, 565, 3, 2, 2, 2, 565, 566, 3, 2, 2, 2, 566, 567, 7, 48, 2, 2, 567, 111, 3, 2, 2, 2, 568, 569, 5, 96, 49, 2, 569, 570, 7, 41, 2, 2, 570, 571, 5, 172, 87, 2, 571, 113, 3, 2, 2, 2, 572, 573, 9, 7, 2, 2, 573, 115, 3, 2, 2, 2, 574, 575, 8, 59, 1, 2, 575, 586, 5, 84, 43, 2, 576, 577, 7, 24, 2, 2, 577, 578, 5, 116, 59, 2, 578, 580, 7, 42, 2, 2, 579, 581, 5, 118, 60, 2, 580, 579, 3, 2, 2, 2, 580, 581, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 583, 7, 43, 2, 2, 583, 584, 8, 59, 1, 2, 584, 586, 3, 2, 2, 2, 585, 574, 3, 2, 2, 2, 585, 576, 3, 2, 2, 2, 586, 608, 3, 2, 2, 2, 587, 588, 12, 7, 2, 2, 588, 590, 7, 42, 2, 2, 589, 591, 5, 118, 60, 2, 590, 589, 3, 2, 2, 2, 590, 591, 3, 2, 2, 2, 591, 592, 3, 2, 2, 2, 592, 593, 7, 43, 2, 2, 593, 607, 8, 59, 1, 2, 594, 595, 12, 5, 2, 2, 595, 596, 5, 120, 61, 2, 596, 597, 8, 59, 1, 2, 597, 607, 3, 2, 2, 2, 598, 599, 12, 4, 2, 2, 599, 600, 5, 122, 62, 2, 600, 601, 8, 59, 1, 2, 601, 607, 3, 2, 2, 2, 602, 603, 12, 3, 2, 2, 603, 604, 5, 124, 63, 2, 604, 605, 8, 59, 1, 2, 605, 607, 3, 2, 2, 2, 606, 587, 3, 2, 2, 2, 606, 594, 3, 2, 2, 2, 606, 598, 3, 2, 2, 2, 606, 602, 3, 2, 2, 2, 607, 610, 3, 2, 2, 2, 608, 606, 3, 2, 2, 2, 608, 609, 3, 2, 2, 2, 609, 117, 3, 2, 2, 2, 610, 608, 3, 2, 2, 2, 611, 616, 5, 168, 85, 2, 612, 613, 7, 38, 2, 2, 613, 615, 5, 168, 85, 2, 614, 612, 3, 2, 2, 2, 615, 618, 3, 2, 2, 2, 616, 614, 3, 2, 2, 2, 616, 617, 3, 2, 2, 2, 617, 119, 3, 2, 2, 2, 618, 616, 3, 2, 2, 2, 619, 620, 7, 79, 2, 2, 620, 621, 5, 94, 48, 2, 621, 121, 3, 2, 2, 2, 622, 623, 7, 44, 2, 2, 623, 624, 5, 172, 87, 2, 624, 625, 7, 45, 2, 2, 625, 123, 3, 2, 2, 2, 626, 630, 7, 44, 2, 2, 627, 628, 5, 172, 87, 2, 628, 629, 8, 63, 1, 2, 629, 631, 3, 2, 2, 2, 630, 627, 3, 2, 2, 2, 630, 631, 3, 2, 2, 2, 631, 632, 3, 2, 2, 2, 632, 636, 7, 41, 2, 2, 633, 634, 5, 172, 87, 2, 634, 635, 8, 63, 1, 2, 635, 637, 3, 2, 2, 2, 636, 633, 3, 2, 2, 2, 636, 637, 3, 2, 2, 2, 637, 638, 3, 2, 2, 2, 638, 639, 7, 45, 2, 2, 639, 125, 3, 2, 2, 2, 640, 644, 5, 116, 59, 2, 641, 644, 5, 128, 65, 2, 642, 644, 5, 130, 66, 2, 643, 640, 3, 2, 2, 2, 643, 641, 3, 2, 2, 2, 643, 642, 3, 2, 2, 2, 644, 127, 3, 2, 2, 2, 645, 646, 5, 116, 59, 2, 646, 647, 5, 138, 70, 2, 647, 129, 3, 2, 2, 2, 648, 654, 7, 31, 2, 2, 649, 650, 7, 42, 2, 2, 650, 651, 5, 168, 85, 2, 651, 652, 7, 43, 2, 2, 652, 655, 3, 2, 2, 2, 653, 655, 5, 168, 85, 2, 654, 649, 3, 2, 2, 2, 654, 653, 3, 2, 2, 2, 655, 131, 3, 2, 2, 2, 656, 660, 5, 126, 64, 2, 657, 660, 5, 134, 68, 2, 658, 660, 5, 136, 69, 2, 659, 656, 3, 2, 2, 2, 659, 657, 3, 2, 2, 2, 659, 658, 3, 2, 2, 2, 660, 133, 3, 2, 2, 2, 661, 662, 5, 138, 70, 2, 662, 663, 5, 126, 64, 2, 663, 135, 3, 2, 2, 2, 664, 665, 5, 140, 71, 2, 665, 666, 5, 126, 64, 2, 666, 137, 3, 2, 2, 2, 667, 668, 9, 8, 2, 2, 668, 139, 3, 2, 2, 2, 669, 670, 9, 9, 2, 2, 670, 141, 3, 2, 2, 2, 671, 677, 5, 132, 67, 2, 672, 673, 5, 132, 67, 2, 673, 674, 7, 9, 2, 2, 674, 675, 5, 174, 88, 2, 675, 677, 3, 2, 2, 2, 676, 671, 3, 2, 2, 2, 676, 672, 3, 2, 2, 2, 677, 143, 3, 2, 2, 2, 678, 679, 8, 73, 1, 2, 679, 680, 5, 142, 72, 2, 680, 686, 3, 2, 2, 2, 681, 682, 12, 3, 2, 2, 682, 683, 9, 10, 2, 2, 683, 685, 5, 142, 72, 2, 684, 681, 3, 2, 2, 2, 685, 688, 3, 2, 2, 2, 686, 684, 3, 2, 2, 2, 686, 687, 3, 2, 2, 2, 687, 145, 3, 2, 2, 2, 688, 686, 3, 2, 2, 2, 689, 690, 8, 74, 1, 2, 690, 691, 5, 144, 73, 2, 691, 697, 3, 2, 2, 2, 692, 693, 12, 3, 2, 2, 693, 694, 9, 11, 2, 2, 694, 696, 5, 144, 73, 2, 695, 692, 3, 2, 2, 2, 696, 699, 3, 2, 2, 2, 697, 695, 3, 2, 2, 2, 697, 698, 3, 2, 2, 2, 698, 147, 3, 2, 2, 2, 699, 697, 3, 2, 2, 2, 700, 701, 8, 75, 1, 2, 701, 702, 5, 146, 74, 2, 702, 709, 3, 2, 2, 2, 703, 704, 12, 3, 2, 2, 704, 705, 5, 150, 76, 2, 705, 706, 5, 156, 79, 2, 706, 708, 3, 2, 2, 2, 707, 703, 3, 2, 2, 2, 708, 711, 3, 2, 2, 2, 709, 707, 3, 2, 2, 2, 709, 710, 3, 2, 2, 2, 710, 149, 3, 2, 2, 2, 711, 709, 3, 2, 2, 2, 712, 713, 9, 12, 2, 2, 713, 151, 3, 2, 2, 2, 714, 715, 8, 77, 1, 2, 715, 716, 5, 148, 75, 2, 716, 722, 3, 2, 2, 2, 717, 718, 12, 3, 2, 2, 718, 719, 9, 13, 2, 2, 719, 721, 5, 148, 75, 2, 720, 717, 3, 2, 2, 2, 721, 724, 3, 2, 2, 2, 722, 720, 3, 2, 2, 2, 722, 723, 3, 2, 2, 2, 723, 153, 3, 2, 2, 2, 724, 722, 3, 2, 2, 2, 725, 726, 8, 78, 1, 2, 726, 727, 5, 152, 77, 2, 727, 733, 3, 2, 2, 2, 728, 729, 12, 3, 2, 2, 729, 730, 9, 14, 2, 2, 730, 732, 5, 152, 77, 2, 731, 728, 3, 2, 2, 2, 732, 735, 3, 2, 2, 2, 733, 731, 3, 2, 2, 2, 733, 734, 3, 2, 2, 2, 734, 155, 3, 2, 2, 2, 735, 733, 3, 2, 2, 2, 736, 737, 8, 79, 1, 2, 737, 738, 5, 154, 78, 2, 738, 744, 3, 2, 2, 2, 739, 740, 12, 3, 2, 2, 740, 741, 7, 72, 2, 2, 741, 743, 5, 154, 78, 2, 742, 739, 3, 2, 2, 2, 743, 746, 3, 2, 2, 2, 744, 742, 3, 2, 2, 2, 744, 745, 3, 2, 2, 2, 745, 157, 3, 2, 2, 2, 746, 744, 3, 2, 2, 2, 747, 748, 8, 80, 1, 2, 748, 749, 5, 156, 79, 2, 749, 755, 3, 2, 2, 2, 750, 751, 12, 3, 2, 2, 751, 752, 7, 74, 2, 2, 752, 754, 5, 156, 79, 2, 753, 750, 3, 2, 2, 2, 754, 757, 3, 2, 2, 2, 755, 753, 3, 2, 2, 2, 755, 756, 3, 2, 2, 2, 756, 159, 3, 2, 2, 2, 757, 755, 3, 2, 2, 2, 758, 759, 8, 81, 1, 2, 759, 760, 5, 158, 80, 2, 760, 766, 3, 2, 2, 2, 761, 762, 12, 3, 2, 2, 762, 763, 7, 73, 2, 2, 763, 765, 5, 158, 80, 2, 764, 761, 3, 2, 2, 2, 765, 768, 3, 2, 2, 2, 766, 764, 3, 2, 2, 2, 766, 767, 3, 2, 2, 2, 767, 161, 3, 2, 2, 2, 768, 766, 3, 2, 2, 2, 769, 770, 8, 82, 1, 2, 770, 771, 5, 160, 81, 2, 771, 777, 3, 2, 2, 2, 772, 773, 12, 3, 2, 2, 773, 774, 7, 57, 2, 2, 774, 776, 5, 160, 81, 2, 775, 772, 3, 2, 2, 2, 776, 779, 3, 2, 2, 2, 777, 775, 3, 2, 2, 2, 777, 778, 3, 2, 2, 2, 778, 163, 3, 2, 2, 2, 779, 777, 3, 2, 2, 2, 780, 781, 8, 83, 1, 2, 781, 782, 5, 162, 82, 2, 782, 788, 3, 2, 2, 2, 783, 784, 12, 3, 2, 2, 784, 785, 7, 58, 2, 2, 785, 787, 5, 162, 82, 2, 786, 783, 3, 2, 2, 2, 787, 790, 3, 2, 2, 2, 788, 786, 3, 2, 2, 2, 788, 789, 3, 2, 2, 2, 789, 165, 3, 2, 2, 2, 790, 788, 3, 2, 2, 2, 791, 799, 5, 164, 83, 2, 792, 793, 5, 164, 83, 2, 793, 794, 7, 40, 2, 2, 794, 795, 5, 166, 84, 2, 795, 796, 7, 41, 2, 2, 796, 797, 5, 166, 84, 2, 797, 799, 3, 2, 2, 2, 798, 791, 3, 2, 2, 2, 798, 792, 3, 2, 2, 2, 799, 167, 3, 2, 2, 2, 800, 806, 5, 166, 84, 2, 801, 802, 5, 116, 59, 2, 802, 803, 5, 170, 86, 2, 803, 804, 5, 168, 85, 2, 804, 806, 3, 2, 2, 2, 805, 800, 3, 2, 2, 2, 805, 801, 3, 2, 2, 2, 806, 169, 3, 2, 2, 2, 807, 808, 9, 15, 2, 2, 808, 171, 3, 2, 2, 2, 809, 814, 5, 168, 85, 2, 810, 811, 7, 38, 2, 2, 811, 813, 5, 168, 85, 2, 812, 810, 3, 2, 2, 2, 813, 816, 3, 2, 2, 2, 814, 812, 3, 2, 2, 2, 814, 815, 3, 2, 2, 2, 815, 173, 3, 2, 2, 2, 816, 814, 3, 2, 2, 2, 817, 821, 5, 176, 89, 2, 818, 821, 5, 178, 90, 2, 819, 821, 5, 180, 91, 2, 820, 817, 3, 2, 2, 2, 820, 818, 3, 2, 2, 2, 820, 819, 3, 2, 2, 2, 821, 175, 3, 2, 2, 2, 822, 823, 5, 182, 92, 2, 823, 177, 3, 2, 2, 2, 824, 825, 5, 182, 92, 2, 825, 834, 7, 68, 2, 2, 826, 831, 5, 174, 88, 2, 827, 828, 7, 38, 2, 2, 828, 830, 5, 174, 88, 2, 829, 827, 3, 2, 2, 2, 830, 833, 3, 2, 2, 2, 831, 829, 3, 2, 2, 2, 831, 832, 3, 2, 2, 2, 832, 835, 3, 2, 2, 2, 833, 831, 3, 2, 2, 2, 834, 826, 3, 2, 2, 2, 834, 835, 3, 2, 2, 2, 835, 836, 3, 2, 2, 2, 836, 837, 7, 70, 2, 2, 837, 179, 3, 2, 2, 2, 838, 839, 7, 31, 2, 2, 839, 840, 7, 42, 2, 2, 840, 841, 5, 182, 92, 2, 841, 842, 7, 43, 2, 2, 842, 181, 3, 2, 2, 2, 843, 844, 9, 16, 2, 2, 844, 183, 3, 2, 2, 2, 80, 185, 192, 199, 204, 212, 224, 236, 242, 249, 262, 269, 279, 291, 293, 301, 310, 316, 321, 333, 338, 349, 358, 368, 381, 386, 392, 396, 402, 408, 432, 440, 444, 452, 470, 474, 482, 496, 504, 512, 516, 521, 524, 529, 532, 542, 545, 548, 558, 561, 564, 580, 585, 590, 606, 608, 616, 630, 636, 643, 654, 659, 676, 686, 697, 709, 722, 733, 744, 755, 766, 777, 788, 798, 805, 814, 820, 831, 834]
\ No newline at end of file
+[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 3, 95, 888, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 3, 2, 5, 2, 190, 10, 2, 3, 2, 3, 2, 3, 3, 6, 3, 195, 10, 3, 13, 3, 14, 3, 196, 3, 4, 3, 4, 3, 5, 6, 5, 202, 10, 5, 13, 5, 14, 5, 203, 3, 6, 3, 6, 3, 6, 5, 6, 209, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 217, 10, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 229, 10, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 241, 10, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 247, 10, 14, 3, 15, 3, 15, 3, 15, 7, 15, 252, 10, 15, 12, 15, 14, 15, 255, 11, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 7, 17, 265, 10, 17, 12, 17, 14, 17, 268, 11, 17, 3, 17, 3, 17, 3, 18, 3, 18, 5, 18, 274, 10, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 5, 20, 284, 10, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 7, 21, 296, 10, 21, 12, 21, 14, 21, 299, 11, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 5, 22, 306, 10, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 5, 24, 315, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 321, 10, 24, 3, 25, 3, 25, 3, 25, 5, 25, 326, 10, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 338, 10, 26, 3, 27, 3, 27, 3, 27, 5, 27, 343, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 350, 10, 27, 3, 27, 3, 27, 5, 27, 354, 10, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 5, 29, 363, 10, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 5, 30, 372, 10, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 7, 31, 380, 10, 31, 12, 31, 14, 31, 383, 11, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 5, 32, 395, 10, 32, 3, 33, 3, 33, 3, 33, 5, 33, 400, 10, 33, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 406, 10, 34, 3, 34, 3, 34, 5, 34, 410, 10, 34, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 416, 10, 34, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 422, 10, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 5, 38, 446, 10, 38, 3, 38, 3, 38, 3, 39, 3, 39, 7, 39, 452, 10, 39, 12, 39, 14, 39, 455, 11, 39, 3, 39, 5, 39, 458, 10, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 5, 41, 466, 10, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 5, 43, 484, 10, 43, 3, 44, 3, 44, 3, 44, 5, 44, 489, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 5, 44, 497, 10, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 5, 49, 513, 10, 49, 3, 50, 3, 50, 3, 51, 3, 51, 7, 51, 519, 10, 51, 12, 51, 14, 51, 522, 11, 51, 3, 51, 3, 51, 3, 51, 7, 51, 527, 10, 51, 12, 51, 14, 51, 530, 11, 51, 3, 51, 5, 51, 533, 10, 51, 3, 52, 3, 52, 3, 52, 5, 52, 538, 10, 52, 3, 52, 5, 52, 541, 10, 52, 3, 53, 3, 53, 3, 53, 5, 53, 546, 10, 53, 3, 53, 5, 53, 549, 10, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 7, 55, 557, 10, 55, 12, 55, 14, 55, 560, 11, 55, 5, 55, 562, 10, 55, 3, 55, 5, 55, 565, 10, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 7, 56, 573, 10, 56, 12, 56, 14, 56, 576, 11, 56, 5, 56, 578, 10, 56, 3, 56, 5, 56, 581, 10, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 597, 10, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 606, 10, 59, 3, 59, 3, 59, 3, 59, 5, 59, 611, 10, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 628, 10, 59, 3, 59, 3, 59, 7, 59, 632, 10, 59, 12, 59, 14, 59, 635, 11, 59, 3, 60, 3, 60, 3, 60, 7, 60, 640, 10, 60, 12, 60, 14, 60, 643, 11, 60, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 656, 10, 63, 3, 63, 3, 63, 3, 63, 3, 63, 5, 63, 662, 10, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 5, 64, 669, 10, 64, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 5, 67, 680, 10, 67, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 5, 72, 697, 10, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 7, 73, 705, 10, 73, 12, 73, 14, 73, 708, 11, 73, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 7, 74, 716, 10, 74, 12, 74, 14, 74, 719, 11, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 7, 75, 728, 10, 75, 12, 75, 14, 75, 731, 11, 75, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 7, 77, 741, 10, 77, 12, 77, 14, 77, 744, 11, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 7, 78, 752, 10, 78, 12, 78, 14, 78, 755, 11, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 7, 79, 763, 10, 79, 12, 79, 14, 79, 766, 11, 79, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 7, 80, 774, 10, 80, 12, 80, 14, 80, 777, 11, 80, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 7, 81, 785, 10, 81, 12, 81, 14, 81, 788, 11, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 7, 82, 796, 10, 82, 12, 82, 14, 82, 799, 11, 82, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 7, 83, 807, 10, 83, 12, 83, 14, 83, 810, 11, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 7, 84, 818, 10, 84, 12, 84, 14, 84, 821, 11, 84, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 7, 85, 829, 10, 85, 12, 85, 14, 85, 832, 11, 85, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 5, 86, 841, 10, 86, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 5, 87, 848, 10, 87, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 7, 89, 855, 10, 89, 12, 89, 14, 89, 858, 11, 89, 3, 90, 3, 90, 3, 90, 5, 90, 863, 10, 90, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 7, 92, 872, 10, 92, 12, 92, 14, 92, 875, 11, 92, 5, 92, 877, 10, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 94, 3, 94, 3, 94, 2, 2, 15, 116, 144, 146, 148, 152, 154, 156, 158, 160, 162, 164, 166, 168, 95, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 24, 2, 26, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 48, 2, 50, 2, 52, 2, 54, 2, 56, 2, 58, 2, 60, 2, 62, 2, 64, 2, 66, 2, 68, 2, 70, 2, 72, 2, 74, 2, 76, 2, 78, 2, 80, 2, 82, 2, 84, 2, 86, 2, 88, 2, 90, 2, 92, 2, 94, 2, 96, 2, 98, 2, 100, 2, 102, 2, 104, 2, 106, 2, 108, 2, 110, 2, 112, 2, 114, 2, 116, 2, 118, 2, 120, 2, 122, 2, 124, 2, 126, 2, 128, 2, 130, 2, 132, 2, 134, 2, 136, 2, 138, 2, 140, 2, 142, 2, 144, 2, 146, 2, 148, 2, 150, 2, 152, 2, 154, 2, 156, 2, 158, 2, 160, 2, 162, 2, 164, 2, 166, 2, 168, 2, 170, 2, 172, 2, 174, 2, 176, 2, 178, 2, 180, 2, 182, 2, 184, 2, 186, 2, 2, 17, 3, 2, 8, 9, 3, 2, 15, 16, 3, 2, 31, 32, 3, 2, 85, 86, 4, 2, 84, 84, 87, 87, 3, 2, 38, 40, 4, 2, 53, 53, 55, 55, 6, 2, 52, 52, 54, 54, 62, 62, 78, 78, 3, 2, 56, 59, 4, 2, 52, 52, 54, 54, 3, 2, 79, 81, 3, 2, 71, 74, 3, 2, 69, 70, 3, 2, 63, 68, 4, 2, 38, 40, 83, 83, 2, 900, 2, 189, 3, 2, 2, 2, 4, 194, 3, 2, 2, 2, 6, 198, 3, 2, 2, 2, 8, 201, 3, 2, 2, 2, 10, 208, 3, 2, 2, 2, 12, 216, 3, 2, 2, 2, 14, 218, 3, 2, 2, 2, 16, 221, 3, 2, 2, 2, 18, 223, 3, 2, 2, 2, 20, 230, 3, 2, 2, 2, 22, 232, 3, 2, 2, 2, 24, 234, 3, 2, 2, 2, 26, 236, 3, 2, 2, 2, 28, 248, 3, 2, 2, 2, 30, 256, 3, 2, 2, 2, 32, 260, 3, 2, 2, 2, 34, 273, 3, 2, 2, 2, 36, 275, 3, 2, 2, 2, 38, 280, 3, 2, 2, 2, 40, 290, 3, 2, 2, 2, 42, 305, 3, 2, 2, 2, 44, 307, 3, 2, 2, 2, 46, 311, 3, 2, 2, 2, 48, 322, 3, 2, 2, 2, 50, 337, 3, 2, 2, 2, 52, 353, 3, 2, 2, 2, 54, 355, 3, 2, 2, 2, 56, 362, 3, 2, 2, 2, 58, 364, 3, 2, 2, 2, 60, 373, 3, 2, 2, 2, 62, 394, 3, 2, 2, 2, 64, 399, 3, 2, 2, 2, 66, 401, 3, 2, 2, 2, 68, 426, 3, 2, 2, 2, 70, 432, 3, 2, 2, 2, 72, 440, 3, 2, 2, 2, 74, 443, 3, 2, 2, 2, 76, 449, 3, 2, 2, 2, 78, 459, 3, 2, 2, 2, 80, 462, 3, 2, 2, 2, 82, 470, 3, 2, 2, 2, 84, 483, 3, 2, 2, 2, 86, 485, 3, 2, 2, 2, 88, 500, 3, 2, 2, 2, 90, 504, 3, 2, 2, 2, 92, 506, 3, 2, 2, 2, 94, 508, 3, 2, 2, 2, 96, 512, 3, 2, 2, 2, 98, 514, 3, 2, 2, 2, 100, 532, 3, 2, 2, 2, 102, 540, 3, 2, 2, 2, 104, 548, 3, 2, 2, 2, 106, 550, 3, 2, 2, 2, 108, 552, 3, 2, 2, 2, 110, 568, 3, 2, 2, 2, 112, 584, 3, 2, 2, 2, 114, 588, 3, 2, 2, 2, 116, 610, 3, 2, 2, 2, 118, 636, 3, 2, 2, 2, 120, 644, 3, 2, 2, 2, 122, 647, 3, 2, 2, 2, 124, 651, 3, 2, 2, 2, 126, 668, 3, 2, 2, 2, 128, 670, 3, 2, 2, 2, 130, 673, 3, 2, 2, 2, 132, 679, 3, 2, 2, 2, 134, 681, 3, 2, 2, 2, 136, 684, 3, 2, 2, 2, 138, 687, 3, 2, 2, 2, 140, 689, 3, 2, 2, 2, 142, 696, 3, 2, 2, 2, 144, 698, 3, 2, 2, 2, 146, 709, 3, 2, 2, 2, 148, 720, 3, 2, 2, 2, 150, 732, 3, 2, 2, 2, 152, 734, 3, 2, 2, 2, 154, 745, 3, 2, 2, 2, 156, 756, 3, 2, 2, 2, 158, 767, 3, 2, 2, 2, 160, 778, 3, 2, 2, 2, 162, 789, 3, 2, 2, 2, 164, 800, 3, 2, 2, 2, 166, 811, 3, 2, 2, 2, 168, 822, 3, 2, 2, 2, 170, 840, 3, 2, 2, 2, 172, 847, 3, 2, 2, 2, 174, 849, 3, 2, 2, 2, 176, 851, 3, 2, 2, 2, 178, 862, 3, 2, 2, 2, 180, 864, 3, 2, 2, 2, 182, 866, 3, 2, 2, 2, 184, 880, 3, 2, 2, 2, 186, 885, 3, 2, 2, 2, 188, 190, 5, 4, 3, 2, 189, 188, 3, 2, 2, 2, 189, 190, 3, 2, 2, 2, 190, 191, 3, 2, 2, 2, 191, 192, 7, 2, 2, 3, 192, 3, 3, 2, 2, 2, 193, 195, 5, 6, 4, 2, 194, 193, 3, 2, 2, 2, 195, 196, 3, 2, 2, 2, 196, 194, 3, 2, 2, 2, 196, 197, 3, 2, 2, 2, 197, 5, 3, 2, 2, 2, 198, 199, 5, 8, 5, 2, 199, 7, 3, 2, 2, 2, 200, 202, 5, 10, 6, 2, 201, 200, 3, 2, 2, 2, 202, 203, 3, 2, 2, 2, 203, 201, 3, 2, 2, 2, 203, 204, 3, 2, 2, 2, 204, 9, 3, 2, 2, 2, 205, 209, 5, 50, 26, 2, 206, 209, 5, 12, 7, 2, 207, 209, 7, 42, 2, 2, 208, 205, 3, 2, 2, 2, 208, 206, 3, 2, 2, 2, 208, 207, 3, 2, 2, 2, 209, 11, 3, 2, 2, 2, 210, 211, 5, 14, 8, 2, 211, 212, 7, 42, 2, 2, 212, 217, 3, 2, 2, 2, 213, 217, 5, 26, 14, 2, 214, 217, 5, 32, 17, 2, 215, 217, 5, 40, 21, 2, 216, 210, 3, 2, 2, 2, 216, 213, 3, 2, 2, 2, 216, 214, 3, 2, 2, 2, 216, 215, 3, 2, 2, 2, 217, 13, 3, 2, 2, 2, 218, 219, 5, 16, 9, 2, 219, 220, 5, 18, 10, 2, 220, 15, 3, 2, 2, 2, 221, 222, 9, 2, 2, 2, 222, 17, 3, 2, 2, 2, 223, 224, 5, 22, 12, 2, 224, 225, 7, 44, 2, 2, 225, 228, 5, 178, 90, 2, 226, 227, 7, 63, 2, 2, 227, 229, 5, 20, 11, 2, 228, 226, 3, 2, 2, 2, 228, 229, 3, 2, 2, 2, 229, 19, 3, 2, 2, 2, 230, 231, 5, 172, 87, 2, 231, 21, 3, 2, 2, 2, 232, 233, 5, 24, 13, 2, 233, 23, 3, 2, 2, 2, 234, 235, 7, 83, 2, 2, 235, 25, 3, 2, 2, 2, 236, 237, 7, 23, 2, 2, 237, 238, 5, 22, 12, 2, 238, 240, 7, 45, 2, 2, 239, 241, 5, 28, 15, 2, 240, 239, 3, 2, 2, 2, 240, 241, 3, 2, 2, 2, 241, 242, 3, 2, 2, 2, 242, 243, 7, 46, 2, 2, 243, 244, 7, 26, 2, 2, 244, 246, 5, 178, 90, 2, 245, 247, 5, 52, 27, 2, 246, 245, 3, 2, 2, 2, 246, 247, 3, 2, 2, 2, 247, 27, 3, 2, 2, 2, 248, 253, 5, 30, 16, 2, 249, 250, 7, 41, 2, 2, 250, 252, 5, 30, 16, 2, 251, 249, 3, 2, 2, 2, 252, 255, 3, 2, 2, 2, 253, 251, 3, 2, 2, 2, 253, 254, 3, 2, 2, 2, 254, 29, 3, 2, 2, 2, 255, 253, 3, 2, 2, 2, 256, 257, 5, 22, 12, 2, 257, 258, 7, 44, 2, 2, 258, 259, 5, 178, 90, 2, 259, 31, 3, 2, 2, 2, 260, 261, 7, 28, 2, 2, 261, 262, 5, 22, 12, 2, 262, 266, 7, 50, 2, 2, 263, 265, 5, 34, 18, 2, 264, 263, 3, 2, 2, 2, 265, 268, 3, 2, 2, 2, 266, 264, 3, 2, 2, 2, 266, 267, 3, 2, 2, 2, 267, 269, 3, 2, 2, 2, 268, 266, 3, 2, 2, 2, 269, 270, 7, 51, 2, 2, 270, 33, 3, 2, 2, 2, 271, 274, 5, 36, 19, 2, 272, 274, 5, 38, 20, 2, 273, 271, 3, 2, 2, 2, 273, 272, 3, 2, 2, 2, 274, 35, 3, 2, 2, 2, 275, 276, 5, 22, 12, 2, 276, 277, 7, 44, 2, 2, 277, 278, 5, 178, 90, 2, 278, 279, 7, 42, 2, 2, 279, 37, 3, 2, 2, 2, 280, 281, 5, 22, 12, 2, 281, 283, 7, 45, 2, 2, 282, 284, 5, 28, 15, 2, 283, 282, 3, 2, 2, 2, 283, 284, 3, 2, 2, 2, 284, 285, 3, 2, 2, 2, 285, 286, 7, 46, 2, 2, 286, 287, 7, 44, 2, 2, 287, 288, 5, 178, 90, 2, 288, 289, 7, 42, 2, 2, 289, 39, 3, 2, 2, 2, 290, 291, 7, 27, 2, 2, 291, 292, 5, 22, 12, 2, 292, 297, 7, 50, 2, 2, 293, 296, 5, 42, 22, 2, 294, 296, 7, 42, 2, 2, 295, 293, 3, 2, 2, 2, 295, 294, 3, 2, 2, 2, 296, 299, 3, 2, 2, 2, 297, 295, 3, 2, 2, 2, 297, 298, 3, 2, 2, 2, 298, 300, 3, 2, 2, 2, 299, 297, 3, 2, 2, 2, 300, 301, 7, 51, 2, 2, 301, 41, 3, 2, 2, 2, 302, 306, 5, 44, 23, 2, 303, 306, 5, 46, 24, 2, 304, 306, 5, 48, 25, 2, 305, 302, 3, 2, 2, 2, 305, 303, 3, 2, 2, 2, 305, 304, 3, 2, 2, 2, 306, 43, 3, 2, 2, 2, 307, 308, 5, 22, 12, 2, 308, 309, 7, 44, 2, 2, 309, 310, 5, 178, 90, 2, 310, 45, 3, 2, 2, 2, 311, 312, 5, 22, 12, 2, 312, 314, 7, 45, 2, 2, 313, 315, 5, 28, 15, 2, 314, 313, 3, 2, 2, 2, 314, 315, 3, 2, 2, 2, 315, 316, 3, 2, 2, 2, 316, 317, 7, 46, 2, 2, 317, 318, 7, 44, 2, 2, 318, 320, 5, 178, 90, 2, 319, 321, 5, 52, 27, 2, 320, 319, 3, 2, 2, 2, 320, 321, 3, 2, 2, 2, 321, 47, 3, 2, 2, 2, 322, 323, 7, 29, 2, 2, 323, 325, 7, 45, 2, 2, 324, 326, 5, 28, 15, 2, 325, 324, 3, 2, 2, 2, 325, 326, 3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 328, 7, 46, 2, 2, 328, 329, 5, 52, 27, 2, 329, 49, 3, 2, 2, 2, 330, 338, 5, 54, 28, 2, 331, 338, 5, 56, 29, 2, 332, 338, 5, 64, 33, 2, 333, 338, 5, 72, 37, 2, 334, 338, 5, 74, 38, 2, 335, 338, 5, 52, 27, 2, 336, 338, 5, 76, 39, 2, 337, 330, 3, 2, 2, 2, 337, 331, 3, 2, 2, 2, 337, 332, 3, 2, 2, 2, 337, 333, 3, 2, 2, 2, 337, 334, 3, 2, 2, 2, 337, 335, 3, 2, 2, 2, 337, 336, 3, 2, 2, 2, 338, 51, 3, 2, 2, 2, 339, 340, 6, 27, 2, 2, 340, 342, 7, 50, 2, 2, 341, 343, 5, 8, 5, 2, 342, 341, 3, 2, 2, 2, 342, 343, 3, 2, 2, 2, 343, 344, 3, 2, 2, 2, 344, 354, 7, 51, 2, 2, 345, 346, 6, 27, 3, 2, 346, 347, 7, 50, 2, 2, 347, 349, 8, 27, 1, 2, 348, 350, 5, 8, 5, 2, 349, 348, 3, 2, 2, 2, 349, 350, 3, 2, 2, 2, 350, 351, 3, 2, 2, 2, 351, 352, 8, 27, 1, 2, 352, 354, 7, 51, 2, 2, 353, 339, 3, 2, 2, 2, 353, 345, 3, 2, 2, 2, 354, 53, 3, 2, 2, 2, 355, 356, 8, 28, 1, 2, 356, 357, 5, 176, 89, 2, 357, 358, 7, 42, 2, 2, 358, 359, 8, 28, 1, 2, 359, 55, 3, 2, 2, 2, 360, 363, 5, 58, 30, 2, 361, 363, 5, 60, 31, 2, 362, 360, 3, 2, 2, 2, 362, 361, 3, 2, 2, 2, 363, 57, 3, 2, 2, 2, 364, 365, 7, 19, 2, 2, 365, 366, 7, 45, 2, 2, 366, 367, 5, 176, 89, 2, 367, 368, 7, 46, 2, 2, 368, 371, 5, 50, 26, 2, 369, 370, 7, 20, 2, 2, 370, 372, 5, 50, 26, 2, 371, 369, 3, 2, 2, 2, 371, 372, 3, 2, 2, 2, 372, 59, 3, 2, 2, 2, 373, 374, 7, 12, 2, 2, 374, 375, 7, 45, 2, 2, 375, 376, 5, 176, 89, 2, 376, 377, 7, 46, 2, 2, 377, 381, 7, 50, 2, 2, 378, 380, 5, 62, 32, 2, 379, 378, 3, 2, 2, 2, 380, 383, 3, 2, 2, 2, 381, 379, 3, 2, 2, 2, 381, 382, 3, 2, 2, 2, 382, 384, 3, 2, 2, 2, 383, 381, 3, 2, 2, 2, 384, 385, 7, 51, 2, 2, 385, 61, 3, 2, 2, 2, 386, 387, 7, 13, 2, 2, 387, 388, 5, 176, 89, 2, 388, 389, 7, 44, 2, 2, 389, 390, 5, 50, 26, 2, 390, 395, 3, 2, 2, 2, 391, 392, 7, 14, 2, 2, 392, 393, 7, 44, 2, 2, 393, 395, 5, 50, 26, 2, 394, 386, 3, 2, 2, 2, 394, 391, 3, 2, 2, 2, 395, 63, 3, 2, 2, 2, 396, 400, 5, 66, 34, 2, 397, 400, 5, 68, 35, 2, 398, 400, 5, 70, 36, 2, 399, 396, 3, 2, 2, 2, 399, 397, 3, 2, 2, 2, 399, 398, 3, 2, 2, 2, 400, 65, 3, 2, 2, 2, 401, 402, 7, 21, 2, 2, 402, 409, 7, 45, 2, 2, 403, 406, 5, 14, 8, 2, 404, 406, 5, 176, 89, 2, 405, 403, 3, 2, 2, 2, 405, 404, 3, 2, 2, 2, 406, 407, 3, 2, 2, 2, 407, 408, 8, 34, 1, 2, 408, 410, 3, 2, 2, 2, 409, 405, 3, 2, 2, 2, 409, 410, 3, 2, 2, 2, 410, 411, 3, 2, 2, 2, 411, 415, 7, 42, 2, 2, 412, 413, 5, 176, 89, 2, 413, 414, 8, 34, 1, 2, 414, 416, 3, 2, 2, 2, 415, 412, 3, 2, 2, 2, 415, 416, 3, 2, 2, 2, 416, 417, 3, 2, 2, 2, 417, 421, 7, 42, 2, 2, 418, 419, 5, 176, 89, 2, 419, 420, 8, 34, 1, 2, 420, 422, 3, 2, 2, 2, 421, 418, 3, 2, 2, 2, 421, 422, 3, 2, 2, 2, 422, 423, 3, 2, 2, 2, 423, 424, 7, 46, 2, 2, 424, 425, 5, 50, 26, 2, 425, 67, 3, 2, 2, 2, 426, 427, 7, 18, 2, 2, 427, 428, 7, 45, 2, 2, 428, 429, 5, 176, 89, 2, 429, 430, 7, 46, 2, 2, 430, 431, 5, 50, 26, 2, 431, 69, 3, 2, 2, 2, 432, 433, 7, 17, 2, 2, 433, 434, 5, 50, 26, 2, 434, 435, 7, 18, 2, 2, 435, 436, 7, 45, 2, 2, 436, 437, 5, 176, 89, 2, 437, 438, 7, 46, 2, 2, 438, 439, 7, 42, 2, 2, 439, 71, 3, 2, 2, 2, 440, 441, 9, 3, 2, 2, 441, 442, 7, 42, 2, 2, 442, 73, 3, 2, 2, 2, 443, 445, 7, 24, 2, 2, 444, 446, 5, 176, 89, 2, 445, 444, 3, 2, 2, 2, 445, 446, 3, 2, 2, 2, 446, 447, 3, 2, 2, 2, 447, 448, 7, 42, 2, 2, 448, 75, 3, 2, 2, 2, 449, 453, 5, 78, 40, 2, 450, 452, 5, 80, 41, 2, 451, 450, 3, 2, 2, 2, 452, 455, 3, 2, 2, 2, 453, 451, 3, 2, 2, 2, 453, 454, 3, 2, 2, 2, 454, 457, 3, 2, 2, 2, 455, 453, 3, 2, 2, 2, 456, 458, 5, 82, 42, 2, 457, 456, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 77, 3, 2, 2, 2, 459, 460, 7, 35, 2, 2, 460, 461, 5, 52, 27, 2, 461, 79, 3, 2, 2, 2, 462, 463, 7, 36, 2, 2, 463, 465, 7, 45, 2, 2, 464, 466, 5, 30, 16, 2, 465, 464, 3, 2, 2, 2, 465, 466, 3, 2, 2, 2, 466, 467, 3, 2, 2, 2, 467, 468, 7, 46, 2, 2, 468, 469, 5, 52, 27, 2, 469, 81, 3, 2, 2, 2, 470, 471, 7, 37, 2, 2, 471, 472, 5, 52, 27, 2, 472, 83, 3, 2, 2, 2, 473, 484, 5, 88, 45, 2, 474, 484, 5, 86, 44, 2, 475, 484, 5, 108, 55, 2, 476, 484, 5, 110, 56, 2, 477, 484, 5, 90, 46, 2, 478, 484, 5, 92, 47, 2, 479, 484, 5, 98, 50, 2, 480, 484, 5, 100, 51, 2, 481, 484, 5, 106, 54, 2, 482, 484, 5, 114, 58, 2, 483, 473, 3, 2, 2, 2, 483, 474, 3, 2, 2, 2, 483, 475, 3, 2, 2, 2, 483, 476, 3, 2, 2, 2, 483, 477, 3, 2, 2, 2, 483, 478, 3, 2, 2, 2, 483, 479, 3, 2, 2, 2, 483, 480, 3, 2, 2, 2, 483, 481, 3, 2, 2, 2, 483, 482, 3, 2, 2, 2, 484, 85, 3, 2, 2, 2, 485, 486, 8, 44, 1, 2, 486, 488, 7, 45, 2, 2, 487, 489, 5, 28, 15, 2, 488, 487, 3, 2, 2, 2, 488, 489, 3, 2, 2, 2, 489, 490, 3, 2, 2, 2, 490, 491, 7, 46, 2, 2, 491, 492, 7, 44, 2, 2, 492, 493, 5, 178, 90, 2, 493, 496, 7, 26, 2, 2, 494, 497, 5, 176, 89, 2, 495, 497, 5, 52, 27, 2, 496, 494, 3, 2, 2, 2, 496, 495, 3, 2, 2, 2, 497, 498, 3, 2, 2, 2, 498, 499, 8, 44, 1, 2, 499, 87, 3, 2, 2, 2, 500, 501, 7, 45, 2, 2, 501, 502, 5, 176, 89, 2, 502, 503, 7, 46, 2, 2, 503, 89, 3, 2, 2, 2, 504, 505, 9, 4, 2, 2, 505, 91, 3, 2, 2, 2, 506, 507, 5, 94, 48, 2, 507, 93, 3, 2, 2, 2, 508, 509, 7, 83, 2, 2, 509, 95, 3, 2, 2, 2, 510, 513, 5, 94, 48, 2, 511, 513, 5, 98, 50, 2, 512, 510, 3, 2, 2, 2, 512, 511, 3, 2, 2, 2, 513, 97, 3, 2, 2, 2, 514, 515, 9, 5, 2, 2, 515, 99, 3, 2, 2, 2, 516, 520, 7, 90, 2, 2, 517, 519, 5, 102, 52, 2, 518, 517, 3, 2, 2, 2, 519, 522, 3, 2, 2, 2, 520, 518, 3, 2, 2, 2, 520, 521, 3, 2, 2, 2, 521, 523, 3, 2, 2, 2, 522, 520, 3, 2, 2, 2, 523, 533, 7, 92, 2, 2, 524, 528, 7, 91, 2, 2, 525, 527, 5, 104, 53, 2, 526, 525, 3, 2, 2, 2, 527, 530, 3, 2, 2, 2, 528, 526, 3, 2, 2, 2, 528, 529, 3, 2, 2, 2, 529, 531, 3, 2, 2, 2, 530, 528, 3, 2, 2, 2, 531, 533, 7, 94, 2, 2, 532, 516, 3, 2, 2, 2, 532, 524, 3, 2, 2, 2, 533, 101, 3, 2, 2, 2, 534, 541, 7, 93, 2, 2, 535, 537, 7, 3, 2, 2, 536, 538, 5, 176, 89, 2, 537, 536, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538, 539, 3, 2, 2, 2, 539, 541, 7, 49, 2, 2, 540, 534, 3, 2, 2, 2, 540, 535, 3, 2, 2, 2, 541, 103, 3, 2, 2, 2, 542, 549, 7, 95, 2, 2, 543, 545, 7, 3, 2, 2, 544, 546, 5, 176, 89, 2, 545, 544, 3, 2, 2, 2, 545, 546, 3, 2, 2, 2, 546, 547, 3, 2, 2, 2, 547, 549, 7, 49, 2, 2, 548, 542, 3, 2, 2, 2, 548, 543, 3, 2, 2, 2, 549, 105, 3, 2, 2, 2, 550, 551, 9, 6, 2, 2, 551, 107, 3, 2, 2, 2, 552, 561, 7, 47, 2, 2, 553, 558, 5, 176, 89, 2, 554, 555, 7, 41, 2, 2, 555, 557, 5, 176, 89, 2, 556, 554, 3, 2, 2, 2, 557, 560, 3, 2, 2, 2, 558, 556, 3, 2, 2, 2, 558, 559, 3, 2, 2, 2, 559, 562, 3, 2, 2, 2, 560, 558, 3, 2, 2, 2, 561, 553, 3, 2, 2, 2, 561, 562, 3, 2, 2, 2, 562, 564, 3, 2, 2, 2, 563, 565, 7, 41, 2, 2, 564, 563, 3, 2, 2, 2, 564, 565, 3, 2, 2, 2, 565, 566, 3, 2, 2, 2, 566, 567, 7, 48, 2, 2, 567, 109, 3, 2, 2, 2, 568, 577, 7, 50, 2, 2, 569, 574, 5, 112, 57, 2, 570, 571, 7, 41, 2, 2, 571, 573, 5, 112, 57, 2, 572, 570, 3, 2, 2, 2, 573, 576, 3, 2, 2, 2, 574, 572, 3, 2, 2, 2, 574, 575, 3, 2, 2, 2, 575, 578, 3, 2, 2, 2, 576, 574, 3, 2, 2, 2, 577, 569, 3, 2, 2, 2, 577, 578, 3, 2, 2, 2, 578, 580, 3, 2, 2, 2, 579, 581, 7, 41, 2, 2, 580, 579, 3, 2, 2, 2, 580, 581, 3, 2, 2, 2, 581, 582, 3, 2, 2, 2, 582, 583, 7, 51, 2, 2, 583, 111, 3, 2, 2, 2, 584, 585, 5, 96, 49, 2, 585, 586, 7, 44, 2, 2, 586, 587, 5, 176, 89, 2, 587, 113, 3, 2, 2, 2, 588, 589, 9, 7, 2, 2, 589, 115, 3, 2, 2, 2, 590, 591, 8, 59, 1, 2, 591, 611, 5, 84, 43, 2, 592, 593, 7, 25, 2, 2, 593, 594, 5, 116, 59, 2, 594, 596, 7, 45, 2, 2, 595, 597, 5, 118, 60, 2, 596, 595, 3, 2, 2, 2, 596, 597, 3, 2, 2, 2, 597, 598, 3, 2, 2, 2, 598, 599, 7, 46, 2, 2, 599, 600, 8, 59, 1, 2, 600, 611, 3, 2, 2, 2, 601, 602, 7, 30, 2, 2, 602, 603, 5, 178, 90, 2, 603, 605, 7, 45, 2, 2, 604, 606, 5, 118, 60, 2, 605, 604, 3, 2, 2, 2, 605, 606, 3, 2, 2, 2, 606, 607, 3, 2, 2, 2, 607, 608, 7, 46, 2, 2, 608, 609, 8, 59, 1, 2, 609, 611, 3, 2, 2, 2, 610, 590, 3, 2, 2, 2, 610, 592, 3, 2, 2, 2, 610, 601, 3, 2, 2, 2, 611, 633, 3, 2, 2, 2, 612, 613, 12, 8, 2, 2, 613, 614, 5, 120, 61, 2, 614, 615, 8, 59, 1, 2, 615, 632, 3, 2, 2, 2, 616, 617, 12, 7, 2, 2, 617, 618, 5, 122, 62, 2, 618, 619, 8, 59, 1, 2, 619, 632, 3, 2, 2, 2, 620, 621, 12, 6, 2, 2, 621, 622, 5, 124, 63, 2, 622, 623, 8, 59, 1, 2, 623, 632, 3, 2, 2, 2, 624, 625, 12, 5, 2, 2, 625, 627, 7, 45, 2, 2, 626, 628, 5, 118, 60, 2, 627, 626, 3, 2, 2, 2, 627, 628, 3, 2, 2, 2, 628, 629, 3, 2, 2, 2, 629, 630, 7, 46, 2, 2, 630, 632, 8, 59, 1, 2, 631, 612, 3, 2, 2, 2, 631, 616, 3, 2, 2, 2, 631, 620, 3, 2, 2, 2, 631, 624, 3, 2, 2, 2, 632, 635, 3, 2, 2, 2, 633, 631, 3, 2, 2, 2, 633, 634, 3, 2, 2, 2, 634, 117, 3, 2, 2, 2, 635, 633, 3, 2, 2, 2, 636, 641, 5, 172, 87, 2, 637, 638, 7, 41, 2, 2, 638, 640, 5, 172, 87, 2, 639, 637, 3, 2, 2, 2, 640, 643, 3, 2, 2, 2, 641, 639, 3, 2, 2, 2, 641, 642, 3, 2, 2, 2, 642, 119, 3, 2, 2, 2, 643, 641, 3, 2, 2, 2, 644, 645, 7, 82, 2, 2, 645, 646, 5, 94, 48, 2, 646, 121, 3, 2, 2, 2, 647, 648, 7, 47, 2, 2, 648, 649, 5, 176, 89, 2, 649, 650, 7, 48, 2, 2, 650, 123, 3, 2, 2, 2, 651, 655, 7, 47, 2, 2, 652, 653, 5, 176, 89, 2, 653, 654, 8, 63, 1, 2, 654, 656, 3, 2, 2, 2, 655, 652, 3, 2, 2, 2, 655, 656, 3, 2, 2, 2, 656, 657, 3, 2, 2, 2, 657, 661, 7, 44, 2, 2, 658, 659, 5, 176, 89, 2, 659, 660, 8, 63, 1, 2, 660, 662, 3, 2, 2, 2, 661, 658, 3, 2, 2, 2, 661, 662, 3, 2, 2, 2, 662, 663, 3, 2, 2, 2, 663, 664, 7, 48, 2, 2, 664, 125, 3, 2, 2, 2, 665, 669, 5, 116, 59, 2, 666, 669, 5, 128, 65, 2, 667, 669, 5, 130, 66, 2, 668, 665, 3, 2, 2, 2, 668, 666, 3, 2, 2, 2, 668, 667, 3, 2, 2, 2, 669, 127, 3, 2, 2, 2, 670, 671, 5, 116, 59, 2, 671, 672, 5, 138, 70, 2, 672, 129, 3, 2, 2, 2, 673, 674, 7, 34, 2, 2, 674, 675, 5, 172, 87, 2, 675, 131, 3, 2, 2, 2, 676, 680, 5, 126, 64, 2, 677, 680, 5, 134, 68, 2, 678, 680, 5, 136, 69, 2, 679, 676, 3, 2, 2, 2, 679, 677, 3, 2, 2, 2, 679, 678, 3, 2, 2, 2, 680, 133, 3, 2, 2, 2, 681, 682, 5, 138, 70, 2, 682, 683, 5, 126, 64, 2, 683, 135, 3, 2, 2, 2, 684, 685, 5, 140, 71, 2, 685, 686, 5, 126, 64, 2, 686, 137, 3, 2, 2, 2, 687, 688, 9, 8, 2, 2, 688, 139, 3, 2, 2, 2, 689, 690, 9, 9, 2, 2, 690, 141, 3, 2, 2, 2, 691, 697, 5, 132, 67, 2, 692, 693, 5, 132, 67, 2, 693, 694, 7, 10, 2, 2, 694, 695, 5, 178, 90, 2, 695, 697, 3, 2, 2, 2, 696, 691, 3, 2, 2, 2, 696, 692, 3, 2, 2, 2, 697, 143, 3, 2, 2, 2, 698, 699, 8, 73, 1, 2, 699, 700, 5, 142, 72, 2, 700, 706, 3, 2, 2, 2, 701, 702, 12, 3, 2, 2, 702, 703, 9, 10, 2, 2, 703, 705, 5, 142, 72, 2, 704, 701, 3, 2, 2, 2, 705, 708, 3, 2, 2, 2, 706, 704, 3, 2, 2, 2, 706, 707, 3, 2, 2, 2, 707, 145, 3, 2, 2, 2, 708, 706, 3, 2, 2, 2, 709, 710, 8, 74, 1, 2, 710, 711, 5, 144, 73, 2, 711, 717, 3, 2, 2, 2, 712, 713, 12, 3, 2, 2, 713, 714, 9, 11, 2, 2, 714, 716, 5, 144, 73, 2, 715, 712, 3, 2, 2, 2, 716, 719, 3, 2, 2, 2, 717, 715, 3, 2, 2, 2, 717, 718, 3, 2, 2, 2, 718, 147, 3, 2, 2, 2, 719, 717, 3, 2, 2, 2, 720, 721, 8, 75, 1, 2, 721, 722, 5, 146, 74, 2, 722, 729, 3, 2, 2, 2, 723, 724, 12, 3, 2, 2, 724, 725, 5, 150, 76, 2, 725, 726, 5, 160, 81, 2, 726, 728, 3, 2, 2, 2, 727, 723, 3, 2, 2, 2, 728, 731, 3, 2, 2, 2, 729, 727, 3, 2, 2, 2, 729, 730, 3, 2, 2, 2, 730, 149, 3, 2, 2, 2, 731, 729, 3, 2, 2, 2, 732, 733, 9, 12, 2, 2, 733, 151, 3, 2, 2, 2, 734, 735, 8, 77, 1, 2, 735, 736, 5, 148, 75, 2, 736, 742, 3, 2, 2, 2, 737, 738, 12, 3, 2, 2, 738, 739, 7, 7, 2, 2, 739, 741, 5, 178, 90, 2, 740, 737, 3, 2, 2, 2, 741, 744, 3, 2, 2, 2, 742, 740, 3, 2, 2, 2, 742, 743, 3, 2, 2, 2, 743, 153, 3, 2, 2, 2, 744, 742, 3, 2, 2, 2, 745, 746, 8, 78, 1, 2, 746, 747, 5, 152, 77, 2, 747, 753, 3, 2, 2, 2, 748, 749, 12, 3, 2, 2, 749, 750, 7, 33, 2, 2, 750, 752, 5, 178, 90, 2, 751, 748, 3, 2, 2, 2, 752, 755, 3, 2, 2, 2, 753, 751, 3, 2, 2, 2, 753, 754, 3, 2, 2, 2, 754, 155, 3, 2, 2, 2, 755, 753, 3, 2, 2, 2, 756, 757, 8, 79, 1, 2, 757, 758, 5, 154, 78, 2, 758, 764, 3, 2, 2, 2, 759, 760, 12, 3, 2, 2, 760, 761, 9, 13, 2, 2, 761, 763, 5, 156, 79, 4, 762, 759, 3, 2, 2, 2, 763, 766, 3, 2, 2, 2, 764, 762, 3, 2, 2, 2, 764, 765, 3, 2, 2, 2, 765, 157, 3, 2, 2, 2, 766, 764, 3, 2, 2, 2, 767, 768, 8, 80, 1, 2, 768, 769, 5, 156, 79, 2, 769, 775, 3, 2, 2, 2, 770, 771, 12, 3, 2, 2, 771, 772, 9, 14, 2, 2, 772, 774, 5, 156, 79, 2, 773, 770, 3, 2, 2, 2, 774, 777, 3, 2, 2, 2, 775, 773, 3, 2, 2, 2, 775, 776, 3, 2, 2, 2, 776, 159, 3, 2, 2, 2, 777, 775, 3, 2, 2, 2, 778, 779, 8, 81, 1, 2, 779, 780, 5, 158, 80, 2, 780, 786, 3, 2, 2, 2, 781, 782, 12, 3, 2, 2, 782, 783, 7, 75, 2, 2, 783, 785, 5, 158, 80, 2, 784, 781, 3, 2, 2, 2, 785, 788, 3, 2, 2, 2, 786, 784, 3, 2, 2, 2, 786, 787, 3, 2, 2, 2, 787, 161, 3, 2, 2, 2, 788, 786, 3, 2, 2, 2, 789, 790, 8, 82, 1, 2, 790, 791, 5, 160, 81, 2, 791, 797, 3, 2, 2, 2, 792, 793, 12, 3, 2, 2, 793, 794, 7, 77, 2, 2, 794, 796, 5, 160, 81, 2, 795, 792, 3, 2, 2, 2, 796, 799, 3, 2, 2, 2, 797, 795, 3, 2, 2, 2, 797, 798, 3, 2, 2, 2, 798, 163, 3, 2, 2, 2, 799, 797, 3, 2, 2, 2, 800, 801, 8, 83, 1, 2, 801, 802, 5, 162, 82, 2, 802, 808, 3, 2, 2, 2, 803, 804, 12, 3, 2, 2, 804, 805, 7, 76, 2, 2, 805, 807, 5, 162, 82, 2, 806, 803, 3, 2, 2, 2, 807, 810, 3, 2, 2, 2, 808, 806, 3, 2, 2, 2, 808, 809, 3, 2, 2, 2, 809, 165, 3, 2, 2, 2, 810, 808, 3, 2, 2, 2, 811, 812, 8, 84, 1, 2, 812, 813, 5, 164, 83, 2, 813, 819, 3, 2, 2, 2, 814, 815, 12, 3, 2, 2, 815, 816, 7, 60, 2, 2, 816, 818, 5, 164, 83, 2, 817, 814, 3, 2, 2, 2, 818, 821, 3, 2, 2, 2, 819, 817, 3, 2, 2, 2, 819, 820, 3, 2, 2, 2, 820, 167, 3, 2, 2, 2, 821, 819, 3, 2, 2, 2, 822, 823, 8, 85, 1, 2, 823, 824, 5, 166, 84, 2, 824, 830, 3, 2, 2, 2, 825, 826, 12, 3, 2, 2, 826, 827, 7, 61, 2, 2, 827, 829, 5, 166, 84, 2, 828, 825, 3, 2, 2, 2, 829, 832, 3, 2, 2, 2, 830, 828, 3, 2, 2, 2, 830, 831, 3, 2, 2, 2, 831, 169, 3, 2, 2, 2, 832, 830, 3, 2, 2, 2, 833, 841, 5, 168, 85, 2, 834, 835, 5, 168, 85, 2, 835, 836, 7, 43, 2, 2, 836, 837, 5, 170, 86, 2, 837, 838, 7, 44, 2, 2, 838, 839, 5, 170, 86, 2, 839, 841, 3, 2, 2, 2, 840, 833, 3, 2, 2, 2, 840, 834, 3, 2, 2, 2, 841, 171, 3, 2, 2, 2, 842, 848, 5, 170, 86, 2, 843, 844, 5, 116, 59, 2, 844, 845, 5, 174, 88, 2, 845, 846, 5, 172, 87, 2, 846, 848, 3, 2, 2, 2, 847, 842, 3, 2, 2, 2, 847, 843, 3, 2, 2, 2, 848, 173, 3, 2, 2, 2, 849, 850, 9, 15, 2, 2, 850, 175, 3, 2, 2, 2, 851, 856, 5, 172, 87, 2, 852, 853, 7, 41, 2, 2, 853, 855, 5, 172, 87, 2, 854, 852, 3, 2, 2, 2, 855, 858, 3, 2, 2, 2, 856, 854, 3, 2, 2, 2, 856, 857, 3, 2, 2, 2, 857, 177, 3, 2, 2, 2, 858, 856, 3, 2, 2, 2, 859, 863, 5, 180, 91, 2, 860, 863, 5, 182, 92, 2, 861, 863, 5, 184, 93, 2, 862, 859, 3, 2, 2, 2, 862, 860, 3, 2, 2, 2, 862, 861, 3, 2, 2, 2, 863, 179, 3, 2, 2, 2, 864, 865, 5, 186, 94, 2, 865, 181, 3, 2, 2, 2, 866, 867, 5, 186, 94, 2, 867, 876, 7, 71, 2, 2, 868, 873, 5, 178, 90, 2, 869, 870, 7, 41, 2, 2, 870, 872, 5, 178, 90, 2, 871, 869, 3, 2, 2, 2, 872, 875, 3, 2, 2, 2, 873, 871, 3, 2, 2, 2, 873, 874, 3, 2, 2, 2, 874, 877, 3, 2, 2, 2, 875, 873, 3, 2, 2, 2, 876, 868, 3, 2, 2, 2, 876, 877, 3, 2, 2, 2, 877, 878, 3, 2, 2, 2, 878, 879, 7, 73, 2, 2, 879, 183, 3, 2, 2, 2, 880, 881, 7, 34, 2, 2, 881, 882, 7, 45, 2, 2, 882, 883, 5, 186, 94, 2, 883, 884, 7, 46, 2, 2, 884, 185, 3, 2, 2, 2, 885, 886, 9, 16, 2, 2, 886, 187, 3, 2, 2, 2, 84, 189, 196, 203, 208, 216, 228, 240, 246, 253, 266, 273, 283, 295, 297, 305, 314, 320, 325, 337, 342, 349, 353, 362, 371, 381, 394, 399, 405, 409, 415, 421, 445, 453, 457, 465, 483, 488, 496, 512, 520, 528, 532, 537, 540, 545, 548, 558, 561, 564, 574, 577, 580, 596, 605, 610, 627, 631, 633, 641, 655, 661, 668, 679, 696, 706, 717, 729, 742, 753, 764, 775, 786, 797, 808, 819, 830, 840, 847, 856, 862, 873, 876]
\ No newline at end of file
diff --git a/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.tokens b/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.tokens
index 5aaa0a78a..ae7f9374f 100644
--- a/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.tokens
+++ b/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.tokens
@@ -2,161 +2,167 @@ FStringExpStart=1
BlockComment=2
LineComment=3
Pragma=4
-Const=5
-Var=6
-As=7
-Spread=8
-Switch=9
-Case=10
-Default=11
-Break=12
-Continue=13
-Do=14
-While=15
-If=16
-Else=17
-For=18
-Enum=19
-DefFunc=20
-Return=21
-CallFunc=22
-RetIndicator=23
-Class=24
-Interface=25
-Constructor=26
-True=27
-False=28
-Typeof=29
-Try=30
-Catch=31
-Finally=32
-Void=33
-Null=34
-Undefined=35
-Comma=36
-SemiColon=37
-QuestionMark=38
-Colon=39
-LeftParen=40
-RightParen=41
-LeftBracket=42
-RightBracket=43
-FStringExpEnd=44
-LeftBrace=45
-RightBrace=46
-Plus=47
-PlusPlus=48
-Minus=49
-MinusMinus=50
-Star=51
-Div=52
-Mod=53
-PowerTo=54
-AndAnd=55
-OrOr=56
-Not=57
-Assign=58
-PlusAssign=59
-MinusAssign=60
-StarAssign=61
-DivAssign=62
-ModAssign=63
-Equal=64
-NotEqual=65
-Less=66
-LessEqual=67
-Greater=68
-GreaterEqual=69
-BitwiseAnd=70
-BitwiseOr=71
-BitwiseXor=72
-BitwiseNot=73
-BitwiseZeroFillLeftShift=74
-BitwiseSignedRightShift=75
-BitwiseZeroFillRightShift=76
-Dot=77
-Identifier=78
-IntegerConstant=79
-SingleQuoteStringLiteral=80
-DoubleQuoteStringLiteral=81
-FloatingConstant=82
-Whitespace=83
-Newline=84
-FStringSingleQuoteStart=85
-FStringDoubleQuoteStart=86
-FStringSingleQuoteEnd=87
-FStringSingleQuoteAtom=88
-FStringDoubleQuoteEnd=89
-FStringDoubleQuoteAtom=90
-'const'=5
-'var'=6
-'as'=7
-'...'=8
-'switch'=9
-'case'=10
-'default'=11
-'break'=12
-'continue'=13
-'do'=14
-'while'=15
-'if'=16
-'else'=17
-'for'=18
-'enum'=19
-'def'=20
-'return'=21
-'call'=22
-'->'=23
-'class'=24
-'interface'=25
-'constructor'=26
-'true'=27
-'false'=28
-'typeof'=29
-'try'=30
-'catch'=31
-'finally'=32
-'void'=33
-'null'=34
-'undefined'=35
-','=36
-';'=37
-'?'=38
-':'=39
-'('=40
-')'=41
-'['=42
-']'=43
-'{'=45
-'}'=46
-'+'=47
-'++'=48
-'-'=49
-'--'=50
-'*'=51
-'/'=52
-'%'=53
-'**'=54
-'&&'=55
-'||'=56
-'!'=57
-'='=58
-'+='=59
-'-='=60
-'*='=61
-'/='=62
-'%='=63
-'=='=64
-'!='=65
-'<'=66
-'<='=67
-'>'=68
-'>='=69
-'&'=70
-'|'=71
-'^'=72
-'~'=73
-'<<'=74
-'>>'=75
-'>>>'=76
-'.'=77
+InstanceOf=5
+Const=6
+Var=7
+As=8
+Spread=9
+Switch=10
+Case=11
+Default=12
+Break=13
+Continue=14
+Do=15
+While=16
+If=17
+Else=18
+For=19
+Enum=20
+DefFunc=21
+Return=22
+CallFunc=23
+RetIndicator=24
+Class=25
+Interface=26
+Constructor=27
+New=28
+True=29
+False=30
+Matches=31
+Typeof=32
+Try=33
+Catch=34
+Finally=35
+Void=36
+Null=37
+Undefined=38
+Comma=39
+SemiColon=40
+QuestionMark=41
+Colon=42
+LeftParen=43
+RightParen=44
+LeftBracket=45
+RightBracket=46
+FStringExpEnd=47
+LeftBrace=48
+RightBrace=49
+Plus=50
+PlusPlus=51
+Minus=52
+MinusMinus=53
+Star=54
+Div=55
+Mod=56
+PowerTo=57
+AndAnd=58
+OrOr=59
+Not=60
+Assign=61
+PlusAssign=62
+MinusAssign=63
+StarAssign=64
+DivAssign=65
+ModAssign=66
+Equal=67
+NotEqual=68
+Less=69
+LessEqual=70
+Greater=71
+GreaterEqual=72
+BitwiseAnd=73
+BitwiseOr=74
+BitwiseXor=75
+BitwiseNot=76
+BitwiseZeroFillLeftShift=77
+BitwiseSignedRightShift=78
+BitwiseZeroFillRightShift=79
+Dot=80
+Identifier=81
+IntegerConstant=82
+SingleQuoteStringLiteral=83
+DoubleQuoteStringLiteral=84
+FloatingConstant=85
+Whitespace=86
+Newline=87
+FStringSingleQuoteStart=88
+FStringDoubleQuoteStart=89
+FStringSingleQuoteEnd=90
+FStringSingleQuoteAtom=91
+FStringDoubleQuoteEnd=92
+FStringDoubleQuoteAtom=93
+'instanceof'=5
+'const'=6
+'var'=7
+'as'=8
+'...'=9
+'switch'=10
+'case'=11
+'default'=12
+'break'=13
+'continue'=14
+'do'=15
+'while'=16
+'if'=17
+'else'=18
+'for'=19
+'enum'=20
+'def'=21
+'return'=22
+'call'=23
+'->'=24
+'class'=25
+'interface'=26
+'constructor'=27
+'new'=28
+'true'=29
+'false'=30
+'matches'=31
+'typeof'=32
+'try'=33
+'catch'=34
+'finally'=35
+'void'=36
+'null'=37
+'undefined'=38
+','=39
+';'=40
+'?'=41
+':'=42
+'('=43
+')'=44
+'['=45
+']'=46
+'{'=48
+'}'=49
+'+'=50
+'++'=51
+'-'=52
+'--'=53
+'*'=54
+'/'=55
+'%'=56
+'**'=57
+'&&'=58
+'||'=59
+'!'=60
+'='=61
+'+='=62
+'-='=63
+'*='=64
+'/='=65
+'%='=66
+'=='=67
+'!='=68
+'<'=69
+'<='=70
+'>'=71
+'>='=72
+'&'=73
+'|'=74
+'^'=75
+'~'=76
+'<<'=77
+'>>'=78
+'>>>'=79
+'.'=80
diff --git a/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts b/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts
index 0d53ffa7e..0ee640248 100644
--- a/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts
+++ b/kipper/core/src/compiler/lexer-parser/antlr/KipperParser.ts
@@ -2,20 +2,15 @@
// Import the required class for the ctx super class, as well as the 'ASTKind' type defining all possible syntax
// kind values.
-import { KipperParserRuleContext, ParseRuleKindMapping, ASTKind } from "..";
+import { ASTKind, KipperParserRuleContext, ParseRuleKindMapping } from "..";
import KipperParserBase from "./base/KipperParserBase";
import { ATN } from "antlr4ts/atn/ATN";
import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer";
import { FailedPredicateException } from "antlr4ts/FailedPredicateException";
-import { NotNull } from "antlr4ts/Decorators";
import { NoViableAltException } from "antlr4ts/NoViableAltException";
-import { Override } from "antlr4ts/Decorators";
-import { Parser } from "antlr4ts/Parser";
import { ParserRuleContext } from "antlr4ts/ParserRuleContext";
import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator";
-import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener";
-import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";
import { RecognitionException } from "antlr4ts/RecognitionException";
import { RuleContext } from "antlr4ts/RuleContext";
//import { RuleVersion } from "antlr4ts/RuleVersion";
@@ -35,92 +30,95 @@ export class KipperParser extends KipperParserBase {
public static readonly BlockComment = 2;
public static readonly LineComment = 3;
public static readonly Pragma = 4;
- public static readonly Const = 5;
- public static readonly Var = 6;
- public static readonly As = 7;
- public static readonly Spread = 8;
- public static readonly Switch = 9;
- public static readonly Case = 10;
- public static readonly Default = 11;
- public static readonly Break = 12;
- public static readonly Continue = 13;
- public static readonly Do = 14;
- public static readonly While = 15;
- public static readonly If = 16;
- public static readonly Else = 17;
- public static readonly For = 18;
- public static readonly Enum = 19;
- public static readonly DefFunc = 20;
- public static readonly Return = 21;
- public static readonly CallFunc = 22;
- public static readonly RetIndicator = 23;
- public static readonly Class = 24;
- public static readonly Interface = 25;
- public static readonly Constructor = 26;
- public static readonly True = 27;
- public static readonly False = 28;
- public static readonly Typeof = 29;
- public static readonly Try = 30;
- public static readonly Catch = 31;
- public static readonly Finally = 32;
- public static readonly Void = 33;
- public static readonly Null = 34;
- public static readonly Undefined = 35;
- public static readonly Comma = 36;
- public static readonly SemiColon = 37;
- public static readonly QuestionMark = 38;
- public static readonly Colon = 39;
- public static readonly LeftParen = 40;
- public static readonly RightParen = 41;
- public static readonly LeftBracket = 42;
- public static readonly RightBracket = 43;
- public static readonly FStringExpEnd = 44;
- public static readonly LeftBrace = 45;
- public static readonly RightBrace = 46;
- public static readonly Plus = 47;
- public static readonly PlusPlus = 48;
- public static readonly Minus = 49;
- public static readonly MinusMinus = 50;
- public static readonly Star = 51;
- public static readonly Div = 52;
- public static readonly Mod = 53;
- public static readonly PowerTo = 54;
- public static readonly AndAnd = 55;
- public static readonly OrOr = 56;
- public static readonly Not = 57;
- public static readonly Assign = 58;
- public static readonly PlusAssign = 59;
- public static readonly MinusAssign = 60;
- public static readonly StarAssign = 61;
- public static readonly DivAssign = 62;
- public static readonly ModAssign = 63;
- public static readonly Equal = 64;
- public static readonly NotEqual = 65;
- public static readonly Less = 66;
- public static readonly LessEqual = 67;
- public static readonly Greater = 68;
- public static readonly GreaterEqual = 69;
- public static readonly BitwiseAnd = 70;
- public static readonly BitwiseOr = 71;
- public static readonly BitwiseXor = 72;
- public static readonly BitwiseNot = 73;
- public static readonly BitwiseZeroFillLeftShift = 74;
- public static readonly BitwiseSignedRightShift = 75;
- public static readonly BitwiseZeroFillRightShift = 76;
- public static readonly Dot = 77;
- public static readonly Identifier = 78;
- public static readonly IntegerConstant = 79;
- public static readonly SingleQuoteStringLiteral = 80;
- public static readonly DoubleQuoteStringLiteral = 81;
- public static readonly FloatingConstant = 82;
- public static readonly Whitespace = 83;
- public static readonly Newline = 84;
- public static readonly FStringSingleQuoteStart = 85;
- public static readonly FStringDoubleQuoteStart = 86;
- public static readonly FStringSingleQuoteEnd = 87;
- public static readonly FStringSingleQuoteAtom = 88;
- public static readonly FStringDoubleQuoteEnd = 89;
- public static readonly FStringDoubleQuoteAtom = 90;
+ public static readonly InstanceOf = 5;
+ public static readonly Const = 6;
+ public static readonly Var = 7;
+ public static readonly As = 8;
+ public static readonly Spread = 9;
+ public static readonly Switch = 10;
+ public static readonly Case = 11;
+ public static readonly Default = 12;
+ public static readonly Break = 13;
+ public static readonly Continue = 14;
+ public static readonly Do = 15;
+ public static readonly While = 16;
+ public static readonly If = 17;
+ public static readonly Else = 18;
+ public static readonly For = 19;
+ public static readonly Enum = 20;
+ public static readonly DefFunc = 21;
+ public static readonly Return = 22;
+ public static readonly CallFunc = 23;
+ public static readonly RetIndicator = 24;
+ public static readonly Class = 25;
+ public static readonly Interface = 26;
+ public static readonly Constructor = 27;
+ public static readonly New = 28;
+ public static readonly True = 29;
+ public static readonly False = 30;
+ public static readonly Matches = 31;
+ public static readonly Typeof = 32;
+ public static readonly Try = 33;
+ public static readonly Catch = 34;
+ public static readonly Finally = 35;
+ public static readonly Void = 36;
+ public static readonly Null = 37;
+ public static readonly Undefined = 38;
+ public static readonly Comma = 39;
+ public static readonly SemiColon = 40;
+ public static readonly QuestionMark = 41;
+ public static readonly Colon = 42;
+ public static readonly LeftParen = 43;
+ public static readonly RightParen = 44;
+ public static readonly LeftBracket = 45;
+ public static readonly RightBracket = 46;
+ public static readonly FStringExpEnd = 47;
+ public static readonly LeftBrace = 48;
+ public static readonly RightBrace = 49;
+ public static readonly Plus = 50;
+ public static readonly PlusPlus = 51;
+ public static readonly Minus = 52;
+ public static readonly MinusMinus = 53;
+ public static readonly Star = 54;
+ public static readonly Div = 55;
+ public static readonly Mod = 56;
+ public static readonly PowerTo = 57;
+ public static readonly AndAnd = 58;
+ public static readonly OrOr = 59;
+ public static readonly Not = 60;
+ public static readonly Assign = 61;
+ public static readonly PlusAssign = 62;
+ public static readonly MinusAssign = 63;
+ public static readonly StarAssign = 64;
+ public static readonly DivAssign = 65;
+ public static readonly ModAssign = 66;
+ public static readonly Equal = 67;
+ public static readonly NotEqual = 68;
+ public static readonly Less = 69;
+ public static readonly LessEqual = 70;
+ public static readonly Greater = 71;
+ public static readonly GreaterEqual = 72;
+ public static readonly BitwiseAnd = 73;
+ public static readonly BitwiseOr = 74;
+ public static readonly BitwiseXor = 75;
+ public static readonly BitwiseNot = 76;
+ public static readonly BitwiseZeroFillLeftShift = 77;
+ public static readonly BitwiseSignedRightShift = 78;
+ public static readonly BitwiseZeroFillRightShift = 79;
+ public static readonly Dot = 80;
+ public static readonly Identifier = 81;
+ public static readonly IntegerConstant = 82;
+ public static readonly SingleQuoteStringLiteral = 83;
+ public static readonly DoubleQuoteStringLiteral = 84;
+ public static readonly FloatingConstant = 85;
+ public static readonly Whitespace = 86;
+ public static readonly Newline = 87;
+ public static readonly FStringSingleQuoteStart = 88;
+ public static readonly FStringDoubleQuoteStart = 89;
+ public static readonly FStringSingleQuoteEnd = 90;
+ public static readonly FStringSingleQuoteAtom = 91;
+ public static readonly FStringDoubleQuoteEnd = 92;
+ public static readonly FStringDoubleQuoteAtom = 93;
public static readonly RULE_compilationUnit = 0;
public static readonly RULE_translationUnit = 1;
public static readonly RULE_externalItem = 2;
@@ -196,22 +194,24 @@ export class KipperParser extends KipperParserBase {
public static readonly RULE_additiveExpression = 72;
public static readonly RULE_bitwiseShiftExpression = 73;
public static readonly RULE_bitwiseShiftOperators = 74;
- public static readonly RULE_relationalExpression = 75;
- public static readonly RULE_equalityExpression = 76;
- public static readonly RULE_bitwiseAndExpression = 77;
- public static readonly RULE_bitwiseXorExpression = 78;
- public static readonly RULE_bitwiseOrExpression = 79;
- public static readonly RULE_logicalAndExpression = 80;
- public static readonly RULE_logicalOrExpression = 81;
- public static readonly RULE_conditionalExpression = 82;
- public static readonly RULE_assignmentExpression = 83;
- public static readonly RULE_assignmentOperator = 84;
- public static readonly RULE_expression = 85;
- public static readonly RULE_typeSpecifierExpression = 86;
- public static readonly RULE_identifierTypeSpecifierExpression = 87;
- public static readonly RULE_genericTypeSpecifierExpression = 88;
- public static readonly RULE_typeofTypeSpecifierExpression = 89;
- public static readonly RULE_typeSpecifierIdentifier = 90;
+ public static readonly RULE_instanceOfExpression = 75;
+ public static readonly RULE_matchesExpression = 76;
+ public static readonly RULE_relationalExpression = 77;
+ public static readonly RULE_equalityExpression = 78;
+ public static readonly RULE_bitwiseAndExpression = 79;
+ public static readonly RULE_bitwiseXorExpression = 80;
+ public static readonly RULE_bitwiseOrExpression = 81;
+ public static readonly RULE_logicalAndExpression = 82;
+ public static readonly RULE_logicalOrExpression = 83;
+ public static readonly RULE_conditionalExpression = 84;
+ public static readonly RULE_assignmentExpression = 85;
+ public static readonly RULE_assignmentOperator = 86;
+ public static readonly RULE_expression = 87;
+ public static readonly RULE_typeSpecifierExpression = 88;
+ public static readonly RULE_identifierTypeSpecifierExpression = 89;
+ public static readonly RULE_genericTypeSpecifierExpression = 90;
+ public static readonly RULE_typeofTypeSpecifierExpression = 91;
+ public static readonly RULE_typeSpecifierIdentifier = 92;
// tslint:disable:no-trailing-whitespace
public static readonly ruleNames: string[] = [
"compilationUnit",
@@ -289,6 +289,8 @@ export class KipperParser extends KipperParserBase {
"additiveExpression",
"bitwiseShiftExpression",
"bitwiseShiftOperators",
+ "instanceOfExpression",
+ "matchesExpression",
"relationalExpression",
"equalityExpression",
"bitwiseAndExpression",
@@ -313,6 +315,7 @@ export class KipperParser extends KipperParserBase {
undefined,
undefined,
undefined,
+ "'instanceof'",
"'const'",
"'var'",
"'as'",
@@ -335,8 +338,10 @@ export class KipperParser extends KipperParserBase {
"'class'",
"'interface'",
"'constructor'",
+ "'new'",
"'true'",
"'false'",
+ "'matches'",
"'typeof'",
"'try'",
"'catch'",
@@ -393,6 +398,7 @@ export class KipperParser extends KipperParserBase {
"BlockComment",
"LineComment",
"Pragma",
+ "InstanceOf",
"Const",
"Var",
"As",
@@ -415,8 +421,10 @@ export class KipperParser extends KipperParserBase {
"Class",
"Interface",
"Constructor",
+ "New",
"True",
"False",
+ "Matches",
"Typeof",
"Try",
"Catch",
@@ -523,17 +531,17 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 183;
+ this.state = 187;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 0, this._ctx)) {
case 1:
{
- this.state = 182;
+ this.state = 186;
this.translationUnit();
}
break;
}
- this.state = 185;
+ this.state = 189;
this.match(KipperParser.EOF);
}
} catch (re) {
@@ -557,7 +565,7 @@ export class KipperParser extends KipperParserBase {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
- this.state = 188;
+ this.state = 192;
this._errHandler.sync(this);
_alt = 1;
do {
@@ -565,7 +573,7 @@ export class KipperParser extends KipperParserBase {
case 1:
{
{
- this.state = 187;
+ this.state = 191;
this.externalItem();
}
}
@@ -573,7 +581,7 @@ export class KipperParser extends KipperParserBase {
default:
throw new NoViableAltException(this);
}
- this.state = 190;
+ this.state = 194;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 1, this._ctx);
} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);
@@ -599,7 +607,7 @@ export class KipperParser extends KipperParserBase {
_localctx = new ExternalBlockItemContext(_localctx);
this.enterOuterAlt(_localctx, 1);
{
- this.state = 192;
+ this.state = 196;
this.blockItemList();
}
} catch (re) {
@@ -623,7 +631,7 @@ export class KipperParser extends KipperParserBase {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
- this.state = 195;
+ this.state = 199;
this._errHandler.sync(this);
_alt = 1;
do {
@@ -631,7 +639,7 @@ export class KipperParser extends KipperParserBase {
case 1:
{
{
- this.state = 194;
+ this.state = 198;
this.blockItem();
}
}
@@ -639,7 +647,7 @@ export class KipperParser extends KipperParserBase {
default:
throw new NoViableAltException(this);
}
- this.state = 197;
+ this.state = 201;
this._errHandler.sync(this);
_alt = this.interpreter.adaptivePredict(this._input, 2, this._ctx);
} while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER);
@@ -664,26 +672,26 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 202;
+ this.state = 206;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 3, this._ctx)) {
case 1:
{
- this.state = 199;
+ this.state = 203;
this.statement();
}
break;
case 2:
{
- this.state = 200;
+ this.state = 204;
this.declaration();
}
break;
case 3:
{
- this.state = 201;
+ this.state = 205;
this.match(KipperParser.SemiColon);
}
break;
@@ -707,37 +715,37 @@ export class KipperParser extends KipperParserBase {
let _localctx: DeclarationContext = new DeclarationContext(this._ctx, this.state);
this.enterRule(_localctx, 10, KipperParser.RULE_declaration);
try {
- this.state = 210;
+ this.state = 214;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.Const:
case KipperParser.Var:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 204;
+ this.state = 208;
this.variableDeclaration();
- this.state = 205;
+ this.state = 209;
this.match(KipperParser.SemiColon);
}
break;
case KipperParser.DefFunc:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 207;
+ this.state = 211;
this.functionDeclaration();
}
break;
case KipperParser.Interface:
this.enterOuterAlt(_localctx, 3);
{
- this.state = 208;
+ this.state = 212;
this.interfaceDeclaration();
}
break;
case KipperParser.Class:
this.enterOuterAlt(_localctx, 4);
{
- this.state = 209;
+ this.state = 213;
this.classDeclaration();
}
break;
@@ -764,9 +772,9 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 212;
+ this.state = 216;
this.storageTypeSpecifier();
- this.state = 213;
+ this.state = 217;
this.initDeclarator();
}
} catch (re) {
@@ -790,7 +798,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 215;
+ this.state = 219;
_la = this._input.LA(1);
if (!(_la === KipperParser.Const || _la === KipperParser.Var)) {
this._errHandler.recoverInline(this);
@@ -824,20 +832,20 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 217;
+ this.state = 221;
this.declarator();
- this.state = 218;
+ this.state = 222;
this.match(KipperParser.Colon);
- this.state = 219;
+ this.state = 223;
this.typeSpecifierExpression();
- this.state = 222;
+ this.state = 226;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === KipperParser.Assign) {
{
- this.state = 220;
+ this.state = 224;
this.match(KipperParser.Assign);
- this.state = 221;
+ this.state = 225;
this.initializer();
}
}
@@ -862,7 +870,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 224;
+ this.state = 228;
this.assignmentExpression();
}
} catch (re) {
@@ -885,7 +893,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 226;
+ this.state = 230;
this.directDeclarator();
}
} catch (re) {
@@ -908,7 +916,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 228;
+ this.state = 232;
this.match(KipperParser.Identifier);
}
} catch (re) {
@@ -932,34 +940,34 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 230;
+ this.state = 234;
this.match(KipperParser.DefFunc);
- this.state = 231;
+ this.state = 235;
this.declarator();
- this.state = 232;
+ this.state = 236;
this.match(KipperParser.LeftParen);
- this.state = 234;
+ this.state = 238;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === KipperParser.Identifier) {
{
- this.state = 233;
+ this.state = 237;
this.parameterList();
}
}
- this.state = 236;
+ this.state = 240;
this.match(KipperParser.RightParen);
- this.state = 237;
+ this.state = 241;
this.match(KipperParser.RetIndicator);
- this.state = 238;
+ this.state = 242;
this.typeSpecifierExpression();
- this.state = 240;
+ this.state = 244;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 7, this._ctx)) {
case 1:
{
- this.state = 239;
+ this.state = 243;
this.compoundStatement();
}
break;
@@ -986,21 +994,21 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 242;
+ this.state = 246;
this.parameterDeclaration();
- this.state = 247;
+ this.state = 251;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === KipperParser.Comma) {
{
{
- this.state = 243;
+ this.state = 247;
this.match(KipperParser.Comma);
- this.state = 244;
+ this.state = 248;
this.parameterDeclaration();
}
}
- this.state = 249;
+ this.state = 253;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
@@ -1025,11 +1033,11 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 250;
+ this.state = 254;
this.declarator();
- this.state = 251;
+ this.state = 255;
this.match(KipperParser.Colon);
- this.state = 252;
+ this.state = 256;
this.typeSpecifierExpression();
}
} catch (re) {
@@ -1053,27 +1061,27 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 254;
+ this.state = 258;
this.match(KipperParser.Interface);
- this.state = 255;
+ this.state = 259;
this.declarator();
- this.state = 256;
- this.match(KipperParser.LeftBrace);
this.state = 260;
+ this.match(KipperParser.LeftBrace);
+ this.state = 264;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === KipperParser.Identifier) {
{
{
- this.state = 257;
+ this.state = 261;
this.interfaceMemberDeclaration();
}
}
- this.state = 262;
+ this.state = 266;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
- this.state = 263;
+ this.state = 267;
this.match(KipperParser.RightBrace);
}
} catch (re) {
@@ -1094,13 +1102,13 @@ export class KipperParser extends KipperParserBase {
let _localctx: InterfaceMemberDeclarationContext = new InterfaceMemberDeclarationContext(this._ctx, this.state);
this.enterRule(_localctx, 32, KipperParser.RULE_interfaceMemberDeclaration);
try {
- this.state = 267;
+ this.state = 271;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 10, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 265;
+ this.state = 269;
this.interfacePropertyDeclaration();
}
break;
@@ -1108,7 +1116,7 @@ export class KipperParser extends KipperParserBase {
case 2:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 266;
+ this.state = 270;
this.interfaceMethodDeclaration();
}
break;
@@ -1133,13 +1141,13 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 269;
+ this.state = 273;
this.declarator();
- this.state = 270;
+ this.state = 274;
this.match(KipperParser.Colon);
- this.state = 271;
+ this.state = 275;
this.typeSpecifierExpression();
- this.state = 272;
+ this.state = 276;
this.match(KipperParser.SemiColon);
}
} catch (re) {
@@ -1163,27 +1171,27 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 274;
+ this.state = 278;
this.declarator();
- this.state = 275;
+ this.state = 279;
this.match(KipperParser.LeftParen);
- this.state = 277;
+ this.state = 281;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === KipperParser.Identifier) {
{
- this.state = 276;
+ this.state = 280;
this.parameterList();
}
}
- this.state = 279;
+ this.state = 283;
this.match(KipperParser.RightParen);
- this.state = 280;
+ this.state = 284;
this.match(KipperParser.Colon);
- this.state = 281;
+ this.state = 285;
this.typeSpecifierExpression();
- this.state = 282;
+ this.state = 286;
this.match(KipperParser.SemiColon);
}
} catch (re) {
@@ -1207,30 +1215,30 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 284;
+ this.state = 288;
this.match(KipperParser.Class);
- this.state = 285;
+ this.state = 289;
this.declarator();
- this.state = 286;
+ this.state = 290;
this.match(KipperParser.LeftBrace);
- this.state = 291;
+ this.state = 295;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === KipperParser.Constructor || _la === KipperParser.SemiColon || _la === KipperParser.Identifier) {
{
- this.state = 289;
+ this.state = 293;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.Constructor:
case KipperParser.Identifier:
{
- this.state = 287;
+ this.state = 291;
this.classMemberDeclaration();
}
break;
case KipperParser.SemiColon:
{
- this.state = 288;
+ this.state = 292;
this.match(KipperParser.SemiColon);
}
break;
@@ -1238,11 +1246,11 @@ export class KipperParser extends KipperParserBase {
throw new NoViableAltException(this);
}
}
- this.state = 293;
+ this.state = 297;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
- this.state = 294;
+ this.state = 298;
this.match(KipperParser.RightBrace);
}
} catch (re) {
@@ -1263,13 +1271,13 @@ export class KipperParser extends KipperParserBase {
let _localctx: ClassMemberDeclarationContext = new ClassMemberDeclarationContext(this._ctx, this.state);
this.enterRule(_localctx, 40, KipperParser.RULE_classMemberDeclaration);
try {
- this.state = 299;
+ this.state = 303;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 14, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 296;
+ this.state = 300;
this.classPropertyDeclaration();
}
break;
@@ -1277,7 +1285,7 @@ export class KipperParser extends KipperParserBase {
case 2:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 297;
+ this.state = 301;
this.classMethodDeclaration();
}
break;
@@ -1285,7 +1293,7 @@ export class KipperParser extends KipperParserBase {
case 3:
this.enterOuterAlt(_localctx, 3);
{
- this.state = 298;
+ this.state = 302;
this.classConstructorDeclaration();
}
break;
@@ -1310,11 +1318,11 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 301;
+ this.state = 305;
this.declarator();
- this.state = 302;
+ this.state = 306;
this.match(KipperParser.Colon);
- this.state = 303;
+ this.state = 307;
this.typeSpecifierExpression();
}
} catch (re) {
@@ -1338,32 +1346,32 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 305;
+ this.state = 309;
this.declarator();
- this.state = 306;
+ this.state = 310;
this.match(KipperParser.LeftParen);
- this.state = 308;
+ this.state = 312;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === KipperParser.Identifier) {
{
- this.state = 307;
+ this.state = 311;
this.parameterList();
}
}
- this.state = 310;
+ this.state = 314;
this.match(KipperParser.RightParen);
- this.state = 311;
+ this.state = 315;
this.match(KipperParser.Colon);
- this.state = 312;
+ this.state = 316;
this.typeSpecifierExpression();
- this.state = 314;
+ this.state = 318;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 16, this._ctx)) {
case 1:
{
- this.state = 313;
+ this.state = 317;
this.compoundStatement();
}
break;
@@ -1390,23 +1398,23 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 316;
+ this.state = 320;
this.match(KipperParser.Constructor);
- this.state = 317;
+ this.state = 321;
this.match(KipperParser.LeftParen);
- this.state = 319;
+ this.state = 323;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === KipperParser.Identifier) {
{
- this.state = 318;
+ this.state = 322;
this.parameterList();
}
}
- this.state = 321;
+ this.state = 325;
this.match(KipperParser.RightParen);
- this.state = 322;
+ this.state = 326;
this.compoundStatement();
}
} catch (re) {
@@ -1427,13 +1435,13 @@ export class KipperParser extends KipperParserBase {
let _localctx: StatementContext = new StatementContext(this._ctx, this.state);
this.enterRule(_localctx, 48, KipperParser.RULE_statement);
try {
- this.state = 331;
+ this.state = 335;
this._errHandler.sync(this);
switch (this.interpreter.adaptivePredict(this._input, 18, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 324;
+ this.state = 328;
this.expressionStatement();
}
break;
@@ -1441,7 +1449,7 @@ export class KipperParser extends KipperParserBase {
case 2:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 325;
+ this.state = 329;
this.selectionStatement();
}
break;
@@ -1449,7 +1457,7 @@ export class KipperParser extends KipperParserBase {
case 3:
this.enterOuterAlt(_localctx, 3);
{
- this.state = 326;
+ this.state = 330;
this.iterationStatement();
}
break;
@@ -1457,7 +1465,7 @@ export class KipperParser extends KipperParserBase {
case 4:
this.enterOuterAlt(_localctx, 4);
{
- this.state = 327;
+ this.state = 331;
this.jumpStatement();
}
break;
@@ -1465,7 +1473,7 @@ export class KipperParser extends KipperParserBase {
case 5:
this.enterOuterAlt(_localctx, 5);
{
- this.state = 328;
+ this.state = 332;
this.returnStatement();
}
break;
@@ -1473,7 +1481,7 @@ export class KipperParser extends KipperParserBase {
case 6:
this.enterOuterAlt(_localctx, 6);
{
- this.state = 329;
+ this.state = 333;
this.compoundStatement();
}
break;
@@ -1481,7 +1489,7 @@ export class KipperParser extends KipperParserBase {
case 7:
this.enterOuterAlt(_localctx, 7);
{
- this.state = 330;
+ this.state = 334;
this.tryCatchStatement();
}
break;
@@ -1504,26 +1512,58 @@ export class KipperParser extends KipperParserBase {
let _localctx: CompoundStatementContext = new CompoundStatementContext(this._ctx, this.state);
this.enterRule(_localctx, 50, KipperParser.RULE_compoundStatement);
try {
- this.enterOuterAlt(_localctx, 1);
- {
- this.state = 333;
- if (!this.notInsideExpressionStatement()) {
- throw this.createFailedPredicateException("this.notInsideExpressionStatement()");
- }
- this.state = 334;
- this.match(KipperParser.LeftBrace);
- this.state = 336;
- this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 19, this._ctx)) {
- case 1:
- {
- this.state = 335;
- this.blockItemList();
+ this.state = 351;
+ this._errHandler.sync(this);
+ switch (this.interpreter.adaptivePredict(this._input, 21, this._ctx)) {
+ case 1:
+ this.enterOuterAlt(_localctx, 1);
+ {
+ this.state = 337;
+ if (!this.notInsideExpressionStatement()) {
+ throw this.createFailedPredicateException("this.notInsideExpressionStatement()");
}
- break;
- }
- this.state = 338;
- this.match(KipperParser.RightBrace);
+ this.state = 338;
+ this.match(KipperParser.LeftBrace);
+ this.state = 340;
+ this._errHandler.sync(this);
+ switch (this.interpreter.adaptivePredict(this._input, 19, this._ctx)) {
+ case 1:
+ {
+ this.state = 339;
+ this.blockItemList();
+ }
+ break;
+ }
+ this.state = 342;
+ this.match(KipperParser.RightBrace);
+ }
+ break;
+
+ case 2:
+ this.enterOuterAlt(_localctx, 2);
+ {
+ this.state = 343;
+ if (!this.insideLambda()) {
+ throw this.createFailedPredicateException("this.insideLambda()");
+ }
+ this.state = 344;
+ this.match(KipperParser.LeftBrace);
+ this.exitLambda();
+ this.state = 347;
+ this._errHandler.sync(this);
+ switch (this.interpreter.adaptivePredict(this._input, 20, this._ctx)) {
+ case 1:
+ {
+ this.state = 346;
+ this.blockItemList();
+ }
+ break;
+ }
+ this.enterLambda();
+ this.state = 350;
+ this.match(KipperParser.RightBrace);
+ }
+ break;
}
} catch (re) {
if (re instanceof RecognitionException) {
@@ -1546,9 +1586,9 @@ export class KipperParser extends KipperParserBase {
this.enterOuterAlt(_localctx, 1);
{
this.enterExpressionStatement();
- this.state = 341;
+ this.state = 354;
this.expression();
- this.state = 342;
+ this.state = 355;
this.match(KipperParser.SemiColon);
this.exitExpressionStatement();
}
@@ -1570,20 +1610,20 @@ export class KipperParser extends KipperParserBase {
let _localctx: SelectionStatementContext = new SelectionStatementContext(this._ctx, this.state);
this.enterRule(_localctx, 54, KipperParser.RULE_selectionStatement);
try {
- this.state = 347;
+ this.state = 360;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.If:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 345;
+ this.state = 358;
this.ifStatement();
}
break;
case KipperParser.Switch:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 346;
+ this.state = 359;
this.switchStatement();
}
break;
@@ -1610,24 +1650,24 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 349;
+ this.state = 362;
this.match(KipperParser.If);
- this.state = 350;
+ this.state = 363;
this.match(KipperParser.LeftParen);
- this.state = 351;
+ this.state = 364;
this.expression();
- this.state = 352;
+ this.state = 365;
this.match(KipperParser.RightParen);
- this.state = 353;
+ this.state = 366;
this.statement();
- this.state = 356;
+ this.state = 369;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 21, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 23, this._ctx)) {
case 1:
{
- this.state = 354;
+ this.state = 367;
this.match(KipperParser.Else);
- this.state = 355;
+ this.state = 368;
this.statement();
}
break;
@@ -1654,31 +1694,31 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 358;
+ this.state = 371;
this.match(KipperParser.Switch);
- this.state = 359;
+ this.state = 372;
this.match(KipperParser.LeftParen);
- this.state = 360;
+ this.state = 373;
this.expression();
- this.state = 361;
+ this.state = 374;
this.match(KipperParser.RightParen);
- this.state = 362;
+ this.state = 375;
this.match(KipperParser.LeftBrace);
- this.state = 366;
+ this.state = 379;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === KipperParser.Case || _la === KipperParser.Default) {
{
{
- this.state = 363;
+ this.state = 376;
this.switchLabeledStatement();
}
}
- this.state = 368;
+ this.state = 381;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
- this.state = 369;
+ this.state = 382;
this.match(KipperParser.RightBrace);
}
} catch (re) {
@@ -1699,30 +1739,30 @@ export class KipperParser extends KipperParserBase {
let _localctx: SwitchLabeledStatementContext = new SwitchLabeledStatementContext(this._ctx, this.state);
this.enterRule(_localctx, 60, KipperParser.RULE_switchLabeledStatement);
try {
- this.state = 379;
+ this.state = 392;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.Case:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 371;
+ this.state = 384;
this.match(KipperParser.Case);
- this.state = 372;
+ this.state = 385;
this.expression();
- this.state = 373;
+ this.state = 386;
this.match(KipperParser.Colon);
- this.state = 374;
+ this.state = 387;
this.statement();
}
break;
case KipperParser.Default:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 376;
+ this.state = 389;
this.match(KipperParser.Default);
- this.state = 377;
+ this.state = 390;
this.match(KipperParser.Colon);
- this.state = 378;
+ this.state = 391;
this.statement();
}
break;
@@ -1747,27 +1787,27 @@ export class KipperParser extends KipperParserBase {
let _localctx: IterationStatementContext = new IterationStatementContext(this._ctx, this.state);
this.enterRule(_localctx, 62, KipperParser.RULE_iterationStatement);
try {
- this.state = 384;
+ this.state = 397;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.For:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 381;
+ this.state = 394;
this.forLoopIterationStatement();
}
break;
case KipperParser.While:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 382;
+ this.state = 395;
this.whileLoopIterationStatement();
}
break;
case KipperParser.Do:
this.enterOuterAlt(_localctx, 3);
{
- this.state = 383;
+ this.state = 396;
this.doWhileLoopIterationStatement();
}
break;
@@ -1795,11 +1835,11 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 386;
+ this.state = 399;
this.match(KipperParser.For);
- this.state = 387;
+ this.state = 400;
this.match(KipperParser.LeftParen);
- this.state = 394;
+ this.state = 407;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
@@ -1808,48 +1848,50 @@ export class KipperParser extends KipperParserBase {
((1 << KipperParser.Const) |
(1 << KipperParser.Var) |
(1 << KipperParser.CallFunc) |
+ (1 << KipperParser.New) |
(1 << KipperParser.True) |
- (1 << KipperParser.False) |
- (1 << KipperParser.Typeof))) !==
+ (1 << KipperParser.False))) !==
0) ||
- (((_la - 33) & ~0x1f) === 0 &&
- ((1 << (_la - 33)) &
- ((1 << (KipperParser.Void - 33)) |
- (1 << (KipperParser.Null - 33)) |
- (1 << (KipperParser.Undefined - 33)) |
- (1 << (KipperParser.LeftParen - 33)) |
- (1 << (KipperParser.LeftBracket - 33)) |
- (1 << (KipperParser.LeftBrace - 33)) |
- (1 << (KipperParser.Plus - 33)) |
- (1 << (KipperParser.PlusPlus - 33)) |
- (1 << (KipperParser.Minus - 33)) |
- (1 << (KipperParser.MinusMinus - 33)) |
- (1 << (KipperParser.Not - 33)))) !==
+ (((_la - 32) & ~0x1f) === 0 &&
+ ((1 << (_la - 32)) &
+ ((1 << (KipperParser.Typeof - 32)) |
+ (1 << (KipperParser.Void - 32)) |
+ (1 << (KipperParser.Null - 32)) |
+ (1 << (KipperParser.Undefined - 32)) |
+ (1 << (KipperParser.LeftParen - 32)) |
+ (1 << (KipperParser.LeftBracket - 32)) |
+ (1 << (KipperParser.LeftBrace - 32)) |
+ (1 << (KipperParser.Plus - 32)) |
+ (1 << (KipperParser.PlusPlus - 32)) |
+ (1 << (KipperParser.Minus - 32)) |
+ (1 << (KipperParser.MinusMinus - 32)) |
+ (1 << (KipperParser.Not - 32)))) !==
0) ||
- (((_la - 73) & ~0x1f) === 0 &&
- ((1 << (_la - 73)) &
- ((1 << (KipperParser.BitwiseNot - 73)) |
- (1 << (KipperParser.Identifier - 73)) |
- (1 << (KipperParser.IntegerConstant - 73)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 73)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 73)) |
- (1 << (KipperParser.FloatingConstant - 73)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 73)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 73)))) !==
+ (((_la - 76) & ~0x1f) === 0 &&
+ ((1 << (_la - 76)) &
+ ((1 << (KipperParser.BitwiseNot - 76)) |
+ (1 << (KipperParser.Identifier - 76)) |
+ (1 << (KipperParser.IntegerConstant - 76)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 76)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 76)) |
+ (1 << (KipperParser.FloatingConstant - 76)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 76)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 76)))) !==
0)
) {
{
- this.state = 390;
+ this.state = 403;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.Const:
case KipperParser.Var:
{
- this.state = 388;
+ this.state = 401;
this.variableDeclaration();
}
break;
case KipperParser.CallFunc:
+ case KipperParser.New:
case KipperParser.True:
case KipperParser.False:
case KipperParser.Typeof:
@@ -1873,7 +1915,7 @@ export class KipperParser extends KipperParserBase {
case KipperParser.FStringSingleQuoteStart:
case KipperParser.FStringDoubleQuoteStart:
{
- this.state = 389;
+ this.state = 402;
this.expression();
}
break;
@@ -1884,95 +1926,97 @@ export class KipperParser extends KipperParserBase {
}
}
- this.state = 396;
+ this.state = 409;
this.match(KipperParser.SemiColon);
- this.state = 400;
+ this.state = 413;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
0)
) {
{
- this.state = 397;
+ this.state = 410;
this.expression();
_localctx._forCondition = true;
}
}
- this.state = 402;
+ this.state = 415;
this.match(KipperParser.SemiColon);
- this.state = 406;
+ this.state = 419;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
0)
) {
{
- this.state = 403;
+ this.state = 416;
this.expression();
_localctx._forIterationExp = true;
}
}
- this.state = 408;
+ this.state = 421;
this.match(KipperParser.RightParen);
- this.state = 409;
+ this.state = 422;
this.statement();
}
} catch (re) {
@@ -1995,15 +2039,15 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 411;
+ this.state = 424;
this.match(KipperParser.While);
- this.state = 412;
+ this.state = 425;
this.match(KipperParser.LeftParen);
- this.state = 413;
+ this.state = 426;
this.expression();
- this.state = 414;
+ this.state = 427;
this.match(KipperParser.RightParen);
- this.state = 415;
+ this.state = 428;
this.statement();
}
} catch (re) {
@@ -2029,19 +2073,19 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 417;
+ this.state = 430;
this.match(KipperParser.Do);
- this.state = 418;
+ this.state = 431;
this.statement();
- this.state = 419;
+ this.state = 432;
this.match(KipperParser.While);
- this.state = 420;
+ this.state = 433;
this.match(KipperParser.LeftParen);
- this.state = 421;
+ this.state = 434;
this.expression();
- this.state = 422;
+ this.state = 435;
this.match(KipperParser.RightParen);
- this.state = 423;
+ this.state = 436;
this.match(KipperParser.SemiColon);
}
} catch (re) {
@@ -2065,7 +2109,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 425;
+ this.state = 438;
_la = this._input.LA(1);
if (!(_la === KipperParser.Break || _la === KipperParser.Continue)) {
this._errHandler.recoverInline(this);
@@ -2077,7 +2121,7 @@ export class KipperParser extends KipperParserBase {
this._errHandler.reportMatch(this);
this.consume();
}
- this.state = 426;
+ this.state = 439;
this.match(KipperParser.SemiColon);
}
} catch (re) {
@@ -2101,49 +2145,50 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 428;
+ this.state = 441;
this.match(KipperParser.Return);
- this.state = 430;
+ this.state = 443;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
0)
) {
{
- this.state = 429;
+ this.state = 442;
this.expression();
}
}
- this.state = 432;
+ this.state = 445;
this.match(KipperParser.SemiColon);
}
} catch (re) {
@@ -2167,30 +2212,30 @@ export class KipperParser extends KipperParserBase {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
- this.state = 434;
+ this.state = 447;
this.tryClause();
- this.state = 438;
+ this.state = 451;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 30, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 32, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
- this.state = 435;
+ this.state = 448;
this.catchClause();
}
}
}
- this.state = 440;
+ this.state = 453;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 30, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 32, this._ctx);
}
- this.state = 442;
+ this.state = 455;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 31, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 33, this._ctx)) {
case 1:
{
- this.state = 441;
+ this.state = 454;
this.finallyClause();
}
break;
@@ -2216,9 +2261,9 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 444;
+ this.state = 457;
this.match(KipperParser.Try);
- this.state = 445;
+ this.state = 458;
this.compoundStatement();
}
} catch (re) {
@@ -2242,23 +2287,23 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 447;
+ this.state = 460;
this.match(KipperParser.Catch);
- this.state = 448;
+ this.state = 461;
this.match(KipperParser.LeftParen);
- this.state = 450;
+ this.state = 463;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === KipperParser.Identifier) {
{
- this.state = 449;
+ this.state = 462;
this.parameterDeclaration();
}
}
- this.state = 452;
+ this.state = 465;
this.match(KipperParser.RightParen);
- this.state = 453;
+ this.state = 466;
this.compoundStatement();
}
} catch (re) {
@@ -2281,9 +2326,9 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 455;
+ this.state = 468;
this.match(KipperParser.Finally);
- this.state = 456;
+ this.state = 469;
this.compoundStatement();
}
} catch (re) {
@@ -2304,13 +2349,13 @@ export class KipperParser extends KipperParserBase {
let _localctx: PrimaryExpressionContext = new PrimaryExpressionContext(this._ctx, this.state);
this.enterRule(_localctx, 82, KipperParser.RULE_primaryExpression);
try {
- this.state = 468;
+ this.state = 481;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 33, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 35, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 458;
+ this.state = 471;
this.tangledPrimaryExpression();
}
break;
@@ -2318,7 +2363,7 @@ export class KipperParser extends KipperParserBase {
case 2:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 459;
+ this.state = 472;
this.lambdaPrimaryExpression();
}
break;
@@ -2326,7 +2371,7 @@ export class KipperParser extends KipperParserBase {
case 3:
this.enterOuterAlt(_localctx, 3);
{
- this.state = 460;
+ this.state = 473;
this.arrayPrimaryExpression();
}
break;
@@ -2334,7 +2379,7 @@ export class KipperParser extends KipperParserBase {
case 4:
this.enterOuterAlt(_localctx, 4);
{
- this.state = 461;
+ this.state = 474;
this.objectPrimaryExpression();
}
break;
@@ -2342,7 +2387,7 @@ export class KipperParser extends KipperParserBase {
case 5:
this.enterOuterAlt(_localctx, 5);
{
- this.state = 462;
+ this.state = 475;
this.boolPrimaryExpression();
}
break;
@@ -2350,7 +2395,7 @@ export class KipperParser extends KipperParserBase {
case 6:
this.enterOuterAlt(_localctx, 6);
{
- this.state = 463;
+ this.state = 476;
this.identifierPrimaryExpression();
}
break;
@@ -2358,7 +2403,7 @@ export class KipperParser extends KipperParserBase {
case 7:
this.enterOuterAlt(_localctx, 7);
{
- this.state = 464;
+ this.state = 477;
this.stringPrimaryExpression();
}
break;
@@ -2366,7 +2411,7 @@ export class KipperParser extends KipperParserBase {
case 8:
this.enterOuterAlt(_localctx, 8);
{
- this.state = 465;
+ this.state = 478;
this.fStringPrimaryExpression();
}
break;
@@ -2374,7 +2419,7 @@ export class KipperParser extends KipperParserBase {
case 9:
this.enterOuterAlt(_localctx, 9);
{
- this.state = 466;
+ this.state = 479;
this.numberPrimaryExpression();
}
break;
@@ -2382,7 +2427,7 @@ export class KipperParser extends KipperParserBase {
case 10:
this.enterOuterAlt(_localctx, 10);
{
- this.state = 467;
+ this.state = 480;
this.voidOrNullOrUndefinedPrimaryExpression();
}
break;
@@ -2408,43 +2453,45 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 470;
+ this.enterLambda();
+ this.state = 484;
this.match(KipperParser.LeftParen);
- this.state = 472;
+ this.state = 486;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === KipperParser.Identifier) {
{
- this.state = 471;
+ this.state = 485;
this.parameterList();
}
}
- this.state = 474;
+ this.state = 488;
this.match(KipperParser.RightParen);
- this.state = 475;
+ this.state = 489;
this.match(KipperParser.Colon);
- this.state = 476;
+ this.state = 490;
this.typeSpecifierExpression();
- this.state = 477;
+ this.state = 491;
this.match(KipperParser.RetIndicator);
- this.state = 480;
+ this.state = 494;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 35, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 37, this._ctx)) {
case 1:
{
- this.state = 478;
+ this.state = 492;
this.expression();
}
break;
case 2:
{
- this.state = 479;
+ this.state = 493;
this.compoundStatement();
}
break;
}
+ this.exitLambda();
}
} catch (re) {
if (re instanceof RecognitionException) {
@@ -2466,11 +2513,11 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 482;
+ this.state = 498;
this.match(KipperParser.LeftParen);
- this.state = 483;
+ this.state = 499;
this.expression();
- this.state = 484;
+ this.state = 500;
this.match(KipperParser.RightParen);
}
} catch (re) {
@@ -2494,7 +2541,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 486;
+ this.state = 502;
_la = this._input.LA(1);
if (!(_la === KipperParser.True || _la === KipperParser.False)) {
this._errHandler.recoverInline(this);
@@ -2527,7 +2574,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 488;
+ this.state = 504;
this.identifier();
}
} catch (re) {
@@ -2550,7 +2597,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 490;
+ this.state = 506;
this.match(KipperParser.Identifier);
}
} catch (re) {
@@ -2574,13 +2621,13 @@ export class KipperParser extends KipperParserBase {
);
this.enterRule(_localctx, 94, KipperParser.RULE_identifierOrStringPrimaryExpression);
try {
- this.state = 494;
+ this.state = 510;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.Identifier:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 492;
+ this.state = 508;
this.identifier();
}
break;
@@ -2588,7 +2635,7 @@ export class KipperParser extends KipperParserBase {
case KipperParser.DoubleQuoteStringLiteral:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 493;
+ this.state = 509;
this.stringPrimaryExpression();
}
break;
@@ -2616,7 +2663,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 496;
+ this.state = 512;
_la = this._input.LA(1);
if (!(_la === KipperParser.SingleQuoteStringLiteral || _la === KipperParser.DoubleQuoteStringLiteral)) {
this._errHandler.recoverInline(this);
@@ -2648,52 +2695,52 @@ export class KipperParser extends KipperParserBase {
this.enterRule(_localctx, 98, KipperParser.RULE_fStringPrimaryExpression);
let _la: number;
try {
- this.state = 514;
+ this.state = 530;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.FStringSingleQuoteStart:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 498;
+ this.state = 514;
this.match(KipperParser.FStringSingleQuoteStart);
- this.state = 502;
+ this.state = 518;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === KipperParser.FStringExpStart || _la === KipperParser.FStringSingleQuoteAtom) {
{
{
- this.state = 499;
+ this.state = 515;
this.fStringSingleQuoteAtom();
}
}
- this.state = 504;
+ this.state = 520;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
- this.state = 505;
+ this.state = 521;
this.match(KipperParser.FStringSingleQuoteEnd);
}
break;
case KipperParser.FStringDoubleQuoteStart:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 506;
+ this.state = 522;
this.match(KipperParser.FStringDoubleQuoteStart);
- this.state = 510;
+ this.state = 526;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === KipperParser.FStringExpStart || _la === KipperParser.FStringDoubleQuoteAtom) {
{
{
- this.state = 507;
+ this.state = 523;
this.fStringDoubleQuoteAtom();
}
}
- this.state = 512;
+ this.state = 528;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
- this.state = 513;
+ this.state = 529;
this.match(KipperParser.FStringDoubleQuoteEnd);
}
break;
@@ -2719,62 +2766,63 @@ export class KipperParser extends KipperParserBase {
this.enterRule(_localctx, 100, KipperParser.RULE_fStringSingleQuoteAtom);
let _la: number;
try {
- this.state = 522;
+ this.state = 538;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.FStringSingleQuoteAtom:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 516;
+ this.state = 532;
this.match(KipperParser.FStringSingleQuoteAtom);
}
break;
case KipperParser.FStringExpStart:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 517;
+ this.state = 533;
this.match(KipperParser.FStringExpStart);
- this.state = 519;
+ this.state = 535;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
0)
) {
{
- this.state = 518;
+ this.state = 534;
this.expression();
}
}
- this.state = 521;
+ this.state = 537;
this.match(KipperParser.FStringExpEnd);
}
break;
@@ -2800,62 +2848,63 @@ export class KipperParser extends KipperParserBase {
this.enterRule(_localctx, 102, KipperParser.RULE_fStringDoubleQuoteAtom);
let _la: number;
try {
- this.state = 530;
+ this.state = 546;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.FStringDoubleQuoteAtom:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 524;
+ this.state = 540;
this.match(KipperParser.FStringDoubleQuoteAtom);
}
break;
case KipperParser.FStringExpStart:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 525;
+ this.state = 541;
this.match(KipperParser.FStringExpStart);
- this.state = 527;
+ this.state = 543;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
0)
) {
{
- this.state = 526;
+ this.state = 542;
this.expression();
}
}
- this.state = 529;
+ this.state = 545;
this.match(KipperParser.FStringExpEnd);
}
break;
@@ -2883,7 +2932,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 532;
+ this.state = 548;
_la = this._input.LA(1);
if (!(_la === KipperParser.IntegerConstant || _la === KipperParser.FloatingConstant)) {
this._errHandler.recoverInline(this);
@@ -2918,77 +2967,78 @@ export class KipperParser extends KipperParserBase {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
- this.state = 534;
+ this.state = 550;
this.match(KipperParser.LeftBracket);
- this.state = 543;
+ this.state = 559;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
0)
) {
{
- this.state = 535;
+ this.state = 551;
this.expression();
- this.state = 540;
+ this.state = 556;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 44, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 46, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
- this.state = 536;
+ this.state = 552;
this.match(KipperParser.Comma);
- this.state = 537;
+ this.state = 553;
this.expression();
}
}
}
- this.state = 542;
+ this.state = 558;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 44, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 46, this._ctx);
}
}
}
- this.state = 546;
+ this.state = 562;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === KipperParser.Comma) {
{
- this.state = 545;
+ this.state = 561;
this.match(KipperParser.Comma);
}
}
- this.state = 548;
+ this.state = 564;
this.match(KipperParser.RightBracket);
}
} catch (re) {
@@ -3013,54 +3063,54 @@ export class KipperParser extends KipperParserBase {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
- this.state = 550;
+ this.state = 566;
this.match(KipperParser.LeftBrace);
- this.state = 559;
+ this.state = 575;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- ((_la - 78) & ~0x1f) === 0 &&
- ((1 << (_la - 78)) &
- ((1 << (KipperParser.Identifier - 78)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 78)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 78)))) !==
+ ((_la - 81) & ~0x1f) === 0 &&
+ ((1 << (_la - 81)) &
+ ((1 << (KipperParser.Identifier - 81)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 81)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 81)))) !==
0
) {
{
- this.state = 551;
+ this.state = 567;
this.objectProperty();
- this.state = 556;
+ this.state = 572;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 47, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 49, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
- this.state = 552;
+ this.state = 568;
this.match(KipperParser.Comma);
- this.state = 553;
+ this.state = 569;
this.objectProperty();
}
}
}
- this.state = 558;
+ this.state = 574;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 47, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 49, this._ctx);
}
}
}
- this.state = 562;
+ this.state = 578;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (_la === KipperParser.Comma) {
{
- this.state = 561;
+ this.state = 577;
this.match(KipperParser.Comma);
}
}
- this.state = 564;
+ this.state = 580;
this.match(KipperParser.RightBrace);
}
} catch (re) {
@@ -3083,11 +3133,11 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 566;
+ this.state = 582;
this.identifierOrStringPrimaryExpression();
- this.state = 567;
+ this.state = 583;
this.match(KipperParser.Colon);
- this.state = 568;
+ this.state = 584;
this.expression();
}
} catch (re) {
@@ -3114,15 +3164,15 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 570;
+ this.state = 586;
_la = this._input.LA(1);
if (
!(
- ((_la - 33) & ~0x1f) === 0 &&
- ((1 << (_la - 33)) &
- ((1 << (KipperParser.Void - 33)) |
- (1 << (KipperParser.Null - 33)) |
- (1 << (KipperParser.Undefined - 33)))) !==
+ ((_la - 36) & ~0x1f) === 0 &&
+ ((1 << (_la - 36)) &
+ ((1 << (KipperParser.Void - 36)) |
+ (1 << (KipperParser.Null - 36)) |
+ (1 << (KipperParser.Undefined - 36)))) !==
0
)
) {
@@ -3169,7 +3219,7 @@ export class KipperParser extends KipperParserBase {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
- this.state = 583;
+ this.state = 608;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.True:
@@ -3192,7 +3242,7 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 573;
+ this.state = 589;
this.primaryExpression();
}
break;
@@ -3201,64 +3251,122 @@ export class KipperParser extends KipperParserBase {
_localctx = new ExplicitCallFunctionCallExpressionContext(_localctx);
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 574;
+ this.state = 590;
this.match(KipperParser.CallFunc);
- this.state = 575;
+ this.state = 591;
this.computedPrimaryExpression(0);
- this.state = 576;
+ this.state = 592;
this.match(KipperParser.LeftParen);
- this.state = 578;
+ this.state = 594;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
0)
) {
{
- this.state = 577;
+ this.state = 593;
this.argumentExpressionList();
}
}
- this.state = 580;
+ this.state = 596;
this.match(KipperParser.RightParen);
_localctx._labelASTKind = ParseRuleKindMapping.RULE_functionCallExpression;
}
break;
+ case KipperParser.New:
+ {
+ _localctx = new NewInstantiationExpressionContext(_localctx);
+ this._ctx = _localctx;
+ _prevctx = _localctx;
+ this.state = 599;
+ this.match(KipperParser.New);
+ this.state = 600;
+ this.typeSpecifierExpression();
+ this.state = 601;
+ this.match(KipperParser.LeftParen);
+ this.state = 603;
+ this._errHandler.sync(this);
+ _la = this._input.LA(1);
+ if (
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
+ 0) ||
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
+ 0)
+ ) {
+ {
+ this.state = 602;
+ this.argumentExpressionList();
+ }
+ }
+
+ this.state = 605;
+ this.match(KipperParser.RightParen);
+ _localctx._labelASTKind = ParseRuleKindMapping.RULE_newInstantiationExpression;
+ }
+ break;
default:
throw new NoViableAltException(this);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 606;
+ this.state = 631;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 54, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 57, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -3266,120 +3374,121 @@ export class KipperParser extends KipperParserBase {
}
_prevctx = _localctx;
{
- this.state = 604;
+ this.state = 629;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 53, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 56, this._ctx)) {
case 1:
{
- _localctx = new FunctionCallExpressionContext(
+ _localctx = new DotNotationMemberAccessExpressionContext(
new ComputedPrimaryExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_computedPrimaryExpression);
- this.state = 585;
- if (!this.precpred(this._ctx, 5)) {
- throw this.createFailedPredicateException("this.precpred(this._ctx, 5)");
- }
- this.state = 586;
- this.match(KipperParser.LeftParen);
- this.state = 588;
- this._errHandler.sync(this);
- _la = this._input.LA(1);
- if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
- 0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
- 0)
- ) {
- {
- this.state = 587;
- this.argumentExpressionList();
- }
+ this.state = 610;
+ if (!this.precpred(this._ctx, 6)) {
+ throw this.createFailedPredicateException("this.precpred(this._ctx, 6)");
}
-
- this.state = 590;
- this.match(KipperParser.RightParen);
- _localctx._labelASTKind = ParseRuleKindMapping.RULE_functionCallExpression;
+ this.state = 611;
+ this.dotNotation();
+ _localctx._labelASTKind = ParseRuleKindMapping.RULE_memberAccessExpression;
}
break;
case 2:
{
- _localctx = new DotNotationMemberAccessExpressionContext(
+ _localctx = new BracketNotationMemberAccessExpressionContext(
new ComputedPrimaryExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_computedPrimaryExpression);
- this.state = 592;
- if (!this.precpred(this._ctx, 3)) {
- throw this.createFailedPredicateException("this.precpred(this._ctx, 3)");
+ this.state = 614;
+ if (!this.precpred(this._ctx, 5)) {
+ throw this.createFailedPredicateException("this.precpred(this._ctx, 5)");
}
- this.state = 593;
- this.dotNotation();
+ this.state = 615;
+ this.bracketNotation();
_localctx._labelASTKind = ParseRuleKindMapping.RULE_memberAccessExpression;
}
break;
case 3:
{
- _localctx = new BracketNotationMemberAccessExpressionContext(
+ _localctx = new SliceNotationMemberAccessExpressionContext(
new ComputedPrimaryExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_computedPrimaryExpression);
- this.state = 596;
- if (!this.precpred(this._ctx, 2)) {
- throw this.createFailedPredicateException("this.precpred(this._ctx, 2)");
+ this.state = 618;
+ if (!this.precpred(this._ctx, 4)) {
+ throw this.createFailedPredicateException("this.precpred(this._ctx, 4)");
}
- this.state = 597;
- this.bracketNotation();
+ this.state = 619;
+ this.sliceNotation();
_localctx._labelASTKind = ParseRuleKindMapping.RULE_memberAccessExpression;
}
break;
case 4:
{
- _localctx = new SliceNotationMemberAccessExpressionContext(
+ _localctx = new FunctionCallExpressionContext(
new ComputedPrimaryExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_computedPrimaryExpression);
- this.state = 600;
- if (!this.precpred(this._ctx, 1)) {
- throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
+ this.state = 622;
+ if (!this.precpred(this._ctx, 3)) {
+ throw this.createFailedPredicateException("this.precpred(this._ctx, 3)");
}
- this.state = 601;
- this.sliceNotation();
- _localctx._labelASTKind = ParseRuleKindMapping.RULE_memberAccessExpression;
+ this.state = 623;
+ this.match(KipperParser.LeftParen);
+ this.state = 625;
+ this._errHandler.sync(this);
+ _la = this._input.LA(1);
+ if (
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
+ 0) ||
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
+ 0)
+ ) {
+ {
+ this.state = 624;
+ this.argumentExpressionList();
+ }
+ }
+
+ this.state = 627;
+ this.match(KipperParser.RightParen);
+ _localctx._labelASTKind = ParseRuleKindMapping.RULE_functionCallExpression;
}
break;
}
}
}
- this.state = 608;
+ this.state = 633;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 54, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 57, this._ctx);
}
}
} catch (re) {
@@ -3403,21 +3512,21 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 609;
+ this.state = 634;
this.assignmentExpression();
- this.state = 614;
+ this.state = 639;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === KipperParser.Comma) {
{
{
- this.state = 610;
+ this.state = 635;
this.match(KipperParser.Comma);
- this.state = 611;
+ this.state = 636;
this.assignmentExpression();
}
}
- this.state = 616;
+ this.state = 641;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
@@ -3442,9 +3551,9 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 617;
+ this.state = 642;
this.match(KipperParser.Dot);
- this.state = 618;
+ this.state = 643;
this.identifier();
}
} catch (re) {
@@ -3467,11 +3576,11 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 620;
+ this.state = 645;
this.match(KipperParser.LeftBracket);
- this.state = 621;
+ this.state = 646;
this.expression();
- this.state = 622;
+ this.state = 647;
this.match(KipperParser.RightBracket);
}
} catch (re) {
@@ -3495,93 +3604,95 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 624;
+ this.state = 649;
this.match(KipperParser.LeftBracket);
- this.state = 628;
+ this.state = 653;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
0)
) {
{
- this.state = 625;
+ this.state = 650;
this.expression();
_localctx.sliceStart = true;
}
}
- this.state = 630;
+ this.state = 655;
this.match(KipperParser.Colon);
- this.state = 634;
+ this.state = 659;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 22) & ~0x1f) === 0 &&
- ((1 << (_la - 22)) &
- ((1 << (KipperParser.CallFunc - 22)) |
- (1 << (KipperParser.True - 22)) |
- (1 << (KipperParser.False - 22)) |
- (1 << (KipperParser.Typeof - 22)) |
- (1 << (KipperParser.Void - 22)) |
- (1 << (KipperParser.Null - 22)) |
- (1 << (KipperParser.Undefined - 22)) |
- (1 << (KipperParser.LeftParen - 22)) |
- (1 << (KipperParser.LeftBracket - 22)) |
- (1 << (KipperParser.LeftBrace - 22)) |
- (1 << (KipperParser.Plus - 22)) |
- (1 << (KipperParser.PlusPlus - 22)) |
- (1 << (KipperParser.Minus - 22)) |
- (1 << (KipperParser.MinusMinus - 22)))) !==
+ (((_la - 23) & ~0x1f) === 0 &&
+ ((1 << (_la - 23)) &
+ ((1 << (KipperParser.CallFunc - 23)) |
+ (1 << (KipperParser.New - 23)) |
+ (1 << (KipperParser.True - 23)) |
+ (1 << (KipperParser.False - 23)) |
+ (1 << (KipperParser.Typeof - 23)) |
+ (1 << (KipperParser.Void - 23)) |
+ (1 << (KipperParser.Null - 23)) |
+ (1 << (KipperParser.Undefined - 23)) |
+ (1 << (KipperParser.LeftParen - 23)) |
+ (1 << (KipperParser.LeftBracket - 23)) |
+ (1 << (KipperParser.LeftBrace - 23)) |
+ (1 << (KipperParser.Plus - 23)) |
+ (1 << (KipperParser.PlusPlus - 23)) |
+ (1 << (KipperParser.Minus - 23)) |
+ (1 << (KipperParser.MinusMinus - 23)))) !==
0) ||
- (((_la - 57) & ~0x1f) === 0 &&
- ((1 << (_la - 57)) &
- ((1 << (KipperParser.Not - 57)) |
- (1 << (KipperParser.BitwiseNot - 57)) |
- (1 << (KipperParser.Identifier - 57)) |
- (1 << (KipperParser.IntegerConstant - 57)) |
- (1 << (KipperParser.SingleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.DoubleQuoteStringLiteral - 57)) |
- (1 << (KipperParser.FloatingConstant - 57)) |
- (1 << (KipperParser.FStringSingleQuoteStart - 57)) |
- (1 << (KipperParser.FStringDoubleQuoteStart - 57)))) !==
+ (((_la - 60) & ~0x1f) === 0 &&
+ ((1 << (_la - 60)) &
+ ((1 << (KipperParser.Not - 60)) |
+ (1 << (KipperParser.BitwiseNot - 60)) |
+ (1 << (KipperParser.Identifier - 60)) |
+ (1 << (KipperParser.IntegerConstant - 60)) |
+ (1 << (KipperParser.SingleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.DoubleQuoteStringLiteral - 60)) |
+ (1 << (KipperParser.FloatingConstant - 60)) |
+ (1 << (KipperParser.FStringSingleQuoteStart - 60)) |
+ (1 << (KipperParser.FStringDoubleQuoteStart - 60)))) !==
0)
) {
{
- this.state = 631;
+ this.state = 656;
this.expression();
_localctx.sliceEnd = true;
}
}
- this.state = 636;
+ this.state = 661;
this.match(KipperParser.RightBracket);
}
} catch (re) {
@@ -3602,13 +3713,13 @@ export class KipperParser extends KipperParserBase {
let _localctx: PostfixExpressionContext = new PostfixExpressionContext(this._ctx, this.state);
this.enterRule(_localctx, 124, KipperParser.RULE_postfixExpression);
try {
- this.state = 641;
+ this.state = 666;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 58, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 61, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 638;
+ this.state = 663;
this.computedPrimaryExpression(0);
}
break;
@@ -3616,7 +3727,7 @@ export class KipperParser extends KipperParserBase {
case 2:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 639;
+ this.state = 664;
this.incrementOrDecrementPostfixExpression();
}
break;
@@ -3624,7 +3735,7 @@ export class KipperParser extends KipperParserBase {
case 3:
this.enterOuterAlt(_localctx, 3);
{
- this.state = 640;
+ this.state = 665;
this.typeofExpression();
}
break;
@@ -3652,9 +3763,9 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 643;
+ this.state = 668;
this.computedPrimaryExpression(0);
- this.state = 644;
+ this.state = 669;
this.incrementOrDecrementOperator();
}
} catch (re) {
@@ -3677,29 +3788,10 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 646;
+ this.state = 671;
this.match(KipperParser.Typeof);
- this.state = 652;
- this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 59, this._ctx)) {
- case 1:
- {
- this.state = 647;
- this.match(KipperParser.LeftParen);
- this.state = 648;
- this.assignmentExpression();
- this.state = 649;
- this.match(KipperParser.RightParen);
- }
- break;
-
- case 2:
- {
- this.state = 651;
- this.assignmentExpression();
- }
- break;
- }
+ this.state = 672;
+ this.assignmentExpression();
}
} catch (re) {
if (re instanceof RecognitionException) {
@@ -3719,10 +3811,11 @@ export class KipperParser extends KipperParserBase {
let _localctx: UnaryExpressionContext = new UnaryExpressionContext(this._ctx, this.state);
this.enterRule(_localctx, 130, KipperParser.RULE_unaryExpression);
try {
- this.state = 657;
+ this.state = 677;
this._errHandler.sync(this);
switch (this._input.LA(1)) {
case KipperParser.CallFunc:
+ case KipperParser.New:
case KipperParser.True:
case KipperParser.False:
case KipperParser.Typeof:
@@ -3741,7 +3834,7 @@ export class KipperParser extends KipperParserBase {
case KipperParser.FStringDoubleQuoteStart:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 654;
+ this.state = 674;
this.postfixExpression();
}
break;
@@ -3749,7 +3842,7 @@ export class KipperParser extends KipperParserBase {
case KipperParser.MinusMinus:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 655;
+ this.state = 675;
this.incrementOrDecrementUnaryExpression();
}
break;
@@ -3759,7 +3852,7 @@ export class KipperParser extends KipperParserBase {
case KipperParser.BitwiseNot:
this.enterOuterAlt(_localctx, 3);
{
- this.state = 656;
+ this.state = 676;
this.operatorModifiedUnaryExpression();
}
break;
@@ -3789,9 +3882,9 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 659;
+ this.state = 679;
this.incrementOrDecrementOperator();
- this.state = 660;
+ this.state = 680;
this.postfixExpression();
}
} catch (re) {
@@ -3817,9 +3910,9 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 662;
+ this.state = 682;
this.unaryOperator();
- this.state = 663;
+ this.state = 683;
this.postfixExpression();
}
} catch (re) {
@@ -3843,7 +3936,7 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 665;
+ this.state = 685;
_la = this._input.LA(1);
if (!(_la === KipperParser.PlusPlus || _la === KipperParser.MinusMinus)) {
this._errHandler.recoverInline(this);
@@ -3877,16 +3970,16 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 667;
+ this.state = 687;
_la = this._input.LA(1);
if (
!(
- ((_la - 47) & ~0x1f) === 0 &&
- ((1 << (_la - 47)) &
- ((1 << (KipperParser.Plus - 47)) |
- (1 << (KipperParser.Minus - 47)) |
- (1 << (KipperParser.Not - 47)) |
- (1 << (KipperParser.BitwiseNot - 47)))) !==
+ ((_la - 50) & ~0x1f) === 0 &&
+ ((1 << (_la - 50)) &
+ ((1 << (KipperParser.Plus - 50)) |
+ (1 << (KipperParser.Minus - 50)) |
+ (1 << (KipperParser.Not - 50)) |
+ (1 << (KipperParser.BitwiseNot - 50)))) !==
0
)
) {
@@ -3918,14 +4011,14 @@ export class KipperParser extends KipperParserBase {
let _localctx: CastOrConvertExpressionContext = new CastOrConvertExpressionContext(this._ctx, this.state);
this.enterRule(_localctx, 140, KipperParser.RULE_castOrConvertExpression);
try {
- this.state = 674;
+ this.state = 694;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 61, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 63, this._ctx)) {
case 1:
_localctx = new PassOnCastOrConvertExpressionContext(_localctx);
this.enterOuterAlt(_localctx, 1);
{
- this.state = 669;
+ this.state = 689;
this.unaryExpression();
}
break;
@@ -3934,11 +4027,11 @@ export class KipperParser extends KipperParserBase {
_localctx = new ActualCastOrConvertExpressionContext(_localctx);
this.enterOuterAlt(_localctx, 2);
{
- this.state = 670;
+ this.state = 690;
this.unaryExpression();
- this.state = 671;
+ this.state = 691;
this.match(KipperParser.As);
- this.state = 672;
+ this.state = 692;
this.typeSpecifierExpression();
}
break;
@@ -3981,13 +4074,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 677;
+ this.state = 697;
this.castOrConvertExpression();
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 684;
+ this.state = 704;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 62, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 64, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4000,20 +4093,20 @@ export class KipperParser extends KipperParserBase {
new MultiplicativeExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_multiplicativeExpression);
- this.state = 679;
+ this.state = 699;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 680;
+ this.state = 700;
_la = this._input.LA(1);
if (
!(
- ((_la - 51) & ~0x1f) === 0 &&
- ((1 << (_la - 51)) &
- ((1 << (KipperParser.Star - 51)) |
- (1 << (KipperParser.Div - 51)) |
- (1 << (KipperParser.Mod - 51)) |
- (1 << (KipperParser.PowerTo - 51)))) !==
+ ((_la - 54) & ~0x1f) === 0 &&
+ ((1 << (_la - 54)) &
+ ((1 << (KipperParser.Star - 54)) |
+ (1 << (KipperParser.Div - 54)) |
+ (1 << (KipperParser.Mod - 54)) |
+ (1 << (KipperParser.PowerTo - 54)))) !==
0
)
) {
@@ -4026,14 +4119,14 @@ export class KipperParser extends KipperParserBase {
this._errHandler.reportMatch(this);
this.consume();
}
- this.state = 681;
+ this.state = 701;
this.castOrConvertExpression();
}
}
}
- this.state = 686;
+ this.state = 706;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 62, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 64, this._ctx);
}
}
} catch (re) {
@@ -4074,13 +4167,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 688;
+ this.state = 708;
this.multiplicativeExpression(0);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 695;
+ this.state = 715;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 63, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 65, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4093,11 +4186,11 @@ export class KipperParser extends KipperParserBase {
new AdditiveExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_additiveExpression);
- this.state = 690;
+ this.state = 710;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 691;
+ this.state = 711;
_la = this._input.LA(1);
if (!(_la === KipperParser.Plus || _la === KipperParser.Minus)) {
this._errHandler.recoverInline(this);
@@ -4109,14 +4202,14 @@ export class KipperParser extends KipperParserBase {
this._errHandler.reportMatch(this);
this.consume();
}
- this.state = 692;
+ this.state = 712;
this.multiplicativeExpression(0);
}
}
}
- this.state = 697;
+ this.state = 717;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 63, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 65, this._ctx);
}
}
} catch (re) {
@@ -4156,13 +4249,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 699;
+ this.state = 719;
this.additiveExpression(0);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 707;
+ this.state = 727;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 64, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 66, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4175,20 +4268,20 @@ export class KipperParser extends KipperParserBase {
new BitwiseShiftExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_bitwiseShiftExpression);
- this.state = 701;
+ this.state = 721;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 702;
+ this.state = 722;
this.bitwiseShiftOperators();
- this.state = 703;
+ this.state = 723;
this.bitwiseAndExpression(0);
}
}
}
- this.state = 709;
+ this.state = 729;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 64, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 66, this._ctx);
}
}
} catch (re) {
@@ -4212,15 +4305,15 @@ export class KipperParser extends KipperParserBase {
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 710;
+ this.state = 730;
_la = this._input.LA(1);
if (
!(
- ((_la - 74) & ~0x1f) === 0 &&
- ((1 << (_la - 74)) &
- ((1 << (KipperParser.BitwiseZeroFillLeftShift - 74)) |
- (1 << (KipperParser.BitwiseSignedRightShift - 74)) |
- (1 << (KipperParser.BitwiseZeroFillRightShift - 74)))) !==
+ ((_la - 77) & ~0x1f) === 0 &&
+ ((1 << (_la - 77)) &
+ ((1 << (KipperParser.BitwiseZeroFillLeftShift - 77)) |
+ (1 << (KipperParser.BitwiseSignedRightShift - 77)) |
+ (1 << (KipperParser.BitwiseZeroFillRightShift - 77)))) !==
0
)
) {
@@ -4248,6 +4341,148 @@ export class KipperParser extends KipperParserBase {
return _localctx;
}
+ public instanceOfExpression(): InstanceOfExpressionContext;
+ public instanceOfExpression(_p: number): InstanceOfExpressionContext;
+ // @RuleVersion(0)
+ public instanceOfExpression(_p?: number): InstanceOfExpressionContext {
+ if (_p === undefined) {
+ _p = 0;
+ }
+
+ let _parentctx: ParserRuleContext = this._ctx;
+ let _parentState: number = this.state;
+ let _localctx: InstanceOfExpressionContext = new InstanceOfExpressionContext(this._ctx, _parentState);
+ let _prevctx: InstanceOfExpressionContext = _localctx;
+ let _startState: number = 150;
+ this.enterRecursionRule(_localctx, 150, KipperParser.RULE_instanceOfExpression, _p);
+ try {
+ let _alt: number;
+ this.enterOuterAlt(_localctx, 1);
+ {
+ {
+ _localctx = new PassOnInstanceOfExpressionContext(_localctx);
+ this._ctx = _localctx;
+ _prevctx = _localctx;
+
+ this.state = 733;
+ this.bitwiseShiftExpression(0);
+ }
+ this._ctx._stop = this._input.tryLT(-1);
+ this.state = 740;
+ this._errHandler.sync(this);
+ _alt = this.interpreter.adaptivePredict(this._input, 67, this._ctx);
+ while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
+ if (_alt === 1) {
+ if (this._parseListeners != null) {
+ this.triggerExitRuleEvent();
+ }
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new ActualInstanceOfExpressionContext(
+ new InstanceOfExpressionContext(_parentctx, _parentState),
+ );
+ this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_instanceOfExpression);
+ this.state = 735;
+ if (!this.precpred(this._ctx, 1)) {
+ throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
+ }
+ this.state = 736;
+ this.match(KipperParser.InstanceOf);
+ this.state = 737;
+ this.typeSpecifierExpression();
+ }
+ }
+ }
+ this.state = 742;
+ this._errHandler.sync(this);
+ _alt = this.interpreter.adaptivePredict(this._input, 67, this._ctx);
+ }
+ }
+ } catch (re) {
+ if (re instanceof RecognitionException) {
+ _localctx.exception = re;
+ this._errHandler.reportError(this, re);
+ this._errHandler.recover(this, re);
+ } else {
+ throw re;
+ }
+ } finally {
+ this.unrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ public matchesExpression(): MatchesExpressionContext;
+ public matchesExpression(_p: number): MatchesExpressionContext;
+ // @RuleVersion(0)
+ public matchesExpression(_p?: number): MatchesExpressionContext {
+ if (_p === undefined) {
+ _p = 0;
+ }
+
+ let _parentctx: ParserRuleContext = this._ctx;
+ let _parentState: number = this.state;
+ let _localctx: MatchesExpressionContext = new MatchesExpressionContext(this._ctx, _parentState);
+ let _prevctx: MatchesExpressionContext = _localctx;
+ let _startState: number = 152;
+ this.enterRecursionRule(_localctx, 152, KipperParser.RULE_matchesExpression, _p);
+ try {
+ let _alt: number;
+ this.enterOuterAlt(_localctx, 1);
+ {
+ {
+ _localctx = new PassOnMatchesExpressionContext(_localctx);
+ this._ctx = _localctx;
+ _prevctx = _localctx;
+
+ this.state = 744;
+ this.instanceOfExpression(0);
+ }
+ this._ctx._stop = this._input.tryLT(-1);
+ this.state = 751;
+ this._errHandler.sync(this);
+ _alt = this.interpreter.adaptivePredict(this._input, 68, this._ctx);
+ while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
+ if (_alt === 1) {
+ if (this._parseListeners != null) {
+ this.triggerExitRuleEvent();
+ }
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new ActualMatchesExpressionContext(new MatchesExpressionContext(_parentctx, _parentState));
+ this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_matchesExpression);
+ this.state = 746;
+ if (!this.precpred(this._ctx, 1)) {
+ throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
+ }
+ this.state = 747;
+ this.match(KipperParser.Matches);
+ this.state = 748;
+ this.typeSpecifierExpression();
+ }
+ }
+ }
+ this.state = 753;
+ this._errHandler.sync(this);
+ _alt = this.interpreter.adaptivePredict(this._input, 68, this._ctx);
+ }
+ }
+ } catch (re) {
+ if (re instanceof RecognitionException) {
+ _localctx.exception = re;
+ this._errHandler.reportError(this, re);
+ this._errHandler.recover(this, re);
+ } else {
+ throw re;
+ }
+ } finally {
+ this.unrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
public relationalExpression(): RelationalExpressionContext;
public relationalExpression(_p: number): RelationalExpressionContext;
// @RuleVersion(0)
@@ -4260,8 +4495,8 @@ export class KipperParser extends KipperParserBase {
let _parentState: number = this.state;
let _localctx: RelationalExpressionContext = new RelationalExpressionContext(this._ctx, _parentState);
let _prevctx: RelationalExpressionContext = _localctx;
- let _startState: number = 150;
- this.enterRecursionRule(_localctx, 150, KipperParser.RULE_relationalExpression, _p);
+ let _startState: number = 154;
+ this.enterRecursionRule(_localctx, 154, KipperParser.RULE_relationalExpression, _p);
let _la: number;
try {
let _alt: number;
@@ -4272,13 +4507,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 713;
- this.bitwiseShiftExpression(0);
+ this.state = 755;
+ this.matchesExpression(0);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 720;
+ this.state = 762;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 65, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 69, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4291,20 +4526,20 @@ export class KipperParser extends KipperParserBase {
new RelationalExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_relationalExpression);
- this.state = 715;
+ this.state = 757;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 716;
+ this.state = 758;
_la = this._input.LA(1);
if (
!(
- ((_la - 66) & ~0x1f) === 0 &&
- ((1 << (_la - 66)) &
- ((1 << (KipperParser.Less - 66)) |
- (1 << (KipperParser.LessEqual - 66)) |
- (1 << (KipperParser.Greater - 66)) |
- (1 << (KipperParser.GreaterEqual - 66)))) !==
+ ((_la - 69) & ~0x1f) === 0 &&
+ ((1 << (_la - 69)) &
+ ((1 << (KipperParser.Less - 69)) |
+ (1 << (KipperParser.LessEqual - 69)) |
+ (1 << (KipperParser.Greater - 69)) |
+ (1 << (KipperParser.GreaterEqual - 69)))) !==
0
)
) {
@@ -4317,14 +4552,14 @@ export class KipperParser extends KipperParserBase {
this._errHandler.reportMatch(this);
this.consume();
}
- this.state = 717;
- this.bitwiseShiftExpression(0);
+ this.state = 759;
+ this.relationalExpression(2);
}
}
}
- this.state = 722;
+ this.state = 764;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 65, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 69, this._ctx);
}
}
} catch (re) {
@@ -4353,8 +4588,8 @@ export class KipperParser extends KipperParserBase {
let _parentState: number = this.state;
let _localctx: EqualityExpressionContext = new EqualityExpressionContext(this._ctx, _parentState);
let _prevctx: EqualityExpressionContext = _localctx;
- let _startState: number = 152;
- this.enterRecursionRule(_localctx, 152, KipperParser.RULE_equalityExpression, _p);
+ let _startState: number = 156;
+ this.enterRecursionRule(_localctx, 156, KipperParser.RULE_equalityExpression, _p);
let _la: number;
try {
let _alt: number;
@@ -4365,13 +4600,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 724;
+ this.state = 766;
this.relationalExpression(0);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 731;
+ this.state = 773;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 66, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 70, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4384,11 +4619,11 @@ export class KipperParser extends KipperParserBase {
new EqualityExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_equalityExpression);
- this.state = 726;
+ this.state = 768;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 727;
+ this.state = 769;
_la = this._input.LA(1);
if (!(_la === KipperParser.Equal || _la === KipperParser.NotEqual)) {
this._errHandler.recoverInline(this);
@@ -4400,14 +4635,14 @@ export class KipperParser extends KipperParserBase {
this._errHandler.reportMatch(this);
this.consume();
}
- this.state = 728;
+ this.state = 770;
this.relationalExpression(0);
}
}
}
- this.state = 733;
+ this.state = 775;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 66, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 70, this._ctx);
}
}
} catch (re) {
@@ -4436,8 +4671,8 @@ export class KipperParser extends KipperParserBase {
let _parentState: number = this.state;
let _localctx: BitwiseAndExpressionContext = new BitwiseAndExpressionContext(this._ctx, _parentState);
let _prevctx: BitwiseAndExpressionContext = _localctx;
- let _startState: number = 154;
- this.enterRecursionRule(_localctx, 154, KipperParser.RULE_bitwiseAndExpression, _p);
+ let _startState: number = 158;
+ this.enterRecursionRule(_localctx, 158, KipperParser.RULE_bitwiseAndExpression, _p);
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
@@ -4447,13 +4682,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 735;
+ this.state = 777;
this.equalityExpression(0);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 742;
+ this.state = 784;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 67, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 71, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4466,20 +4701,20 @@ export class KipperParser extends KipperParserBase {
new BitwiseAndExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_bitwiseAndExpression);
- this.state = 737;
+ this.state = 779;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 738;
+ this.state = 780;
this.match(KipperParser.BitwiseAnd);
- this.state = 739;
+ this.state = 781;
this.equalityExpression(0);
}
}
}
- this.state = 744;
+ this.state = 786;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 67, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 71, this._ctx);
}
}
} catch (re) {
@@ -4508,8 +4743,8 @@ export class KipperParser extends KipperParserBase {
let _parentState: number = this.state;
let _localctx: BitwiseXorExpressionContext = new BitwiseXorExpressionContext(this._ctx, _parentState);
let _prevctx: BitwiseXorExpressionContext = _localctx;
- let _startState: number = 156;
- this.enterRecursionRule(_localctx, 156, KipperParser.RULE_bitwiseXorExpression, _p);
+ let _startState: number = 160;
+ this.enterRecursionRule(_localctx, 160, KipperParser.RULE_bitwiseXorExpression, _p);
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
@@ -4519,13 +4754,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 746;
+ this.state = 788;
this.bitwiseAndExpression(0);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 753;
+ this.state = 795;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 68, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 72, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4538,20 +4773,20 @@ export class KipperParser extends KipperParserBase {
new BitwiseXorExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_bitwiseXorExpression);
- this.state = 748;
+ this.state = 790;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 749;
+ this.state = 791;
this.match(KipperParser.BitwiseXor);
- this.state = 750;
+ this.state = 792;
this.bitwiseAndExpression(0);
}
}
}
- this.state = 755;
+ this.state = 797;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 68, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 72, this._ctx);
}
}
} catch (re) {
@@ -4580,8 +4815,8 @@ export class KipperParser extends KipperParserBase {
let _parentState: number = this.state;
let _localctx: BitwiseOrExpressionContext = new BitwiseOrExpressionContext(this._ctx, _parentState);
let _prevctx: BitwiseOrExpressionContext = _localctx;
- let _startState: number = 158;
- this.enterRecursionRule(_localctx, 158, KipperParser.RULE_bitwiseOrExpression, _p);
+ let _startState: number = 162;
+ this.enterRecursionRule(_localctx, 162, KipperParser.RULE_bitwiseOrExpression, _p);
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
@@ -4591,13 +4826,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 757;
+ this.state = 799;
this.bitwiseXorExpression(0);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 764;
+ this.state = 806;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 69, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 73, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4610,20 +4845,20 @@ export class KipperParser extends KipperParserBase {
new BitwiseOrExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_bitwiseOrExpression);
- this.state = 759;
+ this.state = 801;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 760;
+ this.state = 802;
this.match(KipperParser.BitwiseOr);
- this.state = 761;
+ this.state = 803;
this.bitwiseXorExpression(0);
}
}
}
- this.state = 766;
+ this.state = 808;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 69, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 73, this._ctx);
}
}
} catch (re) {
@@ -4652,8 +4887,8 @@ export class KipperParser extends KipperParserBase {
let _parentState: number = this.state;
let _localctx: LogicalAndExpressionContext = new LogicalAndExpressionContext(this._ctx, _parentState);
let _prevctx: LogicalAndExpressionContext = _localctx;
- let _startState: number = 160;
- this.enterRecursionRule(_localctx, 160, KipperParser.RULE_logicalAndExpression, _p);
+ let _startState: number = 164;
+ this.enterRecursionRule(_localctx, 164, KipperParser.RULE_logicalAndExpression, _p);
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
@@ -4663,13 +4898,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 768;
+ this.state = 810;
this.bitwiseOrExpression(0);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 775;
+ this.state = 817;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 70, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 74, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4682,20 +4917,20 @@ export class KipperParser extends KipperParserBase {
new LogicalAndExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_logicalAndExpression);
- this.state = 770;
+ this.state = 812;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 771;
+ this.state = 813;
this.match(KipperParser.AndAnd);
- this.state = 772;
+ this.state = 814;
this.bitwiseOrExpression(0);
}
}
}
- this.state = 777;
+ this.state = 819;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 70, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 74, this._ctx);
}
}
} catch (re) {
@@ -4724,8 +4959,8 @@ export class KipperParser extends KipperParserBase {
let _parentState: number = this.state;
let _localctx: LogicalOrExpressionContext = new LogicalOrExpressionContext(this._ctx, _parentState);
let _prevctx: LogicalOrExpressionContext = _localctx;
- let _startState: number = 162;
- this.enterRecursionRule(_localctx, 162, KipperParser.RULE_logicalOrExpression, _p);
+ let _startState: number = 166;
+ this.enterRecursionRule(_localctx, 166, KipperParser.RULE_logicalOrExpression, _p);
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
@@ -4735,13 +4970,13 @@ export class KipperParser extends KipperParserBase {
this._ctx = _localctx;
_prevctx = _localctx;
- this.state = 779;
+ this.state = 821;
this.logicalAndExpression(0);
}
this._ctx._stop = this._input.tryLT(-1);
- this.state = 786;
+ this.state = 828;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 71, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 75, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
if (this._parseListeners != null) {
@@ -4754,20 +4989,20 @@ export class KipperParser extends KipperParserBase {
new LogicalOrExpressionContext(_parentctx, _parentState),
);
this.pushNewRecursionContext(_localctx, _startState, KipperParser.RULE_logicalOrExpression);
- this.state = 781;
+ this.state = 823;
if (!this.precpred(this._ctx, 1)) {
throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
}
- this.state = 782;
+ this.state = 824;
this.match(KipperParser.OrOr);
- this.state = 783;
+ this.state = 825;
this.logicalAndExpression(0);
}
}
}
- this.state = 788;
+ this.state = 830;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 71, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 75, this._ctx);
}
}
} catch (re) {
@@ -4786,16 +5021,16 @@ export class KipperParser extends KipperParserBase {
// @RuleVersion(0)
public conditionalExpression(): ConditionalExpressionContext {
let _localctx: ConditionalExpressionContext = new ConditionalExpressionContext(this._ctx, this.state);
- this.enterRule(_localctx, 164, KipperParser.RULE_conditionalExpression);
+ this.enterRule(_localctx, 168, KipperParser.RULE_conditionalExpression);
try {
- this.state = 796;
+ this.state = 838;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 72, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 76, this._ctx)) {
case 1:
_localctx = new PassOnConditionalExpressionContext(_localctx);
this.enterOuterAlt(_localctx, 1);
{
- this.state = 789;
+ this.state = 831;
this.logicalOrExpression(0);
}
break;
@@ -4804,15 +5039,15 @@ export class KipperParser extends KipperParserBase {
_localctx = new ActualConditionalExpressionContext(_localctx);
this.enterOuterAlt(_localctx, 2);
{
- this.state = 790;
+ this.state = 832;
this.logicalOrExpression(0);
- this.state = 791;
+ this.state = 833;
this.match(KipperParser.QuestionMark);
- this.state = 792;
+ this.state = 834;
this.conditionalExpression();
- this.state = 793;
+ this.state = 835;
this.match(KipperParser.Colon);
- this.state = 794;
+ this.state = 836;
this.conditionalExpression();
}
break;
@@ -4833,16 +5068,16 @@ export class KipperParser extends KipperParserBase {
// @RuleVersion(0)
public assignmentExpression(): AssignmentExpressionContext {
let _localctx: AssignmentExpressionContext = new AssignmentExpressionContext(this._ctx, this.state);
- this.enterRule(_localctx, 166, KipperParser.RULE_assignmentExpression);
+ this.enterRule(_localctx, 170, KipperParser.RULE_assignmentExpression);
try {
- this.state = 803;
+ this.state = 845;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 73, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 77, this._ctx)) {
case 1:
_localctx = new PassOnAssignmentExpressionContext(_localctx);
this.enterOuterAlt(_localctx, 1);
{
- this.state = 798;
+ this.state = 840;
this.conditionalExpression();
}
break;
@@ -4851,11 +5086,11 @@ export class KipperParser extends KipperParserBase {
_localctx = new ActualAssignmentExpressionContext(_localctx);
this.enterOuterAlt(_localctx, 2);
{
- this.state = 799;
+ this.state = 841;
this.computedPrimaryExpression(0);
- this.state = 800;
+ this.state = 842;
this.assignmentOperator();
- this.state = 801;
+ this.state = 843;
this.assignmentExpression();
}
break;
@@ -4876,23 +5111,23 @@ export class KipperParser extends KipperParserBase {
// @RuleVersion(0)
public assignmentOperator(): AssignmentOperatorContext {
let _localctx: AssignmentOperatorContext = new AssignmentOperatorContext(this._ctx, this.state);
- this.enterRule(_localctx, 168, KipperParser.RULE_assignmentOperator);
+ this.enterRule(_localctx, 172, KipperParser.RULE_assignmentOperator);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 805;
+ this.state = 847;
_la = this._input.LA(1);
if (
!(
- ((_la - 58) & ~0x1f) === 0 &&
- ((1 << (_la - 58)) &
- ((1 << (KipperParser.Assign - 58)) |
- (1 << (KipperParser.PlusAssign - 58)) |
- (1 << (KipperParser.MinusAssign - 58)) |
- (1 << (KipperParser.StarAssign - 58)) |
- (1 << (KipperParser.DivAssign - 58)) |
- (1 << (KipperParser.ModAssign - 58)))) !==
+ ((_la - 61) & ~0x1f) === 0 &&
+ ((1 << (_la - 61)) &
+ ((1 << (KipperParser.Assign - 61)) |
+ (1 << (KipperParser.PlusAssign - 61)) |
+ (1 << (KipperParser.MinusAssign - 61)) |
+ (1 << (KipperParser.StarAssign - 61)) |
+ (1 << (KipperParser.DivAssign - 61)) |
+ (1 << (KipperParser.ModAssign - 61)))) !==
0
)
) {
@@ -4922,30 +5157,30 @@ export class KipperParser extends KipperParserBase {
// @RuleVersion(0)
public expression(): ExpressionContext {
let _localctx: ExpressionContext = new ExpressionContext(this._ctx, this.state);
- this.enterRule(_localctx, 170, KipperParser.RULE_expression);
+ this.enterRule(_localctx, 174, KipperParser.RULE_expression);
try {
let _alt: number;
this.enterOuterAlt(_localctx, 1);
{
- this.state = 807;
+ this.state = 849;
this.assignmentExpression();
- this.state = 812;
+ this.state = 854;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 74, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 78, this._ctx);
while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
if (_alt === 1) {
{
{
- this.state = 808;
+ this.state = 850;
this.match(KipperParser.Comma);
- this.state = 809;
+ this.state = 851;
this.assignmentExpression();
}
}
}
- this.state = 814;
+ this.state = 856;
this._errHandler.sync(this);
- _alt = this.interpreter.adaptivePredict(this._input, 74, this._ctx);
+ _alt = this.interpreter.adaptivePredict(this._input, 78, this._ctx);
}
}
} catch (re) {
@@ -4964,15 +5199,15 @@ export class KipperParser extends KipperParserBase {
// @RuleVersion(0)
public typeSpecifierExpression(): TypeSpecifierExpressionContext {
let _localctx: TypeSpecifierExpressionContext = new TypeSpecifierExpressionContext(this._ctx, this.state);
- this.enterRule(_localctx, 172, KipperParser.RULE_typeSpecifierExpression);
+ this.enterRule(_localctx, 176, KipperParser.RULE_typeSpecifierExpression);
try {
- this.state = 818;
+ this.state = 860;
this._errHandler.sync(this);
- switch (this.interpreter.adaptivePredict(this._input, 75, this._ctx)) {
+ switch (this.interpreter.adaptivePredict(this._input, 79, this._ctx)) {
case 1:
this.enterOuterAlt(_localctx, 1);
{
- this.state = 815;
+ this.state = 857;
this.identifierTypeSpecifierExpression();
}
break;
@@ -4980,7 +5215,7 @@ export class KipperParser extends KipperParserBase {
case 2:
this.enterOuterAlt(_localctx, 2);
{
- this.state = 816;
+ this.state = 858;
this.genericTypeSpecifierExpression();
}
break;
@@ -4988,7 +5223,7 @@ export class KipperParser extends KipperParserBase {
case 3:
this.enterOuterAlt(_localctx, 3);
{
- this.state = 817;
+ this.state = 859;
this.typeofTypeSpecifierExpression();
}
break;
@@ -5012,11 +5247,11 @@ export class KipperParser extends KipperParserBase {
this._ctx,
this.state,
);
- this.enterRule(_localctx, 174, KipperParser.RULE_identifierTypeSpecifierExpression);
+ this.enterRule(_localctx, 178, KipperParser.RULE_identifierTypeSpecifierExpression);
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 820;
+ this.state = 862;
this.typeSpecifierIdentifier();
}
} catch (re) {
@@ -5038,51 +5273,51 @@ export class KipperParser extends KipperParserBase {
this._ctx,
this.state,
);
- this.enterRule(_localctx, 176, KipperParser.RULE_genericTypeSpecifierExpression);
+ this.enterRule(_localctx, 180, KipperParser.RULE_genericTypeSpecifierExpression);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 822;
+ this.state = 864;
this.typeSpecifierIdentifier();
- this.state = 823;
+ this.state = 865;
this.match(KipperParser.Less);
- this.state = 832;
+ this.state = 874;
this._errHandler.sync(this);
_la = this._input.LA(1);
if (
- (((_la - 29) & ~0x1f) === 0 &&
- ((1 << (_la - 29)) &
- ((1 << (KipperParser.Typeof - 29)) |
- (1 << (KipperParser.Void - 29)) |
- (1 << (KipperParser.Null - 29)) |
- (1 << (KipperParser.Undefined - 29)))) !==
+ (((_la - 32) & ~0x1f) === 0 &&
+ ((1 << (_la - 32)) &
+ ((1 << (KipperParser.Typeof - 32)) |
+ (1 << (KipperParser.Void - 32)) |
+ (1 << (KipperParser.Null - 32)) |
+ (1 << (KipperParser.Undefined - 32)))) !==
0) ||
_la === KipperParser.Identifier
) {
{
- this.state = 824;
+ this.state = 866;
this.typeSpecifierExpression();
- this.state = 829;
+ this.state = 871;
this._errHandler.sync(this);
_la = this._input.LA(1);
while (_la === KipperParser.Comma) {
{
{
- this.state = 825;
+ this.state = 867;
this.match(KipperParser.Comma);
- this.state = 826;
+ this.state = 868;
this.typeSpecifierExpression();
}
}
- this.state = 831;
+ this.state = 873;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
}
}
- this.state = 834;
+ this.state = 876;
this.match(KipperParser.Greater);
}
} catch (re) {
@@ -5104,17 +5339,17 @@ export class KipperParser extends KipperParserBase {
this._ctx,
this.state,
);
- this.enterRule(_localctx, 178, KipperParser.RULE_typeofTypeSpecifierExpression);
+ this.enterRule(_localctx, 182, KipperParser.RULE_typeofTypeSpecifierExpression);
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 836;
+ this.state = 878;
this.match(KipperParser.Typeof);
- this.state = 837;
+ this.state = 879;
this.match(KipperParser.LeftParen);
- this.state = 838;
+ this.state = 880;
this.typeSpecifierIdentifier();
- this.state = 839;
+ this.state = 881;
this.match(KipperParser.RightParen);
}
} catch (re) {
@@ -5133,20 +5368,20 @@ export class KipperParser extends KipperParserBase {
// @RuleVersion(0)
public typeSpecifierIdentifier(): TypeSpecifierIdentifierContext {
let _localctx: TypeSpecifierIdentifierContext = new TypeSpecifierIdentifierContext(this._ctx, this.state);
- this.enterRule(_localctx, 180, KipperParser.RULE_typeSpecifierIdentifier);
+ this.enterRule(_localctx, 184, KipperParser.RULE_typeSpecifierIdentifier);
let _la: number;
try {
this.enterOuterAlt(_localctx, 1);
{
- this.state = 841;
+ this.state = 883;
_la = this._input.LA(1);
if (
!(
- (((_la - 33) & ~0x1f) === 0 &&
- ((1 << (_la - 33)) &
- ((1 << (KipperParser.Void - 33)) |
- (1 << (KipperParser.Null - 33)) |
- (1 << (KipperParser.Undefined - 33)))) !==
+ (((_la - 36) & ~0x1f) === 0 &&
+ ((1 << (_la - 36)) &
+ ((1 << (KipperParser.Void - 36)) |
+ (1 << (KipperParser.Null - 36)) |
+ (1 << (KipperParser.Undefined - 36)))) !==
0) ||
_la === KipperParser.Identifier
)
@@ -5193,24 +5428,30 @@ export class KipperParser extends KipperParserBase {
return this.bitwiseShiftExpression_sempred(_localctx as BitwiseShiftExpressionContext, predIndex);
case 75:
- return this.relationalExpression_sempred(_localctx as RelationalExpressionContext, predIndex);
+ return this.instanceOfExpression_sempred(_localctx as InstanceOfExpressionContext, predIndex);
case 76:
- return this.equalityExpression_sempred(_localctx as EqualityExpressionContext, predIndex);
+ return this.matchesExpression_sempred(_localctx as MatchesExpressionContext, predIndex);
case 77:
- return this.bitwiseAndExpression_sempred(_localctx as BitwiseAndExpressionContext, predIndex);
+ return this.relationalExpression_sempred(_localctx as RelationalExpressionContext, predIndex);
case 78:
- return this.bitwiseXorExpression_sempred(_localctx as BitwiseXorExpressionContext, predIndex);
+ return this.equalityExpression_sempred(_localctx as EqualityExpressionContext, predIndex);
case 79:
- return this.bitwiseOrExpression_sempred(_localctx as BitwiseOrExpressionContext, predIndex);
+ return this.bitwiseAndExpression_sempred(_localctx as BitwiseAndExpressionContext, predIndex);
case 80:
- return this.logicalAndExpression_sempred(_localctx as LogicalAndExpressionContext, predIndex);
+ return this.bitwiseXorExpression_sempred(_localctx as BitwiseXorExpressionContext, predIndex);
case 81:
+ return this.bitwiseOrExpression_sempred(_localctx as BitwiseOrExpressionContext, predIndex);
+
+ case 82:
+ return this.logicalAndExpression_sempred(_localctx as LogicalAndExpressionContext, predIndex);
+
+ case 83:
return this.logicalOrExpression_sempred(_localctx as LogicalOrExpressionContext, predIndex);
}
return true;
@@ -5219,91 +5460,108 @@ export class KipperParser extends KipperParserBase {
switch (predIndex) {
case 0:
return this.notInsideExpressionStatement();
+
+ case 1:
+ return this.insideLambda();
}
return true;
}
private computedPrimaryExpression_sempred(_localctx: ComputedPrimaryExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 1:
- return this.precpred(this._ctx, 5);
-
case 2:
- return this.precpred(this._ctx, 3);
+ return this.precpred(this._ctx, 6);
case 3:
- return this.precpred(this._ctx, 2);
+ return this.precpred(this._ctx, 5);
case 4:
- return this.precpred(this._ctx, 1);
+ return this.precpred(this._ctx, 4);
+
+ case 5:
+ return this.precpred(this._ctx, 3);
}
return true;
}
private multiplicativeExpression_sempred(_localctx: MultiplicativeExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 5:
+ case 6:
return this.precpred(this._ctx, 1);
}
return true;
}
private additiveExpression_sempred(_localctx: AdditiveExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 6:
+ case 7:
return this.precpred(this._ctx, 1);
}
return true;
}
private bitwiseShiftExpression_sempred(_localctx: BitwiseShiftExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 7:
+ case 8:
return this.precpred(this._ctx, 1);
}
return true;
}
- private relationalExpression_sempred(_localctx: RelationalExpressionContext, predIndex: number): boolean {
+ private instanceOfExpression_sempred(_localctx: InstanceOfExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 8:
+ case 9:
+ return this.precpred(this._ctx, 1);
+ }
+ return true;
+ }
+ private matchesExpression_sempred(_localctx: MatchesExpressionContext, predIndex: number): boolean {
+ switch (predIndex) {
+ case 10:
+ return this.precpred(this._ctx, 1);
+ }
+ return true;
+ }
+ private relationalExpression_sempred(_localctx: RelationalExpressionContext, predIndex: number): boolean {
+ switch (predIndex) {
+ case 11:
return this.precpred(this._ctx, 1);
}
return true;
}
private equalityExpression_sempred(_localctx: EqualityExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 9:
+ case 12:
return this.precpred(this._ctx, 1);
}
return true;
}
private bitwiseAndExpression_sempred(_localctx: BitwiseAndExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 10:
+ case 13:
return this.precpred(this._ctx, 1);
}
return true;
}
private bitwiseXorExpression_sempred(_localctx: BitwiseXorExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 11:
+ case 14:
return this.precpred(this._ctx, 1);
}
return true;
}
private bitwiseOrExpression_sempred(_localctx: BitwiseOrExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 12:
+ case 15:
return this.precpred(this._ctx, 1);
}
return true;
}
private logicalAndExpression_sempred(_localctx: LogicalAndExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 13:
+ case 16:
return this.precpred(this._ctx, 1);
}
return true;
}
private logicalOrExpression_sempred(_localctx: LogicalOrExpressionContext, predIndex: number): boolean {
switch (predIndex) {
- case 14:
+ case 17:
return this.precpred(this._ctx, 1);
}
return true;
@@ -5311,7 +5569,7 @@ export class KipperParser extends KipperParserBase {
private static readonly _serializedATNSegments: number = 2;
private static readonly _serializedATNSegment0: string =
- "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\\\u034E\x04\x02" +
+ "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03_\u0378\x04\x02" +
"\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07" +
"\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r\t\r\x04" +
"\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04" +
@@ -5324,393 +5582,414 @@ export class KipperParser extends KipperParserBase {
"=\t=\x04>\t>\x04?\t?\x04@\t@\x04A\tA\x04B\tB\x04C\tC\x04D\tD\x04E\tE\x04" +
"F\tF\x04G\tG\x04H\tH\x04I\tI\x04J\tJ\x04K\tK\x04L\tL\x04M\tM\x04N\tN\x04" +
"O\tO\x04P\tP\x04Q\tQ\x04R\tR\x04S\tS\x04T\tT\x04U\tU\x04V\tV\x04W\tW\x04" +
- "X\tX\x04Y\tY\x04Z\tZ\x04[\t[\x04\\\t\\\x03\x02\x05\x02\xBA\n\x02\x03\x02" +
- "\x03\x02\x03\x03\x06\x03\xBF\n\x03\r\x03\x0E\x03\xC0\x03\x04\x03\x04\x03" +
- "\x05\x06\x05\xC6\n\x05\r\x05\x0E\x05\xC7\x03\x06\x03\x06\x03\x06\x05\x06" +
- "\xCD\n\x06\x03\x07\x03\x07\x03\x07\x03\x07\x03\x07\x03\x07\x05\x07\xD5" +
- "\n\x07\x03\b\x03\b\x03\b\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03\n\x05" +
- "\n\xE1\n\n\x03\v\x03\v\x03\f\x03\f\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0E" +
- "\x03\x0E\x05\x0E\xED\n\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x05\x0E\xF3" +
- "\n\x0E\x03\x0F\x03\x0F\x03\x0F\x07\x0F\xF8\n\x0F\f\x0F\x0E\x0F\xFB\v\x0F" +
- "\x03\x10\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x11\x03\x11\x07\x11" +
- "\u0105\n\x11\f\x11\x0E\x11\u0108\v\x11\x03\x11\x03\x11\x03\x12\x03\x12" +
- "\x05\x12\u010E\n\x12\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x03\x14\x03" +
- "\x14\x03\x14\x05\x14\u0118\n\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14" +
- "\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x07\x15\u0124\n\x15\f\x15\x0E" +
- "\x15\u0127\v\x15\x03\x15\x03\x15\x03\x16\x03\x16\x03\x16\x05\x16\u012E" +
- "\n\x16\x03\x17\x03\x17\x03\x17\x03\x17\x03\x18\x03\x18\x03\x18\x05\x18" +
- "\u0137\n\x18\x03\x18\x03\x18\x03\x18\x03\x18\x05\x18\u013D\n\x18\x03\x19" +
- "\x03\x19\x03\x19\x05\x19\u0142\n\x19\x03\x19\x03\x19\x03\x19\x03\x1A\x03" +
- "\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x05\x1A\u014E\n\x1A\x03\x1B" +
- "\x03\x1B\x03\x1B\x05\x1B\u0153\n\x1B\x03\x1B\x03\x1B\x03\x1C\x03\x1C\x03" +
- "\x1C\x03\x1C\x03\x1C\x03\x1D\x03\x1D\x05\x1D\u015E\n\x1D\x03\x1E\x03\x1E" +
- "\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x05\x1E\u0167\n\x1E\x03\x1F\x03" +
- "\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x07\x1F\u016F\n\x1F\f\x1F\x0E\x1F" +
- "\u0172\v\x1F\x03\x1F\x03\x1F\x03 \x03 \x03 \x03 \x03 \x03 \x03 \x03 \x05" +
- ' \u017E\n \x03!\x03!\x03!\x05!\u0183\n!\x03"\x03"\x03"\x03"\x05"' +
- '\u0189\n"\x03"\x03"\x05"\u018D\n"\x03"\x03"\x03"\x03"\x05"\u0193' +
- '\n"\x03"\x03"\x03"\x03"\x05"\u0199\n"\x03"\x03"\x03"\x03#\x03' +
- "#\x03#\x03#\x03#\x03#\x03$\x03$\x03$\x03$\x03$\x03$\x03$\x03$\x03%\x03" +
- "%\x03%\x03&\x03&\x05&\u01B1\n&\x03&\x03&\x03'\x03'\x07'\u01B7\n'\f" +
- "'\x0E'\u01BA\v'\x03'\x05'\u01BD\n'\x03(\x03(\x03(\x03)\x03)\x03" +
- ")\x05)\u01C5\n)\x03)\x03)\x03)\x03*\x03*\x03*\x03+\x03+\x03+\x03+\x03" +
- "+\x03+\x03+\x03+\x03+\x03+\x05+\u01D7\n+\x03,\x03,\x05,\u01DB\n,\x03," +
- "\x03,\x03,\x03,\x03,\x03,\x05,\u01E3\n,\x03-\x03-\x03-\x03-\x03.\x03." +
- "\x03/\x03/\x030\x030\x031\x031\x051\u01F1\n1\x032\x032\x033\x033\x073" +
- "\u01F7\n3\f3\x0E3\u01FA\v3\x033\x033\x033\x073\u01FF\n3\f3\x0E3\u0202" +
- "\v3\x033\x053\u0205\n3\x034\x034\x034\x054\u020A\n4\x034\x054\u020D\n" +
- "4\x035\x035\x035\x055\u0212\n5\x035\x055\u0215\n5\x036\x036\x037\x037" +
- "\x037\x037\x077\u021D\n7\f7\x0E7\u0220\v7\x057\u0222\n7\x037\x057\u0225" +
- "\n7\x037\x037\x038\x038\x038\x038\x078\u022D\n8\f8\x0E8\u0230\v8\x058" +
- "\u0232\n8\x038\x058\u0235\n8\x038\x038\x039\x039\x039\x039\x03:\x03:\x03" +
- ";\x03;\x03;\x03;\x03;\x03;\x05;\u0245\n;\x03;\x03;\x03;\x05;\u024A\n;" +
- "\x03;\x03;\x03;\x05;\u024F\n;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;" +
- "\x03;\x03;\x03;\x03;\x03;\x03;\x07;\u025F\n;\f;\x0E;\u0262\v;\x03<\x03" +
- "<\x03<\x07<\u0267\n<\f<\x0E<\u026A\v<\x03=\x03=\x03=\x03>\x03>\x03>\x03" +
- ">\x03?\x03?\x03?\x03?\x05?\u0277\n?\x03?\x03?\x03?\x03?\x05?\u027D\n?" +
- "\x03?\x03?\x03@\x03@\x03@\x05@\u0284\n@\x03A\x03A\x03A\x03B\x03B\x03B" +
- "\x03B\x03B\x03B\x05B\u028F\nB\x03C\x03C\x03C\x05C\u0294\nC\x03D\x03D\x03" +
- "D\x03E\x03E\x03E\x03F\x03F\x03G\x03G\x03H\x03H\x03H\x03H\x03H\x05H\u02A5" +
- "\nH\x03I\x03I\x03I\x03I\x03I\x03I\x07I\u02AD\nI\fI\x0EI\u02B0\vI\x03J" +
- "\x03J\x03J\x03J\x03J\x03J\x07J\u02B8\nJ\fJ\x0EJ\u02BB\vJ\x03K\x03K\x03" +
- "K\x03K\x03K\x03K\x03K\x07K\u02C4\nK\fK\x0EK\u02C7\vK\x03L\x03L\x03M\x03" +
- "M\x03M\x03M\x03M\x03M\x07M\u02D1\nM\fM\x0EM\u02D4\vM\x03N\x03N\x03N\x03" +
- "N\x03N\x03N\x07N\u02DC\nN\fN\x0EN\u02DF\vN\x03O\x03O\x03O\x03O\x03O\x03" +
- "O\x07O\u02E7\nO\fO\x0EO\u02EA\vO\x03P\x03P\x03P\x03P\x03P\x03P\x07P\u02F2" +
- "\nP\fP\x0EP\u02F5\vP\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x07Q\u02FD\nQ\fQ\x0E" +
- "Q\u0300\vQ\x03R\x03R\x03R\x03R\x03R\x03R\x07R\u0308\nR\fR\x0ER\u030B\v" +
- "R\x03S\x03S\x03S\x03S\x03S\x03S\x07S\u0313\nS\fS\x0ES\u0316\vS\x03T\x03" +
- "T\x03T\x03T\x03T\x03T\x03T\x05T\u031F\nT\x03U\x03U\x03U\x03U\x03U\x05" +
- "U\u0326\nU\x03V\x03V\x03W\x03W\x03W\x07W\u032D\nW\fW\x0EW\u0330\vW\x03" +
- "X\x03X\x03X\x05X\u0335\nX\x03Y\x03Y\x03Z\x03Z\x03Z\x03Z\x03Z\x07Z\u033E" +
- "\nZ\fZ\x0EZ\u0341\vZ\x05Z\u0343\nZ\x03Z\x03Z\x03[\x03[\x03[\x03[\x03[" +
- "\x03\\\x03\\\x03\\\x02\x02\rt\x90\x92\x94\x98\x9A\x9C\x9E\xA0\xA2\xA4" +
- "]\x02\x02\x04\x02\x06\x02\b\x02\n\x02\f\x02\x0E\x02\x10\x02\x12\x02\x14" +
- '\x02\x16\x02\x18\x02\x1A\x02\x1C\x02\x1E\x02 \x02"\x02$\x02&\x02(\x02' +
- "*\x02,\x02.\x020\x022\x024\x026\x028\x02:\x02<\x02>\x02@\x02B\x02D\x02" +
- "F\x02H\x02J\x02L\x02N\x02P\x02R\x02T\x02V\x02X\x02Z\x02\\\x02^\x02`\x02" +
- "b\x02d\x02f\x02h\x02j\x02l\x02n\x02p\x02r\x02t\x02v\x02x\x02z\x02|\x02" +
- "~\x02\x80\x02\x82\x02\x84\x02\x86\x02\x88\x02\x8A\x02\x8C\x02\x8E\x02" +
- "\x90\x02\x92\x02\x94\x02\x96\x02\x98\x02\x9A\x02\x9C\x02\x9E\x02\xA0\x02" +
- "\xA2\x02\xA4\x02\xA6\x02\xA8\x02\xAA\x02\xAC\x02\xAE\x02\xB0\x02\xB2\x02" +
- "\xB4\x02\xB6\x02\x02\x11\x03\x02\x07\b\x03\x02\x0E\x0F\x03\x02\x1D\x1E" +
- "\x03\x02RS\x04\x02QQTT\x03\x02#%\x04\x022244\x06\x021133;;KK\x03\x025" +
- "8\x04\x021133\x03\x02LN\x03\x02DG\x03\x02BC\x03\x02\u017D\x03\x02\x02\x02@\u0182\x03\x02\x02\x02B\u0184\x03\x02\x02" +
- "\x02D\u019D\x03\x02\x02\x02F\u01A3\x03\x02\x02\x02H\u01AB\x03\x02\x02" +
- "\x02J\u01AE\x03\x02\x02\x02L\u01B4\x03\x02\x02\x02N\u01BE\x03\x02\x02" +
- "\x02P\u01C1\x03\x02\x02\x02R\u01C9\x03\x02\x02\x02T\u01D6\x03\x02\x02" +
- "\x02V\u01D8\x03\x02\x02\x02X\u01E4\x03\x02\x02\x02Z\u01E8\x03\x02\x02" +
- "\x02\\\u01EA\x03\x02\x02\x02^\u01EC\x03\x02\x02\x02`\u01F0\x03\x02\x02" +
- "\x02b\u01F2\x03\x02\x02\x02d\u0204\x03\x02\x02\x02f\u020C\x03\x02\x02" +
- "\x02h\u0214\x03\x02\x02\x02j\u0216\x03\x02\x02\x02l\u0218\x03\x02\x02" +
- "\x02n\u0228\x03\x02\x02\x02p\u0238\x03\x02\x02\x02r\u023C\x03\x02\x02" +
- "\x02t\u0249\x03\x02\x02\x02v\u0263\x03\x02\x02\x02x\u026B\x03\x02\x02" +
- "\x02z\u026E\x03\x02\x02\x02|\u0272\x03\x02\x02\x02~\u0283\x03\x02\x02" +
- "\x02\x80\u0285\x03\x02\x02\x02\x82\u0288\x03\x02\x02\x02\x84\u0293\x03" +
- "\x02\x02\x02\x86\u0295\x03\x02\x02\x02\x88\u0298\x03\x02\x02\x02\x8A\u029B" +
- "\x03\x02\x02\x02\x8C\u029D\x03\x02\x02\x02\x8E\u02A4\x03\x02\x02\x02\x90" +
- "\u02A6\x03\x02\x02\x02\x92\u02B1\x03\x02\x02\x02\x94\u02BC\x03\x02\x02" +
- "\x02\x96\u02C8\x03\x02\x02\x02\x98\u02CA\x03\x02\x02\x02\x9A\u02D5\x03" +
- "\x02\x02\x02\x9C\u02E0\x03\x02\x02\x02\x9E\u02EB\x03\x02\x02\x02\xA0\u02F6" +
- "\x03\x02\x02\x02\xA2\u0301\x03\x02\x02\x02\xA4\u030C\x03\x02\x02\x02\xA6" +
- "\u031E\x03\x02\x02\x02\xA8\u0325\x03\x02\x02\x02\xAA\u0327\x03\x02\x02" +
- "\x02\xAC\u0329\x03\x02\x02\x02\xAE\u0334\x03\x02\x02\x02\xB0\u0336\x03" +
- "\x02\x02\x02\xB2\u0338\x03\x02\x02\x02\xB4\u0346\x03\x02\x02\x02\xB6\u034B" +
- "\x03\x02\x02\x02\xB8\xBA\x05\x04\x03\x02\xB9\xB8\x03\x02\x02\x02\xB9\xBA" +
- "\x03\x02\x02\x02\xBA\xBB\x03\x02\x02\x02\xBB\xBC\x07\x02\x02\x03\xBC\x03" +
- "\x03\x02\x02\x02\xBD\xBF\x05\x06\x04\x02\xBE\xBD\x03\x02\x02\x02\xBF\xC0" +
- "\x03\x02\x02\x02\xC0\xBE\x03\x02\x02\x02\xC0\xC1\x03\x02\x02\x02\xC1\x05" +
- "\x03\x02\x02\x02\xC2\xC3\x05\b\x05\x02\xC3\x07\x03\x02\x02\x02\xC4\xC6" +
- "\x05\n\x06\x02\xC5\xC4\x03\x02\x02\x02\xC6\xC7\x03\x02\x02\x02\xC7\xC5" +
- "\x03\x02\x02\x02\xC7\xC8\x03\x02\x02\x02\xC8\t\x03\x02\x02\x02\xC9\xCD" +
- "\x052\x1A\x02\xCA\xCD\x05\f\x07\x02\xCB\xCD\x07'\x02\x02\xCC\xC9\x03" +
- "\x02\x02\x02\xCC\xCA\x03\x02\x02\x02\xCC\xCB\x03\x02\x02\x02\xCD\v\x03" +
- "\x02\x02\x02\xCE\xCF\x05\x0E\b\x02\xCF\xD0\x07'\x02\x02\xD0\xD5\x03\x02" +
- "\x02\x02\xD1\xD5\x05\x1A\x0E\x02\xD2\xD5\x05 \x11\x02\xD3\xD5\x05(\x15" +
- "\x02\xD4\xCE\x03\x02\x02\x02\xD4\xD1\x03\x02\x02\x02\xD4\xD2\x03\x02\x02" +
- "\x02\xD4\xD3\x03\x02\x02\x02\xD5\r\x03\x02\x02\x02\xD6\xD7\x05\x10\t\x02" +
- "\xD7\xD8\x05\x12\n\x02\xD8\x0F\x03\x02\x02\x02\xD9\xDA\t\x02\x02\x02\xDA" +
- "\x11\x03\x02\x02\x02\xDB\xDC\x05\x16\f\x02\xDC\xDD\x07)\x02\x02\xDD\xE0" +
- "\x05\xAEX\x02\xDE\xDF\x07<\x02\x02\xDF\xE1\x05\x14\v\x02\xE0\xDE\x03\x02" +
- "\x02\x02\xE0\xE1\x03\x02\x02\x02\xE1\x13\x03\x02\x02\x02\xE2\xE3\x05\xA8" +
- "U\x02\xE3\x15\x03\x02\x02\x02\xE4\xE5\x05\x18\r\x02\xE5\x17\x03\x02\x02" +
- "\x02\xE6\xE7\x07P\x02\x02\xE7\x19\x03\x02\x02\x02\xE8\xE9\x07\x16\x02" +
- "\x02\xE9\xEA\x05\x16\f\x02\xEA\xEC\x07*\x02\x02\xEB\xED\x05\x1C\x0F\x02" +
- "\xEC\xEB\x03\x02\x02\x02\xEC\xED\x03\x02\x02\x02\xED\xEE\x03\x02\x02\x02" +
- "\xEE\xEF\x07+\x02\x02\xEF\xF0\x07\x19\x02\x02\xF0\xF2\x05\xAEX\x02\xF1" +
- "\xF3\x054\x1B\x02\xF2\xF1\x03\x02\x02\x02\xF2\xF3\x03\x02\x02\x02\xF3" +
- "\x1B\x03\x02\x02\x02\xF4\xF9\x05\x1E\x10\x02\xF5\xF6\x07&\x02\x02\xF6" +
- "\xF8\x05\x1E\x10\x02\xF7\xF5\x03\x02\x02\x02\xF8\xFB\x03\x02\x02\x02\xF9" +
- "\xF7\x03\x02\x02\x02\xF9\xFA\x03\x02\x02\x02\xFA\x1D\x03\x02\x02\x02\xFB" +
- "\xF9\x03\x02\x02\x02\xFC\xFD\x05\x16\f\x02\xFD\xFE\x07)\x02\x02\xFE\xFF" +
- "\x05\xAEX\x02\xFF\x1F\x03\x02\x02\x02\u0100\u0101\x07\x1B\x02\x02\u0101" +
- '\u0102\x05\x16\f\x02\u0102\u0106\x07/\x02\x02\u0103\u0105\x05"\x12\x02' +
- "\u0104\u0103\x03\x02\x02\x02\u0105\u0108\x03\x02\x02\x02\u0106\u0104\x03" +
- "\x02\x02\x02\u0106\u0107\x03\x02\x02\x02\u0107\u0109\x03\x02\x02\x02\u0108" +
- "\u0106\x03\x02\x02\x02\u0109\u010A\x070\x02\x02\u010A!\x03\x02\x02\x02" +
- "\u010B\u010E\x05$\x13\x02\u010C\u010E\x05&\x14\x02\u010D\u010B\x03\x02" +
- "\x02\x02\u010D\u010C\x03\x02\x02\x02\u010E#\x03\x02\x02\x02\u010F\u0110" +
- "\x05\x16\f\x02\u0110\u0111\x07)\x02\x02\u0111\u0112\x05\xAEX\x02\u0112" +
- "\u0113\x07'\x02\x02\u0113%\x03\x02\x02\x02\u0114\u0115\x05\x16\f\x02" +
- "\u0115\u0117\x07*\x02\x02\u0116\u0118\x05\x1C\x0F\x02\u0117\u0116\x03" +
- "\x02\x02\x02\u0117\u0118\x03\x02\x02\x02\u0118\u0119\x03\x02\x02\x02\u0119" +
- "\u011A\x07+\x02\x02\u011A\u011B\x07)\x02\x02\u011B\u011C\x05\xAEX\x02" +
- "\u011C\u011D\x07'\x02\x02\u011D'\x03\x02\x02\x02\u011E\u011F\x07\x1A" +
- "\x02\x02\u011F\u0120\x05\x16\f\x02\u0120\u0125\x07/\x02\x02\u0121\u0124" +
- "\x05*\x16\x02\u0122\u0124\x07'\x02\x02\u0123\u0121\x03\x02\x02\x02\u0123" +
- "\u0122\x03\x02\x02\x02\u0124\u0127\x03\x02\x02\x02\u0125\u0123\x03\x02" +
- "\x02\x02\u0125\u0126\x03\x02\x02\x02\u0126\u0128\x03\x02\x02\x02\u0127" +
- "\u0125\x03\x02\x02\x02\u0128\u0129\x070\x02\x02\u0129)\x03\x02\x02\x02" +
- "\u012A\u012E\x05,\x17\x02\u012B\u012E\x05.\x18\x02\u012C\u012E\x050\x19" +
- "\x02\u012D\u012A\x03\x02\x02\x02\u012D\u012B\x03\x02\x02\x02\u012D\u012C" +
- "\x03\x02\x02\x02\u012E+\x03\x02\x02\x02\u012F\u0130\x05\x16\f\x02\u0130" +
- "\u0131\x07)\x02\x02\u0131\u0132\x05\xAEX\x02\u0132-\x03\x02\x02\x02\u0133" +
- "\u0134\x05\x16\f\x02\u0134\u0136\x07*\x02\x02\u0135\u0137\x05\x1C\x0F" +
- "\x02\u0136\u0135\x03\x02\x02\x02\u0136\u0137\x03\x02\x02\x02\u0137\u0138" +
- "\x03\x02\x02\x02\u0138\u0139\x07+\x02\x02\u0139\u013A\x07)\x02\x02\u013A" +
- "\u013C\x05\xAEX\x02\u013B\u013D\x054\x1B\x02\u013C\u013B\x03\x02\x02\x02" +
- "\u013C\u013D\x03\x02\x02\x02\u013D/\x03\x02\x02\x02\u013E\u013F\x07\x1C" +
- "\x02\x02\u013F\u0141\x07*\x02\x02\u0140\u0142\x05\x1C\x0F\x02\u0141\u0140" +
- "\x03\x02\x02\x02\u0141\u0142\x03\x02\x02\x02\u0142\u0143\x03\x02\x02\x02" +
- "\u0143\u0144\x07+\x02\x02\u0144\u0145\x054\x1B\x02\u01451\x03\x02\x02" +
- "\x02\u0146\u014E\x056\x1C\x02\u0147\u014E\x058\x1D\x02\u0148\u014E\x05" +
- "@!\x02\u0149\u014E\x05H%\x02\u014A\u014E\x05J&\x02\u014B\u014E\x054\x1B" +
- "\x02\u014C\u014E\x05L'\x02\u014D\u0146\x03\x02\x02\x02\u014D\u0147\x03" +
- "\x02\x02\x02\u014D\u0148\x03\x02\x02\x02\u014D\u0149\x03\x02\x02\x02\u014D" +
- "\u014A\x03\x02\x02\x02\u014D\u014B\x03\x02\x02\x02\u014D\u014C\x03\x02" +
- "\x02\x02\u014E3\x03\x02\x02\x02\u014F\u0150\x06\x1B\x02\x02\u0150\u0152" +
- "\x07/\x02\x02\u0151\u0153\x05\b\x05\x02\u0152\u0151\x03\x02\x02\x02\u0152" +
- "\u0153\x03\x02\x02\x02\u0153\u0154\x03\x02\x02\x02\u0154\u0155\x070\x02" +
- "\x02\u01555\x03\x02\x02\x02\u0156\u0157\b\x1C\x01\x02\u0157\u0158\x05" +
- "\xACW\x02\u0158\u0159\x07'\x02\x02\u0159\u015A\b\x1C\x01\x02\u015A7\x03" +
- "\x02\x02\x02\u015B\u015E\x05:\x1E\x02\u015C\u015E\x05<\x1F\x02\u015D\u015B" +
- "\x03\x02\x02\x02\u015D\u015C\x03\x02\x02\x02\u015E9\x03\x02\x02\x02\u015F" +
- "\u0160\x07\x12\x02\x02\u0160\u0161\x07*\x02\x02\u0161\u0162\x05\xACW\x02" +
- "\u0162\u0163\x07+\x02\x02\u0163\u0166\x052\x1A\x02\u0164\u0165\x07\x13" +
- "\x02\x02\u0165\u0167\x052\x1A\x02\u0166\u0164\x03\x02\x02\x02\u0166\u0167" +
- "\x03\x02\x02\x02\u0167;\x03\x02\x02\x02\u0168\u0169\x07\v\x02\x02\u0169" +
- "\u016A\x07*\x02\x02\u016A\u016B\x05\xACW\x02\u016B\u016C\x07+\x02\x02" +
- "\u016C\u0170\x07/\x02\x02\u016D\u016F\x05> \x02\u016E\u016D\x03\x02\x02" +
- "\x02\u016F\u0172\x03\x02\x02\x02\u0170\u016E\x03\x02\x02\x02\u0170\u0171" +
- "\x03\x02\x02\x02\u0171\u0173\x03\x02\x02\x02\u0172\u0170\x03\x02\x02\x02" +
- "\u0173\u0174\x070\x02\x02\u0174=\x03\x02\x02\x02\u0175\u0176\x07\f\x02" +
- "\x02\u0176\u0177\x05\xACW\x02\u0177\u0178\x07)\x02\x02\u0178\u0179\x05" +
- "2\x1A\x02\u0179\u017E\x03\x02\x02\x02\u017A\u017B\x07\r\x02\x02\u017B" +
- "\u017C\x07)\x02\x02\u017C\u017E\x052\x1A\x02\u017D\u0175\x03\x02\x02\x02" +
- '\u017D\u017A\x03\x02\x02\x02\u017E?\x03\x02\x02\x02\u017F\u0183\x05B"' +
- "\x02\u0180\u0183\x05D#\x02\u0181\u0183\x05F$\x02\u0182\u017F\x03\x02\x02" +
- "\x02\u0182\u0180\x03\x02\x02\x02\u0182\u0181\x03\x02\x02\x02\u0183A\x03" +
- "\x02\x02\x02\u0184\u0185\x07\x14\x02\x02\u0185\u018C\x07*\x02\x02\u0186" +
- "\u0189\x05\x0E\b\x02\u0187\u0189\x05\xACW\x02\u0188\u0186\x03\x02\x02" +
- "\x02\u0188\u0187\x03\x02\x02\x02\u0189\u018A\x03\x02\x02\x02\u018A\u018B" +
- '\b"\x01\x02\u018B\u018D\x03\x02\x02\x02\u018C\u0188\x03\x02\x02\x02\u018C' +
- "\u018D\x03\x02\x02\x02\u018D\u018E\x03\x02\x02\x02\u018E\u0192\x07'\x02" +
- '\x02\u018F\u0190\x05\xACW\x02\u0190\u0191\b"\x01\x02\u0191\u0193\x03' +
- "\x02\x02\x02\u0192\u018F\x03\x02\x02\x02\u0192\u0193\x03\x02\x02\x02\u0193" +
- "\u0194\x03\x02\x02\x02\u0194\u0198\x07'\x02\x02\u0195\u0196\x05\xACW" +
- '\x02\u0196\u0197\b"\x01\x02\u0197\u0199\x03\x02\x02\x02\u0198\u0195\x03' +
- "\x02\x02\x02\u0198\u0199\x03\x02\x02\x02\u0199\u019A\x03\x02\x02\x02\u019A" +
- "\u019B\x07+\x02\x02\u019B\u019C\x052\x1A\x02\u019CC\x03\x02\x02\x02\u019D" +
- "\u019E\x07\x11\x02\x02\u019E\u019F\x07*\x02\x02\u019F\u01A0\x05\xACW\x02" +
- "\u01A0\u01A1\x07+\x02\x02\u01A1\u01A2\x052\x1A\x02\u01A2E\x03\x02\x02" +
- "\x02\u01A3\u01A4\x07\x10\x02\x02\u01A4\u01A5\x052\x1A\x02\u01A5\u01A6" +
- "\x07\x11\x02\x02\u01A6\u01A7\x07*\x02\x02\u01A7\u01A8\x05\xACW\x02\u01A8" +
- "\u01A9\x07+\x02\x02\u01A9\u01AA\x07'\x02\x02\u01AAG\x03\x02\x02\x02\u01AB" +
- "\u01AC\t\x03\x02\x02\u01AC\u01AD\x07'\x02\x02\u01ADI\x03\x02\x02\x02" +
- "\u01AE\u01B0\x07\x17\x02\x02\u01AF\u01B1\x05\xACW\x02\u01B0\u01AF\x03" +
- "\x02\x02\x02\u01B0\u01B1\x03\x02\x02\x02\u01B1\u01B2\x03\x02\x02\x02\u01B2" +
- "\u01B3\x07'\x02\x02\u01B3K\x03\x02\x02\x02\u01B4\u01B8\x05N(\x02\u01B5" +
- "\u01B7\x05P)\x02\u01B6\u01B5\x03\x02\x02\x02\u01B7\u01BA\x03\x02\x02\x02" +
- "\u01B8\u01B6\x03\x02\x02\x02\u01B8\u01B9\x03\x02\x02\x02\u01B9\u01BC\x03" +
- "\x02\x02\x02\u01BA\u01B8\x03\x02\x02\x02\u01BB\u01BD\x05R*\x02\u01BC\u01BB" +
- "\x03\x02\x02\x02\u01BC\u01BD\x03\x02\x02\x02\u01BDM\x03\x02\x02\x02\u01BE" +
- "\u01BF\x07 \x02\x02\u01BF\u01C0\x054\x1B\x02\u01C0O\x03\x02\x02\x02\u01C1" +
- "\u01C2\x07!\x02\x02\u01C2\u01C4\x07*\x02\x02\u01C3\u01C5\x05\x1E\x10\x02" +
- "\u01C4\u01C3\x03\x02\x02\x02\u01C4\u01C5\x03\x02\x02\x02\u01C5\u01C6\x03" +
- "\x02\x02\x02\u01C6\u01C7\x07+\x02\x02\u01C7\u01C8\x054\x1B\x02\u01C8Q" +
- '\x03\x02\x02\x02\u01C9\u01CA\x07"\x02\x02\u01CA\u01CB\x054\x1B\x02\u01CB' +
- "S\x03\x02\x02\x02\u01CC\u01D7\x05X-\x02\u01CD\u01D7\x05V,\x02\u01CE\u01D7" +
- "\x05l7\x02\u01CF\u01D7\x05n8\x02\u01D0\u01D7\x05Z.\x02\u01D1\u01D7\x05" +
- "\\/\x02\u01D2\u01D7\x05b2\x02\u01D3\u01D7\x05d3\x02\u01D4\u01D7\x05j6" +
- "\x02\u01D5\u01D7\x05r:\x02\u01D6\u01CC\x03\x02\x02\x02\u01D6\u01CD\x03" +
- "\x02\x02\x02\u01D6\u01CE\x03\x02\x02\x02\u01D6\u01CF\x03\x02\x02\x02\u01D6" +
- "\u01D0\x03\x02\x02\x02\u01D6\u01D1\x03\x02\x02\x02\u01D6\u01D2\x03\x02" +
- "\x02\x02\u01D6\u01D3\x03\x02\x02\x02\u01D6\u01D4\x03\x02\x02\x02\u01D6" +
- "\u01D5\x03\x02\x02\x02\u01D7U\x03\x02\x02\x02\u01D8\u01DA\x07*\x02\x02" +
- "\u01D9\u01DB\x05\x1C\x0F\x02\u01DA\u01D9\x03\x02\x02\x02\u01DA\u01DB\x03" +
- "\x02\x02\x02\u01DB\u01DC\x03\x02\x02\x02\u01DC\u01DD\x07+\x02\x02\u01DD" +
- "\u01DE\x07)\x02\x02\u01DE\u01DF\x05\xAEX\x02\u01DF\u01E2\x07\x19\x02\x02" +
- "\u01E0\u01E3\x05\xACW\x02\u01E1\u01E3\x054\x1B\x02\u01E2\u01E0\x03\x02" +
- "\x02\x02\u01E2\u01E1\x03\x02\x02\x02\u01E3W\x03\x02\x02\x02\u01E4\u01E5" +
- "\x07*\x02\x02\u01E5\u01E6\x05\xACW\x02\u01E6\u01E7\x07+\x02\x02\u01E7" +
- "Y\x03\x02\x02\x02\u01E8\u01E9\t\x04\x02\x02\u01E9[\x03\x02\x02\x02\u01EA" +
- "\u01EB\x05^0\x02\u01EB]\x03\x02\x02\x02\u01EC\u01ED\x07P\x02\x02\u01ED" +
- "_\x03\x02\x02\x02\u01EE\u01F1\x05^0\x02\u01EF\u01F1\x05b2\x02\u01F0\u01EE" +
- "\x03\x02\x02\x02\u01F0\u01EF\x03\x02\x02\x02\u01F1a\x03\x02\x02\x02\u01F2" +
- "\u01F3\t\x05\x02\x02\u01F3c\x03\x02\x02\x02\u01F4\u01F8\x07W\x02\x02\u01F5" +
- "\u01F7\x05f4\x02\u01F6\u01F5\x03\x02\x02\x02\u01F7\u01FA\x03\x02\x02\x02" +
- "\u01F8\u01F6\x03\x02\x02\x02\u01F8\u01F9\x03\x02\x02\x02\u01F9\u01FB\x03" +
- "\x02\x02\x02\u01FA\u01F8\x03\x02\x02\x02\u01FB\u0205\x07Y\x02\x02\u01FC" +
- "\u0200\x07X\x02\x02\u01FD\u01FF\x05h5\x02\u01FE\u01FD\x03\x02\x02\x02" +
- "\u01FF\u0202\x03\x02\x02\x02\u0200\u01FE\x03\x02\x02\x02\u0200\u0201\x03" +
- "\x02\x02\x02\u0201\u0203\x03\x02\x02\x02\u0202\u0200\x03\x02\x02\x02\u0203" +
- "\u0205\x07[\x02\x02\u0204\u01F4\x03\x02\x02\x02\u0204\u01FC\x03\x02\x02" +
- "\x02\u0205e\x03\x02\x02\x02\u0206\u020D\x07Z\x02\x02\u0207\u0209\x07\x03" +
- "\x02\x02\u0208\u020A\x05\xACW\x02\u0209\u0208\x03\x02\x02\x02\u0209\u020A";
+ "X\tX\x04Y\tY\x04Z\tZ\x04[\t[\x04\\\t\\\x04]\t]\x04^\t^\x03\x02\x05\x02" +
+ "\xBE\n\x02\x03\x02\x03\x02\x03\x03\x06\x03\xC3\n\x03\r\x03\x0E\x03\xC4" +
+ "\x03\x04\x03\x04\x03\x05\x06\x05\xCA\n\x05\r\x05\x0E\x05\xCB\x03\x06\x03" +
+ "\x06\x03\x06\x05\x06\xD1\n\x06\x03\x07\x03\x07\x03\x07\x03\x07\x03\x07" +
+ "\x03\x07\x05\x07\xD9\n\x07\x03\b\x03\b\x03\b\x03\t\x03\t\x03\n\x03\n\x03" +
+ "\n\x03\n\x03\n\x05\n\xE5\n\n\x03\v\x03\v\x03\f\x03\f\x03\r\x03\r\x03\x0E" +
+ "\x03\x0E\x03\x0E\x03\x0E\x05\x0E\xF1\n\x0E\x03\x0E\x03\x0E\x03\x0E\x03" +
+ "\x0E\x05\x0E\xF7\n\x0E\x03\x0F\x03\x0F\x03\x0F\x07\x0F\xFC\n\x0F\f\x0F" +
+ "\x0E\x0F\xFF\v\x0F\x03\x10\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03" +
+ "\x11\x03\x11\x07\x11\u0109\n\x11\f\x11\x0E\x11\u010C\v\x11\x03\x11\x03" +
+ "\x11\x03\x12\x03\x12\x05\x12\u0112\n\x12\x03\x13\x03\x13\x03\x13\x03\x13" +
+ "\x03\x13\x03\x14\x03\x14\x03\x14\x05\x14\u011C\n\x14\x03\x14\x03\x14\x03" +
+ "\x14\x03\x14\x03\x14\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x07\x15\u0128" +
+ "\n\x15\f\x15\x0E\x15\u012B\v\x15\x03\x15\x03\x15\x03\x16\x03\x16\x03\x16" +
+ "\x05\x16\u0132\n\x16\x03\x17\x03\x17\x03\x17\x03\x17\x03\x18\x03\x18\x03" +
+ "\x18\x05\x18\u013B\n\x18\x03\x18\x03\x18\x03\x18\x03\x18\x05\x18\u0141" +
+ "\n\x18\x03\x19\x03\x19\x03\x19\x05\x19\u0146\n\x19\x03\x19\x03\x19\x03" +
+ "\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x05\x1A\u0152" +
+ "\n\x1A\x03\x1B\x03\x1B\x03\x1B\x05\x1B\u0157\n\x1B\x03\x1B\x03\x1B\x03" +
+ "\x1B\x03\x1B\x03\x1B\x05\x1B\u015E\n\x1B\x03\x1B\x03\x1B\x05\x1B\u0162" +
+ "\n\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1D\x03\x1D\x05\x1D" +
+ "\u016B\n\x1D\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x05" +
+ "\x1E\u0174\n\x1E\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x07\x1F" +
+ "\u017C\n\x1F\f\x1F\x0E\x1F\u017F\v\x1F\x03\x1F\x03\x1F\x03 \x03 \x03 " +
+ "\x03 \x03 \x03 \x03 \x03 \x05 \u018B\n \x03!\x03!\x03!\x05!\u0190\n!\x03" +
+ '"\x03"\x03"\x03"\x05"\u0196\n"\x03"\x03"\x05"\u019A\n"\x03"' +
+ '\x03"\x03"\x03"\x05"\u01A0\n"\x03"\x03"\x03"\x03"\x05"\u01A6' +
+ '\n"\x03"\x03"\x03"\x03#\x03#\x03#\x03#\x03#\x03#\x03$\x03$\x03$\x03' +
+ "$\x03$\x03$\x03$\x03$\x03%\x03%\x03%\x03&\x03&\x05&\u01BE\n&\x03&\x03" +
+ "&\x03'\x03'\x07'\u01C4\n'\f'\x0E'\u01C7\v'\x03'\x05'\u01CA\n" +
+ "'\x03(\x03(\x03(\x03)\x03)\x03)\x05)\u01D2\n)\x03)\x03)\x03)\x03*\x03" +
+ "*\x03*\x03+\x03+\x03+\x03+\x03+\x03+\x03+\x03+\x03+\x03+\x05+\u01E4\n" +
+ "+\x03,\x03,\x03,\x05,\u01E9\n,\x03,\x03,\x03,\x03,\x03,\x03,\x05,\u01F1" +
+ "\n,\x03,\x03,\x03-\x03-\x03-\x03-\x03.\x03.\x03/\x03/\x030\x030\x031\x03" +
+ "1\x051\u0201\n1\x032\x032\x033\x033\x073\u0207\n3\f3\x0E3\u020A\v3\x03" +
+ "3\x033\x033\x073\u020F\n3\f3\x0E3\u0212\v3\x033\x053\u0215\n3\x034\x03" +
+ "4\x034\x054\u021A\n4\x034\x054\u021D\n4\x035\x035\x035\x055\u0222\n5\x03" +
+ "5\x055\u0225\n5\x036\x036\x037\x037\x037\x037\x077\u022D\n7\f7\x0E7\u0230" +
+ "\v7\x057\u0232\n7\x037\x057\u0235\n7\x037\x037\x038\x038\x038\x038\x07" +
+ "8\u023D\n8\f8\x0E8\u0240\v8\x058\u0242\n8\x038\x058\u0245\n8\x038\x03" +
+ "8\x039\x039\x039\x039\x03:\x03:\x03;\x03;\x03;\x03;\x03;\x03;\x05;\u0255" +
+ "\n;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x05;\u025E\n;\x03;\x03;\x03;\x05" +
+ ";\u0263\n;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03" +
+ ";\x03;\x03;\x03;\x05;\u0274\n;\x03;\x03;\x07;\u0278\n;\f;\x0E;\u027B\v" +
+ ";\x03<\x03<\x03<\x07<\u0280\n<\f<\x0E<\u0283\v<\x03=\x03=\x03=\x03>\x03" +
+ ">\x03>\x03>\x03?\x03?\x03?\x03?\x05?\u0290\n?\x03?\x03?\x03?\x03?\x05" +
+ "?\u0296\n?\x03?\x03?\x03@\x03@\x03@\x05@\u029D\n@\x03A\x03A\x03A\x03B" +
+ "\x03B\x03B\x03C\x03C\x03C\x05C\u02A8\nC\x03D\x03D\x03D\x03E\x03E\x03E" +
+ "\x03F\x03F\x03G\x03G\x03H\x03H\x03H\x03H\x03H\x05H\u02B9\nH\x03I\x03I" +
+ "\x03I\x03I\x03I\x03I\x07I\u02C1\nI\fI\x0EI\u02C4\vI\x03J\x03J\x03J\x03" +
+ "J\x03J\x03J\x07J\u02CC\nJ\fJ\x0EJ\u02CF\vJ\x03K\x03K\x03K\x03K\x03K\x03" +
+ "K\x03K\x07K\u02D8\nK\fK\x0EK\u02DB\vK\x03L\x03L\x03M\x03M\x03M\x03M\x03" +
+ "M\x03M\x07M\u02E5\nM\fM\x0EM\u02E8\vM\x03N\x03N\x03N\x03N\x03N\x03N\x07" +
+ "N\u02F0\nN\fN\x0EN\u02F3\vN\x03O\x03O\x03O\x03O\x03O\x03O\x07O\u02FB\n" +
+ "O\fO\x0EO\u02FE\vO\x03P\x03P\x03P\x03P\x03P\x03P\x07P\u0306\nP\fP\x0E" +
+ "P\u0309\vP\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x07Q\u0311\nQ\fQ\x0EQ\u0314\v" +
+ "Q\x03R\x03R\x03R\x03R\x03R\x03R\x07R\u031C\nR\fR\x0ER\u031F\vR\x03S\x03" +
+ "S\x03S\x03S\x03S\x03S\x07S\u0327\nS\fS\x0ES\u032A\vS\x03T\x03T\x03T\x03" +
+ "T\x03T\x03T\x07T\u0332\nT\fT\x0ET\u0335\vT\x03U\x03U\x03U\x03U\x03U\x03" +
+ "U\x07U\u033D\nU\fU\x0EU\u0340\vU\x03V\x03V\x03V\x03V\x03V\x03V\x03V\x05" +
+ "V\u0349\nV\x03W\x03W\x03W\x03W\x03W\x05W\u0350\nW\x03X\x03X\x03Y\x03Y" +
+ "\x03Y\x07Y\u0357\nY\fY\x0EY\u035A\vY\x03Z\x03Z\x03Z\x05Z\u035F\nZ\x03" +
+ "[\x03[\x03\\\x03\\\x03\\\x03\\\x03\\\x07\\\u0368\n\\\f\\\x0E\\\u036B\v" +
+ "\\\x05\\\u036D\n\\\x03\\\x03\\\x03]\x03]\x03]\x03]\x03]\x03^\x03^\x03" +
+ "^\x02\x02\x0Ft\x90\x92\x94\x98\x9A\x9C\x9E\xA0\xA2\xA4\xA6\xA8_\x02\x02" +
+ "\x04\x02\x06\x02\b\x02\n\x02\f\x02\x0E\x02\x10\x02\x12\x02\x14\x02\x16" +
+ '\x02\x18\x02\x1A\x02\x1C\x02\x1E\x02 \x02"\x02$\x02&\x02(\x02*\x02,\x02' +
+ ".\x020\x022\x024\x026\x028\x02:\x02<\x02>\x02@\x02B\x02D\x02F\x02H\x02" +
+ "J\x02L\x02N\x02P\x02R\x02T\x02V\x02X\x02Z\x02\\\x02^\x02`\x02b\x02d\x02" +
+ "f\x02h\x02j\x02l\x02n\x02p\x02r\x02t\x02v\x02x\x02z\x02|\x02~\x02\x80" +
+ "\x02\x82\x02\x84\x02\x86\x02\x88\x02\x8A\x02\x8C\x02\x8E\x02\x90\x02\x92" +
+ "\x02\x94\x02\x96\x02\x98\x02\x9A\x02\x9C\x02\x9E\x02\xA0\x02\xA2\x02\xA4" +
+ "\x02\xA6\x02\xA8\x02\xAA\x02\xAC\x02\xAE\x02\xB0\x02\xB2\x02\xB4\x02\xB6" +
+ "\x02\xB8\x02\xBA\x02\x02\x11\x03\x02\b\t\x03\x02\x0F\x10\x03\x02\x1F " +
+ "\x03\x02UV\x04\x02TTWW\x03\x02&(\x04\x025577\x06\x024466>>NN\x03\x028" +
+ ";\x04\x024466\x03\x02OQ\x03\x02GJ\x03\x02EF\x03\x02?D\x04\x02&(SS\x02" +
+ "\u0384\x02\xBD\x03\x02\x02\x02\x04\xC2\x03\x02\x02\x02\x06\xC6\x03\x02" +
+ "\x02\x02\b\xC9\x03\x02\x02\x02\n\xD0\x03\x02\x02\x02\f\xD8\x03\x02\x02" +
+ "\x02\x0E\xDA\x03\x02\x02\x02\x10\xDD\x03\x02\x02\x02\x12\xDF\x03\x02\x02" +
+ "\x02\x14\xE6\x03\x02\x02\x02\x16\xE8\x03\x02\x02\x02\x18\xEA\x03\x02\x02" +
+ "\x02\x1A\xEC\x03\x02\x02\x02\x1C\xF8\x03\x02\x02\x02\x1E\u0100\x03\x02" +
+ '\x02\x02 \u0104\x03\x02\x02\x02"\u0111\x03\x02\x02\x02$\u0113\x03\x02' +
+ "\x02\x02&\u0118\x03\x02\x02\x02(\u0122\x03\x02\x02\x02*\u0131\x03\x02" +
+ "\x02\x02,\u0133\x03\x02\x02\x02.\u0137\x03\x02\x02\x020\u0142\x03\x02" +
+ "\x02\x022\u0151\x03\x02\x02\x024\u0161\x03\x02\x02\x026\u0163\x03\x02" +
+ "\x02\x028\u016A\x03\x02\x02\x02:\u016C\x03\x02\x02\x02<\u0175\x03\x02" +
+ "\x02\x02>\u018A\x03\x02\x02\x02@\u018F\x03\x02\x02\x02B\u0191\x03\x02" +
+ "\x02\x02D\u01AA\x03\x02\x02\x02F\u01B0\x03\x02\x02\x02H\u01B8\x03\x02" +
+ "\x02\x02J\u01BB\x03\x02\x02\x02L\u01C1\x03\x02\x02\x02N\u01CB\x03\x02" +
+ "\x02\x02P\u01CE\x03\x02\x02\x02R\u01D6\x03\x02\x02\x02T\u01E3\x03\x02" +
+ "\x02\x02V\u01E5\x03\x02\x02\x02X\u01F4\x03\x02\x02\x02Z\u01F8\x03\x02" +
+ "\x02\x02\\\u01FA\x03\x02\x02\x02^\u01FC\x03\x02\x02\x02`\u0200\x03\x02" +
+ "\x02\x02b\u0202\x03\x02\x02\x02d\u0214\x03\x02\x02\x02f\u021C\x03\x02" +
+ "\x02\x02h\u0224\x03\x02\x02\x02j\u0226\x03\x02\x02\x02l\u0228\x03\x02" +
+ "\x02\x02n\u0238\x03\x02\x02\x02p\u0248\x03\x02\x02\x02r\u024C\x03\x02" +
+ "\x02\x02t\u0262\x03\x02\x02\x02v\u027C\x03\x02\x02\x02x\u0284\x03\x02" +
+ "\x02\x02z\u0287\x03\x02\x02\x02|\u028B\x03\x02\x02\x02~\u029C\x03\x02" +
+ "\x02\x02\x80\u029E\x03\x02\x02\x02\x82\u02A1\x03\x02\x02\x02\x84\u02A7" +
+ "\x03\x02\x02\x02\x86\u02A9\x03\x02\x02\x02\x88\u02AC\x03\x02\x02\x02\x8A" +
+ "\u02AF\x03\x02\x02\x02\x8C\u02B1\x03\x02\x02\x02\x8E\u02B8\x03\x02\x02" +
+ "\x02\x90\u02BA\x03\x02\x02\x02\x92\u02C5\x03\x02\x02\x02\x94\u02D0\x03" +
+ "\x02\x02\x02\x96\u02DC\x03\x02\x02\x02\x98\u02DE\x03\x02\x02\x02\x9A\u02E9" +
+ "\x03\x02\x02\x02\x9C\u02F4\x03\x02\x02\x02\x9E\u02FF\x03\x02\x02\x02\xA0" +
+ "\u030A\x03\x02\x02\x02\xA2\u0315\x03\x02\x02\x02\xA4\u0320\x03\x02\x02" +
+ "\x02\xA6\u032B\x03\x02\x02\x02\xA8\u0336\x03\x02\x02\x02\xAA\u0348\x03" +
+ "\x02\x02\x02\xAC\u034F\x03\x02\x02\x02\xAE\u0351\x03\x02\x02\x02\xB0\u0353" +
+ "\x03\x02\x02\x02\xB2\u035E\x03\x02\x02\x02\xB4\u0360\x03\x02\x02\x02\xB6" +
+ "\u0362\x03\x02\x02\x02\xB8\u0370\x03\x02\x02\x02\xBA\u0375\x03\x02\x02" +
+ "\x02\xBC\xBE\x05\x04\x03\x02\xBD\xBC\x03\x02\x02\x02\xBD\xBE\x03\x02\x02" +
+ "\x02\xBE\xBF\x03\x02\x02\x02\xBF\xC0\x07\x02\x02\x03\xC0\x03\x03\x02\x02" +
+ "\x02\xC1\xC3\x05\x06\x04\x02\xC2\xC1\x03\x02\x02\x02\xC3\xC4\x03\x02\x02" +
+ "\x02\xC4\xC2\x03\x02\x02\x02\xC4\xC5\x03\x02\x02\x02\xC5\x05\x03\x02\x02" +
+ "\x02\xC6\xC7\x05\b\x05\x02\xC7\x07\x03\x02\x02\x02\xC8\xCA\x05\n\x06\x02" +
+ "\xC9\xC8\x03\x02\x02\x02\xCA\xCB\x03\x02\x02\x02\xCB\xC9\x03\x02\x02\x02" +
+ "\xCB\xCC\x03\x02\x02\x02\xCC\t\x03\x02\x02\x02\xCD\xD1\x052\x1A\x02\xCE" +
+ "\xD1\x05\f\x07\x02\xCF\xD1\x07*\x02\x02\xD0\xCD\x03\x02\x02\x02\xD0\xCE" +
+ "\x03\x02\x02\x02\xD0\xCF\x03\x02\x02\x02\xD1\v\x03\x02\x02\x02\xD2\xD3" +
+ "\x05\x0E\b\x02\xD3\xD4\x07*\x02\x02\xD4\xD9\x03\x02\x02\x02\xD5\xD9\x05" +
+ "\x1A\x0E\x02\xD6\xD9\x05 \x11\x02\xD7\xD9\x05(\x15\x02\xD8\xD2\x03\x02" +
+ "\x02\x02\xD8\xD5\x03\x02\x02\x02\xD8\xD6\x03\x02\x02\x02\xD8\xD7\x03\x02" +
+ "\x02\x02\xD9\r\x03\x02\x02\x02\xDA\xDB\x05\x10\t\x02\xDB\xDC\x05\x12\n" +
+ "\x02\xDC\x0F\x03\x02\x02\x02\xDD\xDE\t\x02\x02\x02\xDE\x11\x03\x02\x02" +
+ "\x02\xDF\xE0\x05\x16\f\x02\xE0\xE1\x07,\x02\x02\xE1\xE4\x05\xB2Z\x02\xE2" +
+ "\xE3\x07?\x02\x02\xE3\xE5\x05\x14\v\x02\xE4\xE2\x03\x02\x02\x02\xE4\xE5" +
+ "\x03\x02\x02\x02\xE5\x13\x03\x02\x02\x02\xE6\xE7\x05\xACW\x02\xE7\x15" +
+ "\x03\x02\x02\x02\xE8\xE9\x05\x18\r\x02\xE9\x17\x03\x02\x02\x02\xEA\xEB" +
+ "\x07S\x02\x02\xEB\x19\x03\x02\x02\x02\xEC\xED\x07\x17\x02\x02\xED\xEE" +
+ "\x05\x16\f\x02\xEE\xF0\x07-\x02\x02\xEF\xF1\x05\x1C\x0F\x02\xF0\xEF\x03" +
+ "\x02\x02\x02\xF0\xF1\x03\x02\x02\x02\xF1\xF2\x03\x02\x02\x02\xF2\xF3\x07" +
+ ".\x02\x02\xF3\xF4\x07\x1A\x02\x02\xF4\xF6\x05\xB2Z\x02\xF5\xF7\x054\x1B" +
+ "\x02\xF6\xF5\x03\x02\x02\x02\xF6\xF7\x03\x02\x02\x02\xF7\x1B\x03\x02\x02" +
+ "\x02\xF8\xFD\x05\x1E\x10\x02\xF9\xFA\x07)\x02\x02\xFA\xFC\x05\x1E\x10" +
+ "\x02\xFB\xF9\x03\x02\x02\x02\xFC\xFF\x03\x02\x02\x02\xFD\xFB\x03\x02\x02" +
+ "\x02\xFD\xFE\x03\x02\x02\x02\xFE\x1D\x03\x02\x02\x02\xFF\xFD\x03\x02\x02" +
+ "\x02\u0100\u0101\x05\x16\f\x02\u0101\u0102\x07,\x02\x02\u0102\u0103\x05" +
+ "\xB2Z\x02\u0103\x1F\x03\x02\x02\x02\u0104\u0105\x07\x1C\x02\x02\u0105" +
+ '\u0106\x05\x16\f\x02\u0106\u010A\x072\x02\x02\u0107\u0109\x05"\x12\x02' +
+ "\u0108\u0107\x03\x02\x02\x02\u0109\u010C\x03\x02\x02\x02\u010A\u0108\x03" +
+ "\x02\x02\x02\u010A\u010B\x03\x02\x02\x02\u010B\u010D\x03\x02\x02\x02\u010C" +
+ "\u010A\x03\x02\x02\x02\u010D\u010E\x073\x02\x02\u010E!\x03\x02\x02\x02" +
+ "\u010F\u0112\x05$\x13\x02\u0110\u0112\x05&\x14\x02\u0111\u010F\x03\x02" +
+ "\x02\x02\u0111\u0110\x03\x02\x02\x02\u0112#\x03\x02\x02\x02\u0113\u0114" +
+ "\x05\x16\f\x02\u0114\u0115\x07,\x02\x02\u0115\u0116\x05\xB2Z\x02\u0116" +
+ "\u0117\x07*\x02\x02\u0117%\x03\x02\x02\x02\u0118\u0119\x05\x16\f\x02\u0119" +
+ "\u011B\x07-\x02\x02\u011A\u011C\x05\x1C\x0F\x02\u011B\u011A\x03\x02\x02" +
+ "\x02\u011B\u011C\x03\x02\x02\x02\u011C\u011D\x03\x02\x02\x02\u011D\u011E" +
+ "\x07.\x02\x02\u011E\u011F\x07,\x02\x02\u011F\u0120\x05\xB2Z\x02\u0120" +
+ "\u0121\x07*\x02\x02\u0121'\x03\x02\x02\x02\u0122\u0123\x07\x1B\x02\x02" +
+ "\u0123\u0124\x05\x16\f\x02\u0124\u0129\x072\x02\x02\u0125\u0128\x05*\x16" +
+ "\x02\u0126\u0128\x07*\x02\x02\u0127\u0125\x03\x02\x02\x02\u0127\u0126" +
+ "\x03\x02\x02\x02\u0128\u012B\x03\x02\x02\x02\u0129\u0127\x03\x02\x02\x02" +
+ "\u0129\u012A\x03\x02\x02\x02\u012A\u012C\x03\x02\x02\x02\u012B\u0129\x03" +
+ "\x02\x02\x02\u012C\u012D\x073\x02\x02\u012D)\x03\x02\x02\x02\u012E\u0132" +
+ "\x05,\x17\x02\u012F\u0132\x05.\x18\x02\u0130\u0132\x050\x19\x02\u0131" +
+ "\u012E\x03\x02\x02\x02\u0131\u012F\x03\x02\x02\x02\u0131\u0130\x03\x02" +
+ "\x02\x02\u0132+\x03\x02\x02\x02\u0133\u0134\x05\x16\f\x02\u0134\u0135" +
+ "\x07,\x02\x02\u0135\u0136\x05\xB2Z\x02\u0136-\x03\x02\x02\x02\u0137\u0138" +
+ "\x05\x16\f\x02\u0138\u013A\x07-\x02\x02\u0139\u013B\x05\x1C\x0F\x02\u013A" +
+ "\u0139\x03\x02\x02\x02\u013A\u013B\x03\x02\x02\x02\u013B\u013C\x03\x02" +
+ "\x02\x02\u013C\u013D\x07.\x02\x02\u013D\u013E\x07,\x02\x02\u013E\u0140" +
+ "\x05\xB2Z\x02\u013F\u0141\x054\x1B\x02\u0140\u013F\x03\x02\x02\x02\u0140" +
+ "\u0141\x03\x02\x02\x02\u0141/\x03\x02\x02\x02\u0142\u0143\x07\x1D\x02" +
+ "\x02\u0143\u0145\x07-\x02\x02\u0144\u0146\x05\x1C\x0F\x02\u0145\u0144" +
+ "\x03\x02\x02\x02\u0145\u0146\x03\x02\x02\x02\u0146\u0147\x03\x02\x02\x02" +
+ "\u0147\u0148\x07.\x02\x02\u0148\u0149\x054\x1B\x02\u01491\x03\x02\x02" +
+ "\x02\u014A\u0152\x056\x1C\x02\u014B\u0152\x058\x1D\x02\u014C\u0152\x05" +
+ "@!\x02\u014D\u0152\x05H%\x02\u014E\u0152\x05J&\x02\u014F\u0152\x054\x1B" +
+ "\x02\u0150\u0152\x05L'\x02\u0151\u014A\x03\x02\x02\x02\u0151\u014B\x03" +
+ "\x02\x02\x02\u0151\u014C\x03\x02\x02\x02\u0151\u014D\x03\x02\x02\x02\u0151" +
+ "\u014E\x03\x02\x02\x02\u0151\u014F\x03\x02\x02\x02\u0151\u0150\x03\x02" +
+ "\x02\x02\u01523\x03\x02\x02\x02\u0153\u0154\x06\x1B\x02\x02\u0154\u0156" +
+ "\x072\x02\x02\u0155\u0157\x05\b\x05\x02\u0156\u0155\x03\x02\x02\x02\u0156" +
+ "\u0157\x03\x02\x02\x02\u0157\u0158\x03\x02\x02\x02\u0158\u0162\x073\x02" +
+ "\x02\u0159\u015A\x06\x1B\x03\x02\u015A\u015B\x072\x02\x02\u015B\u015D" +
+ "\b\x1B\x01\x02\u015C\u015E\x05\b\x05\x02\u015D\u015C\x03\x02\x02\x02\u015D" +
+ "\u015E\x03\x02\x02\x02\u015E\u015F\x03\x02\x02\x02\u015F\u0160\b\x1B\x01" +
+ "\x02\u0160\u0162\x073\x02\x02\u0161\u0153\x03\x02\x02\x02\u0161\u0159" +
+ "\x03\x02\x02\x02\u01625\x03\x02\x02\x02\u0163\u0164\b\x1C\x01\x02\u0164" +
+ "\u0165\x05\xB0Y\x02\u0165\u0166\x07*\x02\x02\u0166\u0167\b\x1C\x01\x02" +
+ "\u01677\x03\x02\x02\x02\u0168\u016B\x05:\x1E\x02\u0169\u016B\x05<\x1F" +
+ "\x02\u016A\u0168\x03\x02\x02\x02\u016A\u0169\x03\x02\x02\x02\u016B9\x03" +
+ "\x02\x02\x02\u016C\u016D\x07\x13\x02\x02\u016D\u016E\x07-\x02\x02\u016E" +
+ "\u016F\x05\xB0Y\x02\u016F\u0170\x07.\x02\x02\u0170\u0173\x052\x1A\x02" +
+ "\u0171\u0172\x07\x14\x02\x02\u0172\u0174\x052\x1A\x02\u0173\u0171\x03" +
+ "\x02\x02\x02\u0173\u0174\x03\x02\x02\x02\u0174;\x03\x02\x02\x02\u0175" +
+ "\u0176\x07\f\x02\x02\u0176\u0177\x07-\x02\x02\u0177\u0178\x05\xB0Y\x02" +
+ "\u0178\u0179\x07.\x02\x02\u0179\u017D\x072\x02\x02\u017A\u017C\x05> \x02" +
+ "\u017B\u017A\x03\x02\x02\x02\u017C\u017F\x03\x02\x02\x02\u017D\u017B\x03" +
+ "\x02\x02\x02\u017D\u017E\x03\x02\x02\x02\u017E\u0180\x03\x02\x02\x02\u017F" +
+ "\u017D\x03\x02\x02\x02\u0180\u0181\x073\x02\x02\u0181=\x03\x02\x02\x02" +
+ "\u0182\u0183\x07\r\x02\x02\u0183\u0184\x05\xB0Y\x02\u0184\u0185\x07,\x02" +
+ "\x02\u0185\u0186\x052\x1A\x02\u0186\u018B\x03\x02\x02\x02\u0187\u0188" +
+ "\x07\x0E\x02\x02\u0188\u0189\x07,\x02\x02\u0189\u018B\x052\x1A\x02\u018A" +
+ "\u0182\x03\x02\x02\x02\u018A\u0187\x03\x02\x02\x02\u018B?\x03\x02\x02" +
+ '\x02\u018C\u0190\x05B"\x02\u018D\u0190\x05D#\x02\u018E\u0190\x05F$\x02' +
+ "\u018F\u018C\x03\x02\x02\x02\u018F\u018D\x03\x02\x02\x02\u018F\u018E\x03" +
+ "\x02\x02\x02\u0190A\x03\x02\x02\x02\u0191\u0192\x07\x15\x02\x02\u0192" +
+ "\u0199\x07-\x02\x02\u0193\u0196\x05\x0E\b\x02\u0194\u0196\x05\xB0Y\x02" +
+ "\u0195\u0193\x03\x02\x02\x02\u0195\u0194\x03\x02\x02\x02\u0196\u0197\x03" +
+ '\x02\x02\x02\u0197\u0198\b"\x01\x02\u0198\u019A\x03\x02\x02\x02\u0199' +
+ "\u0195\x03\x02\x02\x02\u0199\u019A\x03\x02\x02\x02\u019A\u019B\x03\x02" +
+ "\x02\x02\u019B\u019F\x07*\x02\x02\u019C\u019D\x05\xB0Y\x02\u019D\u019E" +
+ '\b"\x01\x02\u019E\u01A0\x03\x02\x02\x02\u019F\u019C\x03\x02\x02\x02\u019F' +
+ "\u01A0\x03\x02\x02\x02\u01A0\u01A1\x03\x02\x02\x02\u01A1\u01A5\x07*\x02" +
+ '\x02\u01A2\u01A3\x05\xB0Y\x02\u01A3\u01A4\b"\x01\x02\u01A4\u01A6\x03' +
+ "\x02\x02\x02\u01A5\u01A2\x03\x02\x02\x02\u01A5\u01A6\x03\x02\x02\x02\u01A6" +
+ "\u01A7\x03\x02\x02\x02\u01A7\u01A8\x07.\x02\x02\u01A8\u01A9\x052\x1A\x02" +
+ "\u01A9C\x03\x02\x02\x02\u01AA\u01AB\x07\x12\x02\x02\u01AB\u01AC\x07-\x02" +
+ "\x02\u01AC\u01AD\x05\xB0Y\x02\u01AD\u01AE\x07.\x02\x02\u01AE\u01AF\x05" +
+ "2\x1A\x02\u01AFE\x03\x02\x02\x02\u01B0\u01B1\x07\x11\x02\x02\u01B1\u01B2" +
+ "\x052\x1A\x02\u01B2\u01B3\x07\x12\x02\x02\u01B3\u01B4\x07-\x02\x02\u01B4" +
+ "\u01B5\x05\xB0Y\x02\u01B5\u01B6\x07.\x02\x02\u01B6\u01B7\x07*\x02\x02" +
+ "\u01B7G\x03\x02\x02\x02\u01B8\u01B9\t\x03\x02\x02\u01B9\u01BA\x07*\x02" +
+ "\x02\u01BAI\x03\x02\x02\x02\u01BB\u01BD\x07\x18\x02\x02\u01BC\u01BE\x05" +
+ "\xB0Y\x02\u01BD\u01BC\x03\x02\x02\x02\u01BD\u01BE\x03\x02\x02\x02\u01BE" +
+ "\u01BF\x03\x02\x02\x02\u01BF\u01C0\x07*\x02\x02\u01C0K\x03\x02\x02\x02" +
+ "\u01C1\u01C5\x05N(\x02\u01C2\u01C4\x05P)\x02\u01C3\u01C2\x03\x02\x02\x02" +
+ "\u01C4\u01C7\x03\x02\x02\x02\u01C5\u01C3\x03\x02\x02\x02\u01C5\u01C6\x03" +
+ "\x02\x02\x02\u01C6\u01C9\x03\x02\x02\x02\u01C7\u01C5\x03\x02\x02\x02\u01C8" +
+ "\u01CA\x05R*\x02\u01C9\u01C8\x03\x02\x02\x02\u01C9\u01CA\x03\x02\x02\x02" +
+ "\u01CAM\x03\x02\x02\x02\u01CB\u01CC\x07#\x02\x02\u01CC\u01CD\x054\x1B" +
+ "\x02\u01CDO\x03\x02\x02\x02\u01CE\u01CF\x07$\x02\x02\u01CF\u01D1\x07-" +
+ "\x02\x02\u01D0\u01D2\x05\x1E\x10\x02\u01D1\u01D0\x03\x02\x02\x02\u01D1" +
+ "\u01D2\x03\x02\x02\x02\u01D2\u01D3\x03\x02\x02\x02\u01D3\u01D4\x07.\x02" +
+ "\x02\u01D4\u01D5\x054\x1B\x02\u01D5Q\x03\x02\x02\x02\u01D6\u01D7\x07%" +
+ "\x02\x02\u01D7\u01D8\x054\x1B\x02\u01D8S\x03\x02\x02\x02\u01D9\u01E4\x05" +
+ "X-\x02\u01DA\u01E4\x05V,\x02\u01DB\u01E4\x05l7\x02\u01DC\u01E4\x05n8\x02" +
+ "\u01DD\u01E4\x05Z.\x02\u01DE\u01E4\x05\\/\x02\u01DF\u01E4\x05b2\x02\u01E0" +
+ "\u01E4\x05d3\x02\u01E1\u01E4\x05j6\x02\u01E2\u01E4\x05r:\x02\u01E3\u01D9" +
+ "\x03\x02\x02\x02\u01E3\u01DA\x03\x02\x02\x02\u01E3\u01DB\x03\x02\x02\x02" +
+ "\u01E3\u01DC\x03\x02\x02\x02\u01E3\u01DD\x03\x02\x02\x02\u01E3\u01DE\x03" +
+ "\x02\x02\x02\u01E3\u01DF\x03\x02\x02\x02\u01E3\u01E0\x03\x02\x02\x02\u01E3" +
+ "\u01E1\x03\x02\x02\x02\u01E3\u01E2\x03\x02\x02\x02\u01E4U\x03\x02\x02" +
+ "\x02\u01E5\u01E6\b,\x01\x02\u01E6\u01E8\x07-\x02\x02\u01E7\u01E9\x05\x1C" +
+ "\x0F\x02\u01E8\u01E7\x03\x02\x02\x02\u01E8\u01E9\x03\x02\x02\x02\u01E9" +
+ "\u01EA\x03\x02\x02\x02\u01EA\u01EB\x07.\x02\x02\u01EB\u01EC\x07,\x02\x02" +
+ "\u01EC\u01ED\x05\xB2Z\x02\u01ED\u01F0\x07\x1A\x02\x02\u01EE\u01F1\x05" +
+ "\xB0Y\x02\u01EF\u01F1\x054\x1B\x02\u01F0\u01EE\x03\x02\x02\x02\u01F0\u01EF" +
+ "\x03\x02\x02\x02\u01F1\u01F2\x03\x02\x02\x02\u01F2\u01F3\b,\x01\x02\u01F3" +
+ "W\x03\x02\x02\x02\u01F4\u01F5\x07-\x02\x02\u01F5\u01F6\x05\xB0Y\x02\u01F6" +
+ "\u01F7\x07.\x02\x02\u01F7Y\x03\x02\x02\x02\u01F8\u01F9\t\x04\x02\x02\u01F9" +
+ "[\x03\x02\x02\x02\u01FA\u01FB\x05^0\x02\u01FB]\x03\x02\x02\x02\u01FC\u01FD" +
+ "\x07S\x02\x02\u01FD_\x03\x02\x02\x02\u01FE\u0201";
private static readonly _serializedATNSegment1: string =
- "\x03\x02\x02\x02\u020A\u020B\x03\x02\x02\x02\u020B\u020D\x07.\x02\x02" +
- "\u020C\u0206\x03\x02\x02\x02\u020C\u0207\x03\x02\x02\x02\u020Dg\x03\x02" +
- "\x02\x02\u020E\u0215\x07\\\x02\x02\u020F\u0211\x07\x03\x02\x02\u0210\u0212" +
- "\x05\xACW\x02\u0211\u0210\x03\x02\x02\x02\u0211\u0212\x03\x02\x02\x02" +
- "\u0212\u0213\x03\x02\x02\x02\u0213\u0215\x07.\x02\x02\u0214\u020E\x03" +
- "\x02\x02\x02\u0214\u020F\x03\x02\x02\x02\u0215i\x03\x02\x02\x02\u0216" +
- "\u0217\t\x06\x02\x02\u0217k\x03\x02\x02\x02\u0218\u0221\x07,\x02\x02\u0219" +
- "\u021E\x05\xACW\x02\u021A\u021B\x07&\x02\x02\u021B\u021D\x05\xACW\x02" +
- "\u021C\u021A\x03\x02\x02\x02\u021D\u0220\x03\x02\x02\x02\u021E\u021C\x03" +
- "\x02\x02\x02\u021E\u021F\x03\x02\x02\x02\u021F\u0222\x03\x02\x02\x02\u0220" +
- "\u021E\x03\x02\x02\x02\u0221\u0219\x03\x02\x02\x02\u0221\u0222\x03\x02" +
- "\x02\x02\u0222\u0224\x03\x02\x02\x02\u0223\u0225\x07&\x02\x02\u0224\u0223" +
- "\x03\x02\x02\x02\u0224\u0225\x03\x02\x02\x02\u0225\u0226\x03\x02\x02\x02" +
- "\u0226\u0227\x07-\x02\x02\u0227m\x03\x02\x02\x02\u0228\u0231\x07/\x02" +
- "\x02\u0229\u022E\x05p9\x02\u022A\u022B\x07&\x02\x02\u022B\u022D\x05p9" +
- "\x02\u022C\u022A\x03\x02\x02\x02\u022D\u0230\x03\x02\x02\x02\u022E\u022C" +
- "\x03\x02\x02\x02\u022E\u022F\x03\x02\x02\x02\u022F\u0232\x03\x02\x02\x02" +
- "\u0230\u022E\x03\x02\x02\x02\u0231\u0229\x03\x02\x02\x02\u0231\u0232\x03" +
- "\x02\x02\x02\u0232\u0234\x03\x02\x02\x02\u0233\u0235\x07&\x02\x02\u0234" +
- "\u0233\x03\x02\x02\x02\u0234\u0235\x03\x02\x02\x02\u0235\u0236\x03\x02" +
- "\x02\x02\u0236\u0237\x070\x02\x02\u0237o\x03\x02\x02\x02\u0238\u0239\x05" +
- "`1\x02\u0239\u023A\x07)\x02\x02\u023A\u023B\x05\xACW\x02\u023Bq\x03\x02" +
- "\x02\x02\u023C\u023D\t\x07\x02\x02\u023Ds\x03\x02\x02\x02\u023E\u023F" +
- "\b;\x01\x02\u023F\u024A\x05T+\x02\u0240\u0241\x07\x18\x02\x02\u0241\u0242" +
- "\x05t;\x02\u0242\u0244\x07*\x02\x02\u0243\u0245\x05v<\x02\u0244\u0243" +
- "\x03\x02\x02\x02\u0244\u0245\x03\x02\x02\x02\u0245\u0246\x03\x02\x02\x02" +
- "\u0246\u0247\x07+\x02\x02\u0247\u0248\b;\x01\x02\u0248\u024A\x03\x02\x02" +
- "\x02\u0249\u023E\x03\x02\x02\x02\u0249\u0240\x03\x02\x02\x02\u024A\u0260" +
- "\x03\x02\x02\x02\u024B\u024C\f\x07\x02\x02\u024C\u024E\x07*\x02\x02\u024D" +
- "\u024F\x05v<\x02\u024E\u024D\x03\x02\x02\x02\u024E\u024F\x03\x02\x02\x02" +
- "\u024F\u0250\x03\x02\x02\x02\u0250\u0251\x07+\x02\x02\u0251\u025F\b;\x01" +
- "\x02\u0252\u0253\f\x05\x02\x02\u0253\u0254\x05x=\x02\u0254\u0255\b;\x01" +
- "\x02\u0255\u025F\x03\x02\x02\x02\u0256\u0257\f\x04\x02\x02\u0257\u0258" +
- "\x05z>\x02\u0258\u0259\b;\x01\x02\u0259\u025F\x03\x02\x02\x02\u025A\u025B" +
- "\f\x03\x02\x02\u025B\u025C\x05|?\x02\u025C\u025D\b;\x01\x02\u025D\u025F" +
- "\x03\x02\x02\x02\u025E\u024B\x03\x02\x02\x02\u025E\u0252\x03\x02\x02\x02" +
- "\u025E\u0256\x03\x02\x02\x02\u025E\u025A\x03\x02\x02\x02\u025F\u0262\x03" +
- "\x02\x02\x02\u0260\u025E\x03\x02\x02\x02\u0260\u0261\x03\x02\x02\x02\u0261" +
- "u\x03\x02\x02\x02\u0262\u0260\x03\x02\x02\x02\u0263\u0268\x05\xA8U\x02" +
- "\u0264\u0265\x07&\x02\x02\u0265\u0267\x05\xA8U\x02\u0266\u0264\x03\x02" +
- "\x02\x02\u0267\u026A\x03\x02\x02\x02\u0268\u0266\x03\x02\x02\x02\u0268" +
- "\u0269\x03\x02\x02\x02\u0269w\x03\x02\x02\x02\u026A\u0268\x03\x02\x02" +
- "\x02\u026B\u026C\x07O\x02\x02\u026C\u026D\x05^0\x02\u026Dy\x03\x02\x02" +
- "\x02\u026E\u026F\x07,\x02\x02\u026F\u0270\x05\xACW\x02\u0270\u0271\x07" +
- "-\x02\x02\u0271{\x03\x02\x02\x02\u0272\u0276\x07,\x02\x02\u0273\u0274" +
- "\x05\xACW\x02\u0274\u0275\b?\x01\x02\u0275\u0277\x03\x02\x02\x02\u0276" +
- "\u0273\x03\x02\x02\x02\u0276\u0277\x03\x02\x02\x02\u0277\u0278\x03\x02" +
- "\x02\x02\u0278\u027C\x07)\x02\x02\u0279\u027A\x05\xACW\x02\u027A\u027B" +
- "\b?\x01\x02\u027B\u027D\x03\x02\x02\x02\u027C\u0279\x03\x02\x02\x02\u027C" +
- "\u027D\x03\x02\x02\x02\u027D\u027E\x03\x02\x02\x02\u027E\u027F\x07-\x02" +
- "\x02\u027F}\x03\x02\x02\x02\u0280\u0284\x05t;\x02\u0281\u0284\x05\x80" +
- "A\x02\u0282\u0284\x05\x82B\x02\u0283\u0280\x03\x02\x02\x02\u0283\u0281" +
- "\x03\x02\x02\x02\u0283\u0282\x03\x02\x02\x02\u0284\x7F\x03\x02\x02\x02" +
- "\u0285\u0286\x05t;\x02\u0286\u0287\x05\x8AF\x02\u0287\x81\x03\x02\x02" +
- "\x02\u0288\u028E\x07\x1F\x02\x02\u0289\u028A\x07*\x02\x02\u028A\u028B" +
- "\x05\xA8U\x02\u028B\u028C\x07+\x02\x02\u028C\u028F\x03\x02\x02\x02\u028D" +
- "\u028F\x05\xA8U\x02\u028E\u0289\x03\x02\x02\x02\u028E\u028D\x03\x02\x02" +
- "\x02\u028F\x83\x03\x02\x02\x02\u0290\u0294\x05~@\x02\u0291\u0294\x05\x86" +
- "D\x02\u0292\u0294\x05\x88E\x02\u0293\u0290\x03\x02\x02\x02\u0293\u0291" +
- "\x03\x02\x02\x02\u0293\u0292\x03\x02\x02\x02\u0294\x85\x03\x02\x02\x02" +
- "\u0295\u0296\x05\x8AF\x02\u0296\u0297\x05~@\x02\u0297\x87\x03\x02\x02" +
- "\x02\u0298\u0299\x05\x8CG\x02\u0299\u029A\x05~@\x02\u029A\x89\x03\x02" +
- "\x02\x02\u029B\u029C\t\b\x02\x02\u029C\x8B\x03\x02\x02\x02\u029D\u029E" +
- "\t\t\x02\x02\u029E\x8D\x03\x02\x02\x02\u029F\u02A5\x05\x84C\x02\u02A0" +
- "\u02A1\x05\x84C\x02\u02A1\u02A2\x07\t\x02\x02\u02A2\u02A3\x05\xAEX\x02" +
- "\u02A3\u02A5\x03\x02\x02\x02\u02A4\u029F\x03\x02\x02\x02\u02A4\u02A0\x03" +
- "\x02\x02\x02\u02A5\x8F\x03\x02\x02\x02\u02A6\u02A7\bI\x01\x02\u02A7\u02A8" +
- "\x05\x8EH\x02\u02A8\u02AE\x03\x02\x02\x02\u02A9\u02AA\f\x03\x02\x02\u02AA" +
- "\u02AB\t\n\x02\x02\u02AB\u02AD\x05\x8EH\x02\u02AC\u02A9\x03\x02\x02\x02" +
- "\u02AD\u02B0\x03\x02\x02\x02\u02AE\u02AC\x03\x02\x02\x02\u02AE\u02AF\x03" +
- "\x02\x02\x02\u02AF\x91\x03\x02\x02\x02\u02B0\u02AE\x03\x02\x02\x02\u02B1" +
- "\u02B2\bJ\x01\x02\u02B2\u02B3\x05\x90I\x02\u02B3\u02B9\x03\x02\x02\x02" +
- "\u02B4\u02B5\f\x03\x02\x02\u02B5\u02B6\t\v\x02\x02\u02B6\u02B8\x05\x90" +
- "I\x02\u02B7\u02B4\x03\x02\x02\x02\u02B8\u02BB\x03\x02\x02\x02\u02B9\u02B7" +
- "\x03\x02\x02\x02\u02B9\u02BA\x03\x02\x02\x02\u02BA\x93\x03\x02\x02\x02" +
- "\u02BB\u02B9\x03\x02\x02\x02\u02BC\u02BD\bK\x01\x02\u02BD\u02BE\x05\x92" +
- "J\x02\u02BE\u02C5\x03\x02\x02\x02\u02BF\u02C0\f\x03\x02\x02\u02C0\u02C1" +
- "\x05\x96L\x02\u02C1\u02C2\x05\x9CO\x02\u02C2\u02C4\x03\x02\x02\x02\u02C3" +
- "\u02BF\x03\x02\x02\x02\u02C4\u02C7\x03\x02\x02\x02\u02C5\u02C3\x03\x02" +
- "\x02\x02\u02C5\u02C6\x03\x02\x02\x02\u02C6\x95\x03\x02\x02\x02\u02C7\u02C5" +
- "\x03\x02\x02\x02\u02C8\u02C9\t\f\x02\x02\u02C9\x97\x03\x02\x02\x02\u02CA" +
- "\u02CB\bM\x01\x02\u02CB\u02CC\x05\x94K\x02\u02CC\u02D2\x03\x02\x02\x02" +
- "\u02CD\u02CE\f\x03\x02\x02\u02CE\u02CF\t\r\x02\x02\u02CF\u02D1\x05\x94" +
- "K\x02\u02D0\u02CD\x03\x02\x02\x02\u02D1\u02D4\x03\x02\x02\x02\u02D2\u02D0" +
- "\x03\x02\x02\x02\u02D2\u02D3\x03\x02\x02\x02\u02D3\x99\x03\x02\x02\x02" +
- "\u02D4\u02D2\x03\x02\x02\x02\u02D5\u02D6\bN\x01\x02\u02D6\u02D7\x05\x98" +
- "M\x02\u02D7\u02DD\x03\x02\x02\x02\u02D8\u02D9\f\x03\x02\x02\u02D9\u02DA" +
- "\t\x0E\x02\x02\u02DA\u02DC\x05\x98M\x02\u02DB\u02D8\x03\x02\x02\x02\u02DC" +
- "\u02DF\x03\x02\x02\x02\u02DD\u02DB\x03\x02\x02\x02\u02DD\u02DE\x03\x02" +
- "\x02\x02\u02DE\x9B\x03\x02\x02\x02\u02DF\u02DD\x03\x02\x02\x02\u02E0\u02E1" +
- "\bO\x01\x02\u02E1\u02E2\x05\x9AN\x02\u02E2\u02E8\x03\x02\x02\x02\u02E3" +
- "\u02E4\f\x03\x02\x02\u02E4\u02E5\x07H\x02\x02\u02E5\u02E7\x05\x9AN\x02" +
- "\u02E6\u02E3\x03\x02\x02\x02\u02E7\u02EA\x03\x02\x02\x02\u02E8\u02E6\x03" +
- "\x02\x02\x02\u02E8\u02E9\x03\x02\x02\x02\u02E9\x9D\x03\x02\x02\x02\u02EA" +
- "\u02E8\x03\x02\x02\x02\u02EB\u02EC\bP\x01\x02\u02EC\u02ED\x05\x9CO\x02" +
- "\u02ED\u02F3\x03\x02\x02\x02\u02EE\u02EF\f\x03\x02\x02\u02EF\u02F0\x07" +
- "J\x02\x02\u02F0\u02F2\x05\x9CO\x02\u02F1\u02EE\x03\x02\x02\x02\u02F2\u02F5" +
- "\x03\x02\x02\x02\u02F3\u02F1\x03\x02\x02\x02\u02F3\u02F4\x03\x02\x02\x02" +
- "\u02F4\x9F\x03\x02\x02\x02\u02F5\u02F3\x03\x02\x02\x02\u02F6\u02F7\bQ" +
- "\x01\x02\u02F7\u02F8\x05\x9EP\x02\u02F8\u02FE\x03\x02\x02\x02\u02F9\u02FA" +
- "\f\x03\x02\x02\u02FA\u02FB\x07I\x02\x02\u02FB\u02FD\x05\x9EP\x02\u02FC" +
- "\u02F9\x03\x02\x02\x02\u02FD\u0300\x03\x02\x02\x02\u02FE\u02FC\x03\x02" +
- "\x02\x02\u02FE\u02FF\x03\x02\x02\x02\u02FF\xA1\x03\x02\x02\x02\u0300\u02FE" +
- "\x03\x02\x02\x02\u0301\u0302\bR\x01\x02\u0302\u0303\x05\xA0Q\x02\u0303" +
- "\u0309\x03\x02\x02\x02\u0304\u0305\f\x03\x02\x02\u0305\u0306\x079\x02" +
- "\x02\u0306\u0308\x05\xA0Q\x02\u0307\u0304\x03\x02\x02\x02\u0308\u030B" +
- "\x03\x02\x02\x02\u0309\u0307\x03\x02\x02\x02\u0309\u030A\x03\x02\x02\x02" +
- "\u030A\xA3\x03\x02\x02\x02\u030B\u0309\x03\x02\x02\x02\u030C\u030D\bS" +
- "\x01\x02\u030D\u030E\x05\xA2R\x02\u030E\u0314\x03\x02\x02\x02\u030F\u0310" +
- "\f\x03\x02\x02\u0310\u0311\x07:\x02\x02\u0311\u0313\x05\xA2R\x02\u0312" +
- "\u030F\x03\x02\x02\x02\u0313\u0316\x03\x02\x02\x02\u0314\u0312\x03\x02" +
- "\x02\x02\u0314\u0315\x03\x02\x02\x02\u0315\xA5\x03\x02\x02\x02\u0316\u0314" +
- "\x03\x02\x02\x02\u0317\u031F\x05\xA4S\x02\u0318\u0319\x05\xA4S\x02\u0319" +
- "\u031A\x07(\x02\x02\u031A\u031B\x05\xA6T\x02\u031B\u031C\x07)\x02\x02" +
- "\u031C\u031D\x05\xA6T\x02\u031D\u031F\x03\x02\x02\x02\u031E\u0317\x03" +
- "\x02\x02\x02\u031E\u0318\x03\x02\x02\x02\u031F\xA7\x03\x02\x02\x02\u0320" +
- "\u0326\x05\xA6T\x02\u0321\u0322\x05t;\x02\u0322\u0323\x05\xAAV\x02\u0323" +
- "\u0324\x05\xA8U\x02\u0324\u0326\x03\x02\x02\x02\u0325\u0320\x03\x02\x02" +
- "\x02\u0325\u0321\x03\x02\x02\x02\u0326\xA9\x03\x02\x02\x02\u0327\u0328" +
- "\t\x0F\x02\x02\u0328\xAB\x03\x02\x02\x02\u0329\u032E\x05\xA8U\x02\u032A" +
- "\u032B\x07&\x02\x02\u032B\u032D\x05\xA8U\x02\u032C\u032A\x03\x02\x02\x02" +
- "\u032D\u0330\x03\x02\x02\x02\u032E\u032C\x03\x02\x02\x02\u032E\u032F\x03" +
- "\x02\x02\x02\u032F\xAD\x03\x02\x02\x02\u0330\u032E\x03\x02\x02\x02\u0331" +
- "\u0335\x05\xB0Y\x02\u0332\u0335\x05\xB2Z\x02\u0333\u0335\x05\xB4[\x02" +
- "\u0334\u0331\x03\x02\x02\x02\u0334\u0332\x03\x02\x02\x02\u0334\u0333\x03" +
- "\x02\x02\x02\u0335\xAF\x03\x02\x02\x02\u0336\u0337\x05\xB6\\\x02\u0337" +
- "\xB1\x03\x02\x02\x02\u0338\u0339\x05\xB6\\\x02\u0339\u0342\x07D\x02\x02" +
- "\u033A\u033F\x05\xAEX\x02\u033B\u033C\x07&\x02\x02\u033C\u033E\x05\xAE" +
- "X\x02\u033D\u033B\x03\x02\x02\x02\u033E\u0341\x03\x02\x02\x02\u033F\u033D" +
- "\x03\x02\x02\x02\u033F\u0340\x03\x02\x02\x02\u0340\u0343\x03\x02\x02\x02" +
- "\u0341\u033F\x03\x02\x02\x02\u0342\u033A\x03\x02\x02\x02\u0342\u0343\x03" +
- "\x02\x02\x02\u0343\u0344\x03\x02\x02\x02\u0344\u0345\x07F\x02\x02\u0345" +
- "\xB3\x03\x02\x02\x02\u0346\u0347\x07\x1F\x02\x02\u0347\u0348\x07*\x02" +
- "\x02\u0348\u0349\x05\xB6\\\x02\u0349\u034A\x07+\x02\x02\u034A\xB5\x03" +
- "\x02\x02\x02\u034B\u034C\t\x10\x02\x02\u034C\xB7\x03\x02\x02\x02P\xB9" +
- "\xC0\xC7\xCC\xD4\xE0\xEC\xF2\xF9\u0106\u010D\u0117\u0123\u0125\u012D\u0136" +
- "\u013C\u0141\u014D\u0152\u015D\u0166\u0170\u017D\u0182\u0188\u018C\u0192" +
- "\u0198\u01B0\u01B8\u01BC\u01C4\u01D6\u01DA\u01E2\u01F0\u01F8\u0200\u0204" +
- "\u0209\u020C\u0211\u0214\u021E\u0221\u0224\u022E\u0231\u0234\u0244\u0249" +
- "\u024E\u025E\u0260\u0268\u0276\u027C\u0283\u028E\u0293\u02A4\u02AE\u02B9" +
- "\u02C5\u02D2\u02DD\u02E8\u02F3\u02FE\u0309\u0314\u031E\u0325\u032E\u0334" +
- "\u033F\u0342";
+ "\x05^0\x02\u01FF\u0201\x05b2\x02\u0200\u01FE\x03\x02\x02\x02\u0200\u01FF" +
+ "\x03\x02\x02\x02\u0201a\x03\x02\x02\x02\u0202\u0203\t\x05\x02\x02\u0203" +
+ "c\x03\x02\x02\x02\u0204\u0208\x07Z\x02\x02\u0205\u0207\x05f4\x02\u0206" +
+ "\u0205\x03\x02\x02\x02\u0207\u020A\x03\x02\x02\x02\u0208\u0206\x03\x02" +
+ "\x02\x02\u0208\u0209\x03\x02\x02\x02\u0209\u020B\x03\x02\x02\x02\u020A" +
+ "\u0208\x03\x02\x02\x02\u020B\u0215\x07\\\x02\x02\u020C\u0210\x07[\x02" +
+ "\x02\u020D\u020F\x05h5\x02\u020E\u020D\x03\x02\x02\x02\u020F\u0212\x03" +
+ "\x02\x02\x02\u0210\u020E\x03\x02\x02\x02\u0210\u0211\x03\x02\x02\x02\u0211" +
+ "\u0213\x03\x02\x02\x02\u0212\u0210\x03\x02\x02\x02\u0213\u0215\x07^\x02" +
+ "\x02\u0214\u0204\x03\x02\x02\x02\u0214\u020C\x03\x02\x02\x02\u0215e\x03" +
+ "\x02\x02\x02\u0216\u021D\x07]\x02\x02\u0217\u0219\x07\x03\x02\x02\u0218" +
+ "\u021A\x05\xB0Y\x02\u0219\u0218\x03\x02\x02\x02\u0219\u021A\x03\x02\x02" +
+ "\x02\u021A\u021B\x03\x02\x02\x02\u021B\u021D\x071\x02\x02\u021C\u0216" +
+ "\x03\x02\x02\x02\u021C\u0217\x03\x02\x02\x02\u021Dg\x03\x02\x02\x02\u021E" +
+ "\u0225\x07_\x02\x02\u021F\u0221\x07\x03\x02\x02\u0220\u0222\x05\xB0Y\x02" +
+ "\u0221\u0220\x03\x02\x02\x02\u0221\u0222\x03\x02\x02\x02\u0222\u0223\x03" +
+ "\x02\x02\x02\u0223\u0225\x071\x02\x02\u0224\u021E\x03\x02\x02\x02\u0224" +
+ "\u021F\x03\x02\x02\x02\u0225i\x03\x02\x02\x02\u0226\u0227\t\x06\x02\x02" +
+ "\u0227k\x03\x02\x02\x02\u0228\u0231\x07/\x02\x02\u0229\u022E\x05\xB0Y" +
+ "\x02\u022A\u022B\x07)\x02\x02\u022B\u022D\x05\xB0Y\x02\u022C\u022A\x03" +
+ "\x02\x02\x02\u022D\u0230\x03\x02\x02\x02\u022E\u022C\x03\x02\x02\x02\u022E" +
+ "\u022F\x03\x02\x02\x02\u022F\u0232\x03\x02\x02\x02\u0230\u022E\x03\x02" +
+ "\x02\x02\u0231\u0229\x03\x02\x02\x02\u0231\u0232\x03\x02\x02\x02\u0232" +
+ "\u0234\x03\x02\x02\x02\u0233\u0235\x07)\x02\x02\u0234\u0233\x03\x02\x02" +
+ "\x02\u0234\u0235\x03\x02\x02\x02\u0235\u0236\x03\x02\x02\x02\u0236\u0237" +
+ "\x070\x02\x02\u0237m\x03\x02\x02\x02\u0238\u0241\x072\x02\x02\u0239\u023E" +
+ "\x05p9\x02\u023A\u023B\x07)\x02\x02\u023B\u023D\x05p9\x02\u023C\u023A" +
+ "\x03\x02\x02\x02\u023D\u0240\x03\x02\x02\x02\u023E\u023C\x03\x02\x02\x02" +
+ "\u023E\u023F\x03\x02\x02\x02\u023F\u0242\x03\x02\x02\x02\u0240\u023E\x03" +
+ "\x02\x02\x02\u0241\u0239\x03\x02\x02\x02\u0241\u0242\x03\x02\x02\x02\u0242" +
+ "\u0244\x03\x02\x02\x02\u0243\u0245\x07)\x02\x02\u0244\u0243\x03\x02\x02" +
+ "\x02\u0244\u0245\x03\x02\x02\x02\u0245\u0246\x03\x02\x02\x02\u0246\u0247" +
+ "\x073\x02\x02\u0247o\x03\x02\x02\x02\u0248\u0249\x05`1\x02\u0249\u024A" +
+ "\x07,\x02\x02\u024A\u024B\x05\xB0Y\x02\u024Bq\x03\x02\x02\x02\u024C\u024D" +
+ "\t\x07\x02\x02\u024Ds\x03\x02\x02\x02\u024E\u024F\b;\x01\x02\u024F\u0263" +
+ "\x05T+\x02\u0250\u0251\x07\x19\x02\x02\u0251\u0252\x05t;\x02\u0252\u0254" +
+ "\x07-\x02\x02\u0253\u0255\x05v<\x02\u0254\u0253\x03\x02\x02\x02\u0254" +
+ "\u0255\x03\x02\x02\x02\u0255\u0256\x03\x02\x02\x02\u0256\u0257\x07.\x02" +
+ "\x02\u0257\u0258\b;\x01\x02\u0258\u0263\x03\x02\x02\x02\u0259\u025A\x07" +
+ "\x1E\x02\x02\u025A\u025B\x05\xB2Z\x02\u025B\u025D\x07-\x02\x02\u025C\u025E" +
+ "\x05v<\x02\u025D\u025C\x03\x02\x02\x02\u025D\u025E\x03\x02\x02\x02\u025E" +
+ "\u025F\x03\x02\x02\x02\u025F\u0260\x07.\x02\x02\u0260\u0261\b;\x01\x02" +
+ "\u0261\u0263\x03\x02\x02\x02\u0262\u024E\x03\x02\x02\x02\u0262\u0250\x03" +
+ "\x02\x02\x02\u0262\u0259\x03\x02\x02\x02\u0263\u0279\x03\x02\x02\x02\u0264" +
+ "\u0265\f\b\x02\x02\u0265\u0266\x05x=\x02\u0266\u0267\b;\x01\x02\u0267" +
+ "\u0278\x03\x02\x02\x02\u0268\u0269\f\x07\x02\x02\u0269\u026A\x05z>\x02" +
+ "\u026A\u026B\b;\x01\x02\u026B\u0278\x03\x02\x02\x02\u026C\u026D\f\x06" +
+ "\x02\x02\u026D\u026E\x05|?\x02\u026E\u026F\b;\x01\x02\u026F\u0278\x03" +
+ "\x02\x02\x02\u0270\u0271\f\x05\x02\x02\u0271\u0273\x07-\x02\x02\u0272" +
+ "\u0274\x05v<\x02\u0273\u0272\x03\x02\x02\x02\u0273\u0274\x03\x02\x02\x02" +
+ "\u0274\u0275\x03\x02\x02\x02\u0275\u0276\x07.\x02\x02\u0276\u0278\b;\x01" +
+ "\x02\u0277\u0264\x03\x02\x02\x02\u0277\u0268\x03\x02\x02\x02\u0277\u026C" +
+ "\x03\x02\x02\x02\u0277\u0270\x03\x02\x02\x02\u0278\u027B\x03\x02\x02\x02" +
+ "\u0279\u0277\x03\x02\x02\x02\u0279\u027A\x03\x02\x02\x02\u027Au\x03\x02" +
+ "\x02\x02\u027B\u0279\x03\x02\x02\x02\u027C\u0281\x05\xACW\x02\u027D\u027E" +
+ "\x07)\x02\x02\u027E\u0280\x05\xACW\x02\u027F\u027D\x03\x02\x02\x02\u0280" +
+ "\u0283\x03\x02\x02\x02\u0281\u027F\x03\x02\x02\x02\u0281\u0282\x03\x02" +
+ "\x02\x02\u0282w\x03\x02\x02\x02\u0283\u0281\x03\x02\x02\x02\u0284\u0285" +
+ "\x07R\x02\x02\u0285\u0286\x05^0\x02\u0286y\x03\x02\x02\x02\u0287\u0288" +
+ "\x07/\x02\x02\u0288\u0289\x05\xB0Y\x02\u0289\u028A\x070\x02\x02\u028A" +
+ "{\x03\x02\x02\x02\u028B\u028F\x07/\x02\x02\u028C\u028D\x05\xB0Y\x02\u028D" +
+ "\u028E\b?\x01\x02\u028E\u0290\x03\x02\x02\x02\u028F\u028C\x03\x02\x02" +
+ "\x02\u028F\u0290\x03\x02\x02\x02\u0290\u0291\x03\x02\x02\x02\u0291\u0295" +
+ "\x07,\x02\x02\u0292\u0293\x05\xB0Y\x02\u0293\u0294\b?\x01\x02\u0294\u0296" +
+ "\x03\x02\x02\x02\u0295\u0292\x03\x02\x02\x02\u0295\u0296\x03\x02\x02\x02" +
+ "\u0296\u0297\x03\x02\x02\x02\u0297\u0298\x070\x02\x02\u0298}\x03\x02\x02" +
+ "\x02\u0299\u029D\x05t;\x02\u029A\u029D\x05\x80A\x02\u029B\u029D\x05\x82" +
+ "B\x02\u029C\u0299\x03\x02\x02\x02\u029C\u029A\x03\x02\x02\x02\u029C\u029B" +
+ "\x03\x02\x02\x02\u029D\x7F\x03\x02\x02\x02\u029E\u029F\x05t;\x02\u029F" +
+ '\u02A0\x05\x8AF\x02\u02A0\x81\x03\x02\x02\x02\u02A1\u02A2\x07"\x02\x02' +
+ "\u02A2\u02A3\x05\xACW\x02\u02A3\x83\x03\x02\x02\x02\u02A4\u02A8\x05~@" +
+ "\x02\u02A5\u02A8\x05\x86D\x02\u02A6\u02A8\x05\x88E\x02\u02A7\u02A4\x03" +
+ "\x02\x02\x02\u02A7\u02A5\x03\x02\x02\x02\u02A7\u02A6\x03\x02\x02\x02\u02A8" +
+ "\x85\x03\x02\x02\x02\u02A9\u02AA\x05\x8AF\x02\u02AA\u02AB\x05~@\x02\u02AB" +
+ "\x87\x03\x02\x02\x02\u02AC\u02AD\x05\x8CG\x02\u02AD\u02AE\x05~@\x02\u02AE" +
+ "\x89\x03\x02\x02\x02\u02AF\u02B0\t\b\x02\x02\u02B0\x8B\x03\x02\x02\x02" +
+ "\u02B1\u02B2\t\t\x02\x02\u02B2\x8D\x03\x02\x02\x02\u02B3\u02B9\x05\x84" +
+ "C\x02\u02B4\u02B5\x05\x84C\x02\u02B5\u02B6\x07\n\x02\x02\u02B6\u02B7\x05" +
+ "\xB2Z\x02\u02B7\u02B9\x03\x02\x02\x02\u02B8\u02B3\x03\x02\x02\x02\u02B8" +
+ "\u02B4\x03\x02\x02\x02\u02B9\x8F\x03\x02\x02\x02\u02BA\u02BB\bI\x01\x02" +
+ "\u02BB\u02BC\x05\x8EH\x02\u02BC\u02C2\x03\x02\x02\x02\u02BD\u02BE\f\x03" +
+ "\x02\x02\u02BE\u02BF\t\n\x02\x02\u02BF\u02C1\x05\x8EH\x02\u02C0\u02BD" +
+ "\x03\x02\x02\x02\u02C1\u02C4\x03\x02\x02\x02\u02C2\u02C0\x03\x02\x02\x02" +
+ "\u02C2\u02C3\x03\x02\x02\x02\u02C3\x91\x03\x02\x02\x02\u02C4\u02C2\x03" +
+ "\x02\x02\x02\u02C5\u02C6\bJ\x01\x02\u02C6\u02C7\x05\x90I\x02\u02C7\u02CD" +
+ "\x03\x02\x02\x02\u02C8\u02C9\f\x03\x02\x02\u02C9\u02CA\t\v\x02\x02\u02CA" +
+ "\u02CC\x05\x90I\x02\u02CB\u02C8\x03\x02\x02\x02\u02CC\u02CF\x03\x02\x02" +
+ "\x02\u02CD\u02CB\x03\x02\x02\x02\u02CD\u02CE\x03\x02\x02\x02\u02CE\x93" +
+ "\x03\x02\x02\x02\u02CF\u02CD\x03\x02\x02\x02\u02D0\u02D1\bK\x01\x02\u02D1" +
+ "\u02D2\x05\x92J\x02\u02D2\u02D9\x03\x02\x02\x02\u02D3\u02D4\f\x03\x02" +
+ "\x02\u02D4\u02D5\x05\x96L\x02\u02D5\u02D6\x05\xA0Q\x02\u02D6\u02D8\x03" +
+ "\x02\x02\x02\u02D7\u02D3\x03\x02\x02\x02\u02D8\u02DB\x03\x02\x02\x02\u02D9" +
+ "\u02D7\x03\x02\x02\x02\u02D9\u02DA\x03\x02\x02\x02\u02DA\x95\x03\x02\x02" +
+ "\x02\u02DB\u02D9\x03\x02\x02\x02\u02DC\u02DD\t\f\x02\x02\u02DD\x97\x03" +
+ "\x02\x02\x02\u02DE\u02DF\bM\x01\x02\u02DF\u02E0\x05\x94K\x02\u02E0\u02E6" +
+ "\x03\x02\x02\x02\u02E1\u02E2\f\x03\x02\x02\u02E2\u02E3\x07\x07\x02\x02" +
+ "\u02E3\u02E5\x05\xB2Z\x02\u02E4\u02E1\x03\x02\x02\x02\u02E5\u02E8\x03" +
+ "\x02\x02\x02\u02E6\u02E4\x03\x02\x02\x02\u02E6\u02E7\x03\x02\x02\x02\u02E7" +
+ "\x99\x03\x02\x02\x02\u02E8\u02E6\x03\x02\x02\x02\u02E9\u02EA\bN\x01\x02" +
+ "\u02EA\u02EB\x05\x98M\x02\u02EB\u02F1\x03\x02\x02\x02\u02EC\u02ED\f\x03" +
+ "\x02\x02\u02ED\u02EE\x07!\x02\x02\u02EE\u02F0\x05\xB2Z\x02\u02EF\u02EC" +
+ "\x03\x02\x02\x02\u02F0\u02F3\x03\x02\x02\x02\u02F1\u02EF\x03\x02\x02\x02" +
+ "\u02F1\u02F2\x03\x02\x02\x02\u02F2\x9B\x03\x02\x02\x02\u02F3\u02F1\x03" +
+ "\x02\x02\x02\u02F4\u02F5\bO\x01\x02\u02F5\u02F6\x05\x9AN\x02\u02F6\u02FC" +
+ "\x03\x02\x02\x02\u02F7\u02F8\f\x03\x02\x02\u02F8\u02F9\t\r\x02\x02\u02F9" +
+ "\u02FB\x05\x9CO\x04\u02FA\u02F7\x03\x02\x02\x02\u02FB\u02FE\x03\x02\x02" +
+ "\x02\u02FC\u02FA\x03\x02\x02\x02\u02FC\u02FD\x03\x02\x02\x02\u02FD\x9D" +
+ "\x03\x02\x02\x02\u02FE\u02FC\x03\x02\x02\x02\u02FF\u0300\bP\x01\x02\u0300" +
+ "\u0301\x05\x9CO\x02\u0301\u0307\x03\x02\x02\x02\u0302\u0303\f\x03\x02" +
+ "\x02\u0303\u0304\t\x0E\x02\x02\u0304\u0306\x05\x9CO\x02\u0305\u0302\x03" +
+ "\x02\x02\x02\u0306\u0309\x03\x02\x02\x02\u0307\u0305\x03\x02\x02\x02\u0307" +
+ "\u0308\x03\x02\x02\x02\u0308\x9F\x03\x02\x02\x02\u0309\u0307\x03\x02\x02" +
+ "\x02\u030A\u030B\bQ\x01\x02\u030B\u030C\x05\x9EP\x02\u030C\u0312\x03\x02" +
+ "\x02\x02\u030D\u030E\f\x03\x02\x02\u030E\u030F\x07K\x02\x02\u030F\u0311" +
+ "\x05\x9EP\x02\u0310\u030D\x03\x02\x02\x02\u0311\u0314\x03\x02\x02\x02" +
+ "\u0312\u0310\x03\x02\x02\x02\u0312\u0313\x03\x02\x02\x02\u0313\xA1\x03" +
+ "\x02\x02\x02\u0314\u0312\x03\x02\x02\x02\u0315\u0316\bR\x01\x02\u0316" +
+ "\u0317\x05\xA0Q\x02\u0317\u031D\x03\x02\x02\x02\u0318\u0319\f\x03\x02" +
+ "\x02\u0319\u031A\x07M\x02\x02\u031A\u031C\x05\xA0Q\x02\u031B\u0318\x03" +
+ "\x02\x02\x02\u031C\u031F\x03\x02\x02\x02\u031D\u031B\x03\x02\x02\x02\u031D" +
+ "\u031E\x03\x02\x02\x02\u031E\xA3\x03\x02\x02\x02\u031F\u031D\x03\x02\x02" +
+ "\x02\u0320\u0321\bS\x01\x02\u0321\u0322\x05\xA2R\x02\u0322\u0328\x03\x02" +
+ "\x02\x02\u0323\u0324\f\x03\x02\x02\u0324\u0325\x07L\x02\x02\u0325\u0327" +
+ "\x05\xA2R\x02\u0326\u0323\x03\x02\x02\x02\u0327\u032A\x03\x02\x02\x02" +
+ "\u0328\u0326\x03\x02\x02\x02\u0328\u0329\x03\x02\x02\x02\u0329\xA5\x03" +
+ "\x02\x02\x02\u032A\u0328\x03\x02\x02\x02\u032B\u032C\bT\x01\x02\u032C" +
+ "\u032D\x05\xA4S\x02\u032D\u0333\x03\x02\x02\x02\u032E\u032F\f\x03\x02" +
+ "\x02\u032F\u0330\x07<\x02\x02\u0330\u0332\x05\xA4S\x02\u0331\u032E\x03" +
+ "\x02\x02\x02\u0332\u0335\x03\x02\x02\x02\u0333\u0331\x03\x02\x02\x02\u0333" +
+ "\u0334\x03\x02\x02\x02\u0334\xA7\x03\x02\x02\x02\u0335\u0333\x03\x02\x02" +
+ "\x02\u0336\u0337\bU\x01\x02\u0337\u0338\x05\xA6T\x02\u0338\u033E\x03\x02" +
+ "\x02\x02\u0339\u033A\f\x03\x02\x02\u033A\u033B\x07=\x02\x02\u033B\u033D" +
+ "\x05\xA6T\x02\u033C\u0339\x03\x02\x02\x02\u033D\u0340\x03\x02\x02\x02" +
+ "\u033E\u033C\x03\x02\x02\x02\u033E\u033F\x03\x02\x02\x02\u033F\xA9\x03" +
+ "\x02\x02\x02\u0340\u033E\x03\x02\x02\x02\u0341\u0349\x05\xA8U\x02\u0342" +
+ "\u0343\x05\xA8U\x02\u0343\u0344\x07+\x02\x02\u0344\u0345\x05\xAAV\x02" +
+ "\u0345\u0346\x07,\x02\x02\u0346\u0347\x05\xAAV\x02\u0347\u0349\x03\x02" +
+ "\x02\x02\u0348\u0341\x03\x02\x02\x02\u0348\u0342\x03\x02\x02\x02\u0349" +
+ "\xAB\x03\x02\x02\x02\u034A\u0350\x05\xAAV\x02\u034B\u034C\x05t;\x02\u034C" +
+ "\u034D\x05\xAEX\x02\u034D\u034E\x05\xACW\x02\u034E\u0350\x03\x02\x02\x02" +
+ "\u034F\u034A\x03\x02\x02\x02\u034F\u034B\x03\x02\x02\x02\u0350\xAD\x03" +
+ "\x02\x02\x02\u0351\u0352\t\x0F\x02\x02\u0352\xAF\x03\x02\x02\x02\u0353" +
+ "\u0358\x05\xACW\x02\u0354\u0355\x07)\x02\x02\u0355\u0357\x05\xACW\x02" +
+ "\u0356\u0354\x03\x02\x02\x02\u0357\u035A\x03\x02\x02\x02\u0358\u0356\x03" +
+ "\x02\x02\x02\u0358\u0359\x03\x02\x02\x02\u0359\xB1\x03\x02\x02\x02\u035A" +
+ "\u0358\x03\x02\x02\x02\u035B\u035F\x05\xB4[\x02\u035C\u035F\x05\xB6\\" +
+ "\x02\u035D\u035F\x05\xB8]\x02\u035E\u035B\x03\x02\x02\x02\u035E\u035C" +
+ "\x03\x02\x02\x02\u035E\u035D\x03\x02\x02\x02\u035F\xB3\x03\x02\x02\x02" +
+ "\u0360\u0361\x05\xBA^\x02\u0361\xB5\x03\x02\x02\x02\u0362\u0363\x05\xBA" +
+ "^\x02\u0363\u036C\x07G\x02\x02\u0364\u0369\x05\xB2Z\x02\u0365\u0366\x07" +
+ ")\x02\x02\u0366\u0368\x05\xB2Z\x02\u0367\u0365\x03\x02\x02\x02\u0368\u036B" +
+ "\x03\x02\x02\x02\u0369\u0367\x03\x02\x02\x02\u0369\u036A\x03\x02\x02\x02" +
+ "\u036A\u036D\x03\x02\x02\x02\u036B\u0369\x03\x02\x02\x02\u036C\u0364\x03" +
+ "\x02\x02\x02\u036C\u036D\x03\x02\x02\x02\u036D\u036E\x03\x02\x02\x02\u036E" +
+ '\u036F\x07I\x02\x02\u036F\xB7\x03\x02\x02\x02\u0370\u0371\x07"\x02\x02' +
+ "\u0371\u0372\x07-\x02\x02\u0372\u0373\x05\xBA^\x02\u0373\u0374\x07.\x02" +
+ "\x02\u0374\xB9\x03\x02\x02\x02\u0375\u0376\t\x10\x02\x02\u0376\xBB\x03" +
+ "\x02\x02\x02T\xBD\xC4\xCB\xD0\xD8\xE4\xF0\xF6\xFD\u010A\u0111\u011B\u0127" +
+ "\u0129\u0131\u013A\u0140\u0145\u0151\u0156\u015D\u0161\u016A\u0173\u017D" +
+ "\u018A\u018F\u0195\u0199\u019F\u01A5\u01BD\u01C5\u01C9\u01D1\u01E3\u01E8" +
+ "\u01F0\u0200\u0208\u0210\u0214\u0219\u021C\u0221\u0224\u022E\u0231\u0234" +
+ "\u023E\u0241\u0244\u0254\u025D\u0262\u0273\u0277\u0279\u0281\u028F\u0295" +
+ "\u029C\u02A7\u02B8\u02C2\u02CD\u02D9\u02E6\u02F1\u02FC\u0307\u0312\u031D" +
+ "\u0328\u0333\u033E\u0348\u034F\u0358\u035E\u0369\u036C";
public static readonly _serializedATN: string = Utils.join(
[KipperParser._serializedATNSegment0, KipperParser._serializedATNSegment1],
"",
@@ -8233,18 +8512,12 @@ export class PassOncomputedPrimaryExpressionContext extends ComputedPrimaryExpre
}
}
}
-export class FunctionCallExpressionContext extends ComputedPrimaryExpressionContext {
+export class DotNotationMemberAccessExpressionContext extends ComputedPrimaryExpressionContext {
public computedPrimaryExpression(): ComputedPrimaryExpressionContext {
return this.getRuleContext(0, ComputedPrimaryExpressionContext);
}
- public LeftParen(): TerminalNode {
- return this.getToken(KipperParser.LeftParen, 0);
- }
- public RightParen(): TerminalNode {
- return this.getToken(KipperParser.RightParen, 0);
- }
- public argumentExpressionList(): ArgumentExpressionListContext | undefined {
- return this.tryGetRuleContext(0, ArgumentExpressionListContext);
+ public dotNotation(): DotNotationContext {
+ return this.getRuleContext(0, DotNotationContext);
}
constructor(ctx: ComputedPrimaryExpressionContext) {
super(ctx.parent, ctx.invokingState);
@@ -8252,40 +8525,31 @@ export class FunctionCallExpressionContext extends ComputedPrimaryExpressionCont
}
// @Override
public enterRule(listener: KipperParserListener): void {
- if (listener.enterFunctionCallExpression) {
- listener.enterFunctionCallExpression(this);
+ if (listener.enterDotNotationMemberAccessExpression) {
+ listener.enterDotNotationMemberAccessExpression(this);
}
}
// @Override
public exitRule(listener: KipperParserListener): void {
- if (listener.exitFunctionCallExpression) {
- listener.exitFunctionCallExpression(this);
+ if (listener.exitDotNotationMemberAccessExpression) {
+ listener.exitDotNotationMemberAccessExpression(this);
}
}
// @Override
public accept(visitor: KipperParserVisitor): Result {
- if (visitor.visitFunctionCallExpression) {
- return visitor.visitFunctionCallExpression(this);
+ if (visitor.visitDotNotationMemberAccessExpression) {
+ return visitor.visitDotNotationMemberAccessExpression(this);
} else {
return visitor.visitChildren(this);
}
}
}
-export class ExplicitCallFunctionCallExpressionContext extends ComputedPrimaryExpressionContext {
- public CallFunc(): TerminalNode {
- return this.getToken(KipperParser.CallFunc, 0);
- }
+export class BracketNotationMemberAccessExpressionContext extends ComputedPrimaryExpressionContext {
public computedPrimaryExpression(): ComputedPrimaryExpressionContext {
return this.getRuleContext(0, ComputedPrimaryExpressionContext);
}
- public LeftParen(): TerminalNode {
- return this.getToken(KipperParser.LeftParen, 0);
- }
- public RightParen(): TerminalNode {
- return this.getToken(KipperParser.RightParen, 0);
- }
- public argumentExpressionList(): ArgumentExpressionListContext | undefined {
- return this.tryGetRuleContext(0, ArgumentExpressionListContext);
+ public bracketNotation(): BracketNotationContext {
+ return this.getRuleContext(0, BracketNotationContext);
}
constructor(ctx: ComputedPrimaryExpressionContext) {
super(ctx.parent, ctx.invokingState);
@@ -8293,31 +8557,31 @@ export class ExplicitCallFunctionCallExpressionContext extends ComputedPrimaryEx
}
// @Override
public enterRule(listener: KipperParserListener): void {
- if (listener.enterExplicitCallFunctionCallExpression) {
- listener.enterExplicitCallFunctionCallExpression(this);
+ if (listener.enterBracketNotationMemberAccessExpression) {
+ listener.enterBracketNotationMemberAccessExpression(this);
}
}
// @Override
public exitRule(listener: KipperParserListener): void {
- if (listener.exitExplicitCallFunctionCallExpression) {
- listener.exitExplicitCallFunctionCallExpression(this);
+ if (listener.exitBracketNotationMemberAccessExpression) {
+ listener.exitBracketNotationMemberAccessExpression(this);
}
}
// @Override
public accept(visitor: KipperParserVisitor): Result {
- if (visitor.visitExplicitCallFunctionCallExpression) {
- return visitor.visitExplicitCallFunctionCallExpression(this);
+ if (visitor.visitBracketNotationMemberAccessExpression) {
+ return visitor.visitBracketNotationMemberAccessExpression(this);
} else {
return visitor.visitChildren(this);
}
}
}
-export class DotNotationMemberAccessExpressionContext extends ComputedPrimaryExpressionContext {
+export class SliceNotationMemberAccessExpressionContext extends ComputedPrimaryExpressionContext {
public computedPrimaryExpression(): ComputedPrimaryExpressionContext {
return this.getRuleContext(0, ComputedPrimaryExpressionContext);
}
- public dotNotation(): DotNotationContext {
- return this.getRuleContext(0, DotNotationContext);
+ public sliceNotation(): SliceNotationContext {
+ return this.getRuleContext(0, SliceNotationContext);
}
constructor(ctx: ComputedPrimaryExpressionContext) {
super(ctx.parent, ctx.invokingState);
@@ -8325,31 +8589,37 @@ export class DotNotationMemberAccessExpressionContext extends ComputedPrimaryExp
}
// @Override
public enterRule(listener: KipperParserListener): void {
- if (listener.enterDotNotationMemberAccessExpression) {
- listener.enterDotNotationMemberAccessExpression(this);
+ if (listener.enterSliceNotationMemberAccessExpression) {
+ listener.enterSliceNotationMemberAccessExpression(this);
}
}
// @Override
public exitRule(listener: KipperParserListener): void {
- if (listener.exitDotNotationMemberAccessExpression) {
- listener.exitDotNotationMemberAccessExpression(this);
+ if (listener.exitSliceNotationMemberAccessExpression) {
+ listener.exitSliceNotationMemberAccessExpression(this);
}
}
// @Override
public accept(visitor: KipperParserVisitor): Result {
- if (visitor.visitDotNotationMemberAccessExpression) {
- return visitor.visitDotNotationMemberAccessExpression(this);
+ if (visitor.visitSliceNotationMemberAccessExpression) {
+ return visitor.visitSliceNotationMemberAccessExpression(this);
} else {
return visitor.visitChildren(this);
}
}
}
-export class BracketNotationMemberAccessExpressionContext extends ComputedPrimaryExpressionContext {
+export class FunctionCallExpressionContext extends ComputedPrimaryExpressionContext {
public computedPrimaryExpression(): ComputedPrimaryExpressionContext {
return this.getRuleContext(0, ComputedPrimaryExpressionContext);
}
- public bracketNotation(): BracketNotationContext {
- return this.getRuleContext(0, BracketNotationContext);
+ public LeftParen(): TerminalNode {
+ return this.getToken(KipperParser.LeftParen, 0);
+ }
+ public RightParen(): TerminalNode {
+ return this.getToken(KipperParser.RightParen, 0);
+ }
+ public argumentExpressionList(): ArgumentExpressionListContext | undefined {
+ return this.tryGetRuleContext(0, ArgumentExpressionListContext);
}
constructor(ctx: ComputedPrimaryExpressionContext) {
super(ctx.parent, ctx.invokingState);
@@ -8357,31 +8627,40 @@ export class BracketNotationMemberAccessExpressionContext extends ComputedPrimar
}
// @Override
public enterRule(listener: KipperParserListener): void {
- if (listener.enterBracketNotationMemberAccessExpression) {
- listener.enterBracketNotationMemberAccessExpression(this);
+ if (listener.enterFunctionCallExpression) {
+ listener.enterFunctionCallExpression(this);
}
}
// @Override
public exitRule(listener: KipperParserListener): void {
- if (listener.exitBracketNotationMemberAccessExpression) {
- listener.exitBracketNotationMemberAccessExpression(this);
+ if (listener.exitFunctionCallExpression) {
+ listener.exitFunctionCallExpression(this);
}
}
// @Override
public accept(visitor: KipperParserVisitor): Result {
- if (visitor.visitBracketNotationMemberAccessExpression) {
- return visitor.visitBracketNotationMemberAccessExpression(this);
+ if (visitor.visitFunctionCallExpression) {
+ return visitor.visitFunctionCallExpression(this);
} else {
return visitor.visitChildren(this);
}
}
}
-export class SliceNotationMemberAccessExpressionContext extends ComputedPrimaryExpressionContext {
+export class ExplicitCallFunctionCallExpressionContext extends ComputedPrimaryExpressionContext {
+ public CallFunc(): TerminalNode {
+ return this.getToken(KipperParser.CallFunc, 0);
+ }
public computedPrimaryExpression(): ComputedPrimaryExpressionContext {
return this.getRuleContext(0, ComputedPrimaryExpressionContext);
}
- public sliceNotation(): SliceNotationContext {
- return this.getRuleContext(0, SliceNotationContext);
+ public LeftParen(): TerminalNode {
+ return this.getToken(KipperParser.LeftParen, 0);
+ }
+ public RightParen(): TerminalNode {
+ return this.getToken(KipperParser.RightParen, 0);
+ }
+ public argumentExpressionList(): ArgumentExpressionListContext | undefined {
+ return this.tryGetRuleContext(0, ArgumentExpressionListContext);
}
constructor(ctx: ComputedPrimaryExpressionContext) {
super(ctx.parent, ctx.invokingState);
@@ -8389,20 +8668,61 @@ export class SliceNotationMemberAccessExpressionContext extends ComputedPrimaryE
}
// @Override
public enterRule(listener: KipperParserListener): void {
- if (listener.enterSliceNotationMemberAccessExpression) {
- listener.enterSliceNotationMemberAccessExpression(this);
+ if (listener.enterExplicitCallFunctionCallExpression) {
+ listener.enterExplicitCallFunctionCallExpression(this);
}
}
// @Override
public exitRule(listener: KipperParserListener): void {
- if (listener.exitSliceNotationMemberAccessExpression) {
- listener.exitSliceNotationMemberAccessExpression(this);
+ if (listener.exitExplicitCallFunctionCallExpression) {
+ listener.exitExplicitCallFunctionCallExpression(this);
}
}
// @Override
public accept(visitor: KipperParserVisitor): Result {
- if (visitor.visitSliceNotationMemberAccessExpression) {
- return visitor.visitSliceNotationMemberAccessExpression(this);
+ if (visitor.visitExplicitCallFunctionCallExpression) {
+ return visitor.visitExplicitCallFunctionCallExpression(this);
+ } else {
+ return visitor.visitChildren(this);
+ }
+ }
+}
+export class NewInstantiationExpressionContext extends ComputedPrimaryExpressionContext {
+ public New(): TerminalNode {
+ return this.getToken(KipperParser.New, 0);
+ }
+ public typeSpecifierExpression(): TypeSpecifierExpressionContext {
+ return this.getRuleContext(0, TypeSpecifierExpressionContext);
+ }
+ public LeftParen(): TerminalNode {
+ return this.getToken(KipperParser.LeftParen, 0);
+ }
+ public RightParen(): TerminalNode {
+ return this.getToken(KipperParser.RightParen, 0);
+ }
+ public argumentExpressionList(): ArgumentExpressionListContext | undefined {
+ return this.tryGetRuleContext(0, ArgumentExpressionListContext);
+ }
+ constructor(ctx: ComputedPrimaryExpressionContext) {
+ super(ctx.parent, ctx.invokingState);
+ this.copyFrom(ctx);
+ }
+ // @Override
+ public enterRule(listener: KipperParserListener): void {
+ if (listener.enterNewInstantiationExpression) {
+ listener.enterNewInstantiationExpression(this);
+ }
+ }
+ // @Override
+ public exitRule(listener: KipperParserListener): void {
+ if (listener.exitNewInstantiationExpression) {
+ listener.exitNewInstantiationExpression(this);
+ }
+ }
+ // @Override
+ public accept(visitor: KipperParserVisitor): Result {
+ if (visitor.visitNewInstantiationExpression) {
+ return visitor.visitNewInstantiationExpression(this);
} else {
return visitor.visitChildren(this);
}
@@ -8661,14 +8981,8 @@ export class TypeofExpressionContext extends KipperParserRuleContext {
public Typeof(): TerminalNode {
return this.getToken(KipperParser.Typeof, 0);
}
- public LeftParen(): TerminalNode | undefined {
- return this.tryGetToken(KipperParser.LeftParen, 0);
- }
- public assignmentExpression(): AssignmentExpressionContext | undefined {
- return this.tryGetRuleContext(0, AssignmentExpressionContext);
- }
- public RightParen(): TerminalNode | undefined {
- return this.tryGetToken(KipperParser.RightParen, 0);
+ public assignmentExpression(): AssignmentExpressionContext {
+ return this.getRuleContext(0, AssignmentExpressionContext);
}
constructor(parent: ParserRuleContext | undefined, invokingState: number) {
super(parent, invokingState);
@@ -9247,6 +9561,160 @@ export class BitwiseShiftOperatorsContext extends KipperParserRuleContext {
}
}
+export class InstanceOfExpressionContext extends KipperParserRuleContext {
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
+ super(parent, invokingState);
+ }
+ // @Override
+ public get ruleIndex(): number {
+ return KipperParser.RULE_instanceOfExpression;
+ }
+ public copyFrom(ctx: InstanceOfExpressionContext): void {
+ super.copyFrom(ctx);
+ }
+}
+export class PassOnInstanceOfExpressionContext extends InstanceOfExpressionContext {
+ public bitwiseShiftExpression(): BitwiseShiftExpressionContext {
+ return this.getRuleContext(0, BitwiseShiftExpressionContext);
+ }
+ constructor(ctx: InstanceOfExpressionContext) {
+ super(ctx.parent, ctx.invokingState);
+ this.copyFrom(ctx);
+ }
+ // @Override
+ public enterRule(listener: KipperParserListener): void {
+ if (listener.enterPassOnInstanceOfExpression) {
+ listener.enterPassOnInstanceOfExpression(this);
+ }
+ }
+ // @Override
+ public exitRule(listener: KipperParserListener): void {
+ if (listener.exitPassOnInstanceOfExpression) {
+ listener.exitPassOnInstanceOfExpression(this);
+ }
+ }
+ // @Override
+ public accept(visitor: KipperParserVisitor): Result {
+ if (visitor.visitPassOnInstanceOfExpression) {
+ return visitor.visitPassOnInstanceOfExpression(this);
+ } else {
+ return visitor.visitChildren(this);
+ }
+ }
+}
+export class ActualInstanceOfExpressionContext extends InstanceOfExpressionContext {
+ public instanceOfExpression(): InstanceOfExpressionContext {
+ return this.getRuleContext(0, InstanceOfExpressionContext);
+ }
+ public InstanceOf(): TerminalNode {
+ return this.getToken(KipperParser.InstanceOf, 0);
+ }
+ public typeSpecifierExpression(): TypeSpecifierExpressionContext {
+ return this.getRuleContext(0, TypeSpecifierExpressionContext);
+ }
+ constructor(ctx: InstanceOfExpressionContext) {
+ super(ctx.parent, ctx.invokingState);
+ this.copyFrom(ctx);
+ }
+ // @Override
+ public enterRule(listener: KipperParserListener): void {
+ if (listener.enterActualInstanceOfExpression) {
+ listener.enterActualInstanceOfExpression(this);
+ }
+ }
+ // @Override
+ public exitRule(listener: KipperParserListener): void {
+ if (listener.exitActualInstanceOfExpression) {
+ listener.exitActualInstanceOfExpression(this);
+ }
+ }
+ // @Override
+ public accept(visitor: KipperParserVisitor): Result {
+ if (visitor.visitActualInstanceOfExpression) {
+ return visitor.visitActualInstanceOfExpression(this);
+ } else {
+ return visitor.visitChildren(this);
+ }
+ }
+}
+
+export class MatchesExpressionContext extends KipperParserRuleContext {
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
+ super(parent, invokingState);
+ }
+ // @Override
+ public get ruleIndex(): number {
+ return KipperParser.RULE_matchesExpression;
+ }
+ public copyFrom(ctx: MatchesExpressionContext): void {
+ super.copyFrom(ctx);
+ }
+}
+export class PassOnMatchesExpressionContext extends MatchesExpressionContext {
+ public instanceOfExpression(): InstanceOfExpressionContext {
+ return this.getRuleContext(0, InstanceOfExpressionContext);
+ }
+ constructor(ctx: MatchesExpressionContext) {
+ super(ctx.parent, ctx.invokingState);
+ this.copyFrom(ctx);
+ }
+ // @Override
+ public enterRule(listener: KipperParserListener): void {
+ if (listener.enterPassOnMatchesExpression) {
+ listener.enterPassOnMatchesExpression(this);
+ }
+ }
+ // @Override
+ public exitRule(listener: KipperParserListener): void {
+ if (listener.exitPassOnMatchesExpression) {
+ listener.exitPassOnMatchesExpression(this);
+ }
+ }
+ // @Override
+ public accept(visitor: KipperParserVisitor): Result {
+ if (visitor.visitPassOnMatchesExpression) {
+ return visitor.visitPassOnMatchesExpression(this);
+ } else {
+ return visitor.visitChildren(this);
+ }
+ }
+}
+export class ActualMatchesExpressionContext extends MatchesExpressionContext {
+ public matchesExpression(): MatchesExpressionContext {
+ return this.getRuleContext(0, MatchesExpressionContext);
+ }
+ public Matches(): TerminalNode {
+ return this.getToken(KipperParser.Matches, 0);
+ }
+ public typeSpecifierExpression(): TypeSpecifierExpressionContext {
+ return this.getRuleContext(0, TypeSpecifierExpressionContext);
+ }
+ constructor(ctx: MatchesExpressionContext) {
+ super(ctx.parent, ctx.invokingState);
+ this.copyFrom(ctx);
+ }
+ // @Override
+ public enterRule(listener: KipperParserListener): void {
+ if (listener.enterActualMatchesExpression) {
+ listener.enterActualMatchesExpression(this);
+ }
+ }
+ // @Override
+ public exitRule(listener: KipperParserListener): void {
+ if (listener.exitActualMatchesExpression) {
+ listener.exitActualMatchesExpression(this);
+ }
+ }
+ // @Override
+ public accept(visitor: KipperParserVisitor): Result {
+ if (visitor.visitActualMatchesExpression) {
+ return visitor.visitActualMatchesExpression(this);
+ } else {
+ return visitor.visitChildren(this);
+ }
+ }
+}
+
export class RelationalExpressionContext extends KipperParserRuleContext {
constructor(parent: ParserRuleContext | undefined, invokingState: number) {
super(parent, invokingState);
@@ -9260,8 +9728,8 @@ export class RelationalExpressionContext extends KipperParserRuleContext {
}
}
export class PassOnRelationalExpressionContext extends RelationalExpressionContext {
- public bitwiseShiftExpression(): BitwiseShiftExpressionContext {
- return this.getRuleContext(0, BitwiseShiftExpressionContext);
+ public matchesExpression(): MatchesExpressionContext {
+ return this.getRuleContext(0, MatchesExpressionContext);
}
constructor(ctx: RelationalExpressionContext) {
super(ctx.parent, ctx.invokingState);
@@ -9289,11 +9757,14 @@ export class PassOnRelationalExpressionContext extends RelationalExpressionConte
}
}
export class ActualRelationalExpressionContext extends RelationalExpressionContext {
- public relationalExpression(): RelationalExpressionContext {
- return this.getRuleContext(0, RelationalExpressionContext);
- }
- public bitwiseShiftExpression(): BitwiseShiftExpressionContext {
- return this.getRuleContext(0, BitwiseShiftExpressionContext);
+ public relationalExpression(): RelationalExpressionContext[];
+ public relationalExpression(i: number): RelationalExpressionContext;
+ public relationalExpression(i?: number): RelationalExpressionContext | RelationalExpressionContext[] {
+ if (i === undefined) {
+ return this.getRuleContexts(RelationalExpressionContext);
+ } else {
+ return this.getRuleContext(i, RelationalExpressionContext);
+ }
}
public Less(): TerminalNode | undefined {
return this.tryGetToken(KipperParser.Less, 0);
diff --git a/kipper/core/src/compiler/lexer-parser/antlr/KipperParserListener.ts b/kipper/core/src/compiler/lexer-parser/antlr/KipperParserListener.ts
index fad385045..af889b284 100644
--- a/kipper/core/src/compiler/lexer-parser/antlr/KipperParserListener.ts
+++ b/kipper/core/src/compiler/lexer-parser/antlr/KipperParserListener.ts
@@ -2,141 +2,174 @@
// Import the required class for the ctx super class, as well as the 'ASTKind' type defining all possible syntax
// kind values.
-import { KipperParserRuleContext, ParseRuleKindMapping, ASTKind } from "..";
-import KipperParserBase from "./base/KipperParserBase";
import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener";
-import { PassOnBitwiseShiftExpressionContext } from "./KipperParser";
-import { ActualBitwiseShiftExpressionContext } from "./KipperParser";
-import { PassOnBitwiseAndExpressionContext } from "./KipperParser";
-import { ActualBitwiseAndExpressionContext } from "./KipperParser";
-import { PassOnLogicalAndExpressionContext } from "./KipperParser";
-import { ActualLogicalAndExpressionContext } from "./KipperParser";
-import { PassOnBitwiseXorExpressionContext } from "./KipperParser";
-import { ActualBitwiseXorExpressionContext } from "./KipperParser";
-import { ExternalBlockItemContext } from "./KipperParser";
-import { PassOncomputedPrimaryExpressionContext } from "./KipperParser";
-import { FunctionCallExpressionContext } from "./KipperParser";
-import { ExplicitCallFunctionCallExpressionContext } from "./KipperParser";
-import { DotNotationMemberAccessExpressionContext } from "./KipperParser";
-import { BracketNotationMemberAccessExpressionContext } from "./KipperParser";
-import { SliceNotationMemberAccessExpressionContext } from "./KipperParser";
-import { PassOnAssignmentExpressionContext } from "./KipperParser";
-import { ActualAssignmentExpressionContext } from "./KipperParser";
-import { PassOnCastOrConvertExpressionContext } from "./KipperParser";
-import { ActualCastOrConvertExpressionContext } from "./KipperParser";
-import { PassOnBitwiseOrExpressionContext } from "./KipperParser";
-import { ActualBitwiseOrExpressionContext } from "./KipperParser";
-import { PassOnEqualityExpressionContext } from "./KipperParser";
-import { ActualEqualityExpressionContext } from "./KipperParser";
-import { PassOnAdditiveExpressionContext } from "./KipperParser";
-import { ActualAdditiveExpressionContext } from "./KipperParser";
-import { PassOnRelationalExpressionContext } from "./KipperParser";
-import { ActualRelationalExpressionContext } from "./KipperParser";
-import { PassOnConditionalExpressionContext } from "./KipperParser";
-import { ActualConditionalExpressionContext } from "./KipperParser";
-import { PassOnMultiplicativeExpressionContext } from "./KipperParser";
-import { ActualMultiplicativeExpressionContext } from "./KipperParser";
-import { PassOnLogicalOrExpressionContext } from "./KipperParser";
-import { ActualLogicalOrExpressionContext } from "./KipperParser";
-import { CompilationUnitContext } from "./KipperParser";
-import { TranslationUnitContext } from "./KipperParser";
-import { ExternalItemContext } from "./KipperParser";
-import { BlockItemListContext } from "./KipperParser";
-import { BlockItemContext } from "./KipperParser";
-import { DeclarationContext } from "./KipperParser";
-import { VariableDeclarationContext } from "./KipperParser";
-import { StorageTypeSpecifierContext } from "./KipperParser";
-import { InitDeclaratorContext } from "./KipperParser";
-import { InitializerContext } from "./KipperParser";
-import { DeclaratorContext } from "./KipperParser";
-import { DirectDeclaratorContext } from "./KipperParser";
-import { FunctionDeclarationContext } from "./KipperParser";
-import { ParameterListContext } from "./KipperParser";
-import { ParameterDeclarationContext } from "./KipperParser";
-import { InterfaceDeclarationContext } from "./KipperParser";
-import { InterfaceMemberDeclarationContext } from "./KipperParser";
-import { InterfacePropertyDeclarationContext } from "./KipperParser";
-import { InterfaceMethodDeclarationContext } from "./KipperParser";
-import { ClassDeclarationContext } from "./KipperParser";
-import { ClassMemberDeclarationContext } from "./KipperParser";
-import { ClassPropertyDeclarationContext } from "./KipperParser";
-import { ClassMethodDeclarationContext } from "./KipperParser";
-import { ClassConstructorDeclarationContext } from "./KipperParser";
-import { StatementContext } from "./KipperParser";
-import { CompoundStatementContext } from "./KipperParser";
-import { ExpressionStatementContext } from "./KipperParser";
-import { SelectionStatementContext } from "./KipperParser";
-import { IfStatementContext } from "./KipperParser";
-import { SwitchStatementContext } from "./KipperParser";
-import { SwitchLabeledStatementContext } from "./KipperParser";
-import { IterationStatementContext } from "./KipperParser";
-import { ForLoopIterationStatementContext } from "./KipperParser";
-import { WhileLoopIterationStatementContext } from "./KipperParser";
-import { DoWhileLoopIterationStatementContext } from "./KipperParser";
-import { JumpStatementContext } from "./KipperParser";
-import { ReturnStatementContext } from "./KipperParser";
-import { TryCatchStatementContext } from "./KipperParser";
-import { TryClauseContext } from "./KipperParser";
-import { CatchClauseContext } from "./KipperParser";
-import { FinallyClauseContext } from "./KipperParser";
-import { PrimaryExpressionContext } from "./KipperParser";
-import { LambdaPrimaryExpressionContext } from "./KipperParser";
-import { TangledPrimaryExpressionContext } from "./KipperParser";
-import { BoolPrimaryExpressionContext } from "./KipperParser";
-import { IdentifierPrimaryExpressionContext } from "./KipperParser";
-import { IdentifierContext } from "./KipperParser";
-import { IdentifierOrStringPrimaryExpressionContext } from "./KipperParser";
-import { StringPrimaryExpressionContext } from "./KipperParser";
-import { FStringPrimaryExpressionContext } from "./KipperParser";
-import { FStringSingleQuoteAtomContext } from "./KipperParser";
-import { FStringDoubleQuoteAtomContext } from "./KipperParser";
-import { NumberPrimaryExpressionContext } from "./KipperParser";
-import { ArrayPrimaryExpressionContext } from "./KipperParser";
-import { ObjectPrimaryExpressionContext } from "./KipperParser";
-import { ObjectPropertyContext } from "./KipperParser";
-import { VoidOrNullOrUndefinedPrimaryExpressionContext } from "./KipperParser";
-import { ComputedPrimaryExpressionContext } from "./KipperParser";
-import { ArgumentExpressionListContext } from "./KipperParser";
-import { DotNotationContext } from "./KipperParser";
-import { BracketNotationContext } from "./KipperParser";
-import { SliceNotationContext } from "./KipperParser";
-import { PostfixExpressionContext } from "./KipperParser";
-import { IncrementOrDecrementPostfixExpressionContext } from "./KipperParser";
-import { TypeofExpressionContext } from "./KipperParser";
-import { UnaryExpressionContext } from "./KipperParser";
-import { IncrementOrDecrementUnaryExpressionContext } from "./KipperParser";
-import { OperatorModifiedUnaryExpressionContext } from "./KipperParser";
-import { IncrementOrDecrementOperatorContext } from "./KipperParser";
-import { UnaryOperatorContext } from "./KipperParser";
-import { CastOrConvertExpressionContext } from "./KipperParser";
-import { MultiplicativeExpressionContext } from "./KipperParser";
-import { AdditiveExpressionContext } from "./KipperParser";
-import { BitwiseShiftExpressionContext } from "./KipperParser";
-import { BitwiseShiftOperatorsContext } from "./KipperParser";
-import { RelationalExpressionContext } from "./KipperParser";
-import { EqualityExpressionContext } from "./KipperParser";
-import { BitwiseAndExpressionContext } from "./KipperParser";
-import { BitwiseXorExpressionContext } from "./KipperParser";
-import { BitwiseOrExpressionContext } from "./KipperParser";
-import { LogicalAndExpressionContext } from "./KipperParser";
-import { LogicalOrExpressionContext } from "./KipperParser";
-import { ConditionalExpressionContext } from "./KipperParser";
-import { AssignmentExpressionContext } from "./KipperParser";
-import { AssignmentOperatorContext } from "./KipperParser";
-import { ExpressionContext } from "./KipperParser";
-import { TypeSpecifierExpressionContext } from "./KipperParser";
-import { IdentifierTypeSpecifierExpressionContext } from "./KipperParser";
-import { GenericTypeSpecifierExpressionContext } from "./KipperParser";
-import { TypeofTypeSpecifierExpressionContext } from "./KipperParser";
-import { TypeSpecifierIdentifierContext } from "./KipperParser";
+import {
+ ActualAdditiveExpressionContext,
+ ActualAssignmentExpressionContext,
+ ActualBitwiseAndExpressionContext,
+ ActualBitwiseOrExpressionContext,
+ ActualBitwiseShiftExpressionContext,
+ ActualBitwiseXorExpressionContext,
+ ActualCastOrConvertExpressionContext,
+ ActualConditionalExpressionContext,
+ ActualEqualityExpressionContext,
+ ActualInstanceOfExpressionContext,
+ ActualLogicalAndExpressionContext,
+ ActualLogicalOrExpressionContext,
+ ActualMatchesExpressionContext,
+ ActualMultiplicativeExpressionContext,
+ ActualRelationalExpressionContext,
+ AdditiveExpressionContext,
+ ArgumentExpressionListContext,
+ ArrayPrimaryExpressionContext,
+ AssignmentExpressionContext,
+ AssignmentOperatorContext,
+ BitwiseAndExpressionContext,
+ BitwiseOrExpressionContext,
+ BitwiseShiftExpressionContext,
+ BitwiseShiftOperatorsContext,
+ BitwiseXorExpressionContext,
+ BlockItemContext,
+ BlockItemListContext,
+ BoolPrimaryExpressionContext,
+ BracketNotationContext,
+ BracketNotationMemberAccessExpressionContext,
+ CastOrConvertExpressionContext,
+ CatchClauseContext,
+ ClassConstructorDeclarationContext,
+ ClassDeclarationContext,
+ ClassMemberDeclarationContext,
+ ClassMethodDeclarationContext,
+ ClassPropertyDeclarationContext,
+ CompilationUnitContext,
+ CompoundStatementContext,
+ ComputedPrimaryExpressionContext,
+ ConditionalExpressionContext,
+ DeclarationContext,
+ DeclaratorContext,
+ DirectDeclaratorContext,
+ DotNotationContext,
+ DotNotationMemberAccessExpressionContext,
+ DoWhileLoopIterationStatementContext,
+ EqualityExpressionContext,
+ ExplicitCallFunctionCallExpressionContext,
+ ExpressionContext,
+ ExpressionStatementContext,
+ ExternalBlockItemContext,
+ ExternalItemContext,
+ FinallyClauseContext,
+ ForLoopIterationStatementContext,
+ FStringDoubleQuoteAtomContext,
+ FStringPrimaryExpressionContext,
+ FStringSingleQuoteAtomContext,
+ FunctionCallExpressionContext,
+ FunctionDeclarationContext,
+ GenericTypeSpecifierExpressionContext,
+ IdentifierContext,
+ IdentifierOrStringPrimaryExpressionContext,
+ IdentifierPrimaryExpressionContext,
+ IdentifierTypeSpecifierExpressionContext,
+ IfStatementContext,
+ IncrementOrDecrementOperatorContext,
+ IncrementOrDecrementPostfixExpressionContext,
+ IncrementOrDecrementUnaryExpressionContext,
+ InitDeclaratorContext,
+ InitializerContext,
+ InstanceOfExpressionContext,
+ InterfaceDeclarationContext,
+ InterfaceMemberDeclarationContext,
+ InterfaceMethodDeclarationContext,
+ InterfacePropertyDeclarationContext,
+ IterationStatementContext,
+ JumpStatementContext,
+ LambdaPrimaryExpressionContext,
+ LogicalAndExpressionContext,
+ LogicalOrExpressionContext,
+ MatchesExpressionContext,
+ MultiplicativeExpressionContext,
+ NewInstantiationExpressionContext,
+ NumberPrimaryExpressionContext,
+ ObjectPrimaryExpressionContext,
+ ObjectPropertyContext,
+ OperatorModifiedUnaryExpressionContext,
+ ParameterDeclarationContext,
+ ParameterListContext,
+ PassOnAdditiveExpressionContext,
+ PassOnAssignmentExpressionContext,
+ PassOnBitwiseAndExpressionContext,
+ PassOnBitwiseOrExpressionContext,
+ PassOnBitwiseShiftExpressionContext,
+ PassOnBitwiseXorExpressionContext,
+ PassOnCastOrConvertExpressionContext,
+ PassOncomputedPrimaryExpressionContext,
+ PassOnConditionalExpressionContext,
+ PassOnEqualityExpressionContext,
+ PassOnInstanceOfExpressionContext,
+ PassOnLogicalAndExpressionContext,
+ PassOnLogicalOrExpressionContext,
+ PassOnMatchesExpressionContext,
+ PassOnMultiplicativeExpressionContext,
+ PassOnRelationalExpressionContext,
+ PostfixExpressionContext,
+ PrimaryExpressionContext,
+ RelationalExpressionContext,
+ ReturnStatementContext,
+ SelectionStatementContext,
+ SliceNotationContext,
+ SliceNotationMemberAccessExpressionContext,
+ StatementContext,
+ StorageTypeSpecifierContext,
+ StringPrimaryExpressionContext,
+ SwitchLabeledStatementContext,
+ SwitchStatementContext,
+ TangledPrimaryExpressionContext,
+ TranslationUnitContext,
+ TryCatchStatementContext,
+ TryClauseContext,
+ TypeofExpressionContext,
+ TypeofTypeSpecifierExpressionContext,
+ TypeSpecifierExpressionContext,
+ TypeSpecifierIdentifierContext,
+ UnaryExpressionContext,
+ UnaryOperatorContext,
+ VariableDeclarationContext,
+ VoidOrNullOrUndefinedPrimaryExpressionContext,
+ WhileLoopIterationStatementContext,
+} from "./KipperParser";
/**
* This interface defines a complete listener for a parse tree produced by
* `KipperParser`.
*/
export interface KipperParserListener extends ParseTreeListener {
+ /**
+ * Enter a parse tree produced by the `passOnMatchesExpression`
+ * labeled alternative in `KipperParser.matchesExpression`.
+ * @param ctx the parse tree
+ */
+ enterPassOnMatchesExpression?: (ctx: PassOnMatchesExpressionContext) => void;
+ /**
+ * Exit a parse tree produced by the `passOnMatchesExpression`
+ * labeled alternative in `KipperParser.matchesExpression`.
+ * @param ctx the parse tree
+ */
+ exitPassOnMatchesExpression?: (ctx: PassOnMatchesExpressionContext) => void;
+
+ /**
+ * Enter a parse tree produced by the `actualMatchesExpression`
+ * labeled alternative in `KipperParser.matchesExpression`.
+ * @param ctx the parse tree
+ */
+ enterActualMatchesExpression?: (ctx: ActualMatchesExpressionContext) => void;
+ /**
+ * Exit a parse tree produced by the `actualMatchesExpression`
+ * labeled alternative in `KipperParser.matchesExpression`.
+ * @param ctx the parse tree
+ */
+ exitActualMatchesExpression?: (ctx: ActualMatchesExpressionContext) => void;
+
/**
* Enter a parse tree produced by the `passOnBitwiseShiftExpression`
* labeled alternative in `KipperParser.bitwiseShiftExpression`.
@@ -268,69 +301,82 @@ export interface KipperParserListener extends ParseTreeListener {
exitPassOncomputedPrimaryExpression?: (ctx: PassOncomputedPrimaryExpressionContext) => void;
/**
- * Enter a parse tree produced by the `functionCallExpression`
+ * Enter a parse tree produced by the `dotNotationMemberAccessExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- enterFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void;
+ enterDotNotationMemberAccessExpression?: (ctx: DotNotationMemberAccessExpressionContext) => void;
/**
- * Exit a parse tree produced by the `functionCallExpression`
+ * Exit a parse tree produced by the `dotNotationMemberAccessExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- exitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void;
+ exitDotNotationMemberAccessExpression?: (ctx: DotNotationMemberAccessExpressionContext) => void;
/**
- * Enter a parse tree produced by the `explicitCallFunctionCallExpression`
+ * Enter a parse tree produced by the `bracketNotationMemberAccessExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- enterExplicitCallFunctionCallExpression?: (ctx: ExplicitCallFunctionCallExpressionContext) => void;
+ enterBracketNotationMemberAccessExpression?: (ctx: BracketNotationMemberAccessExpressionContext) => void;
/**
- * Exit a parse tree produced by the `explicitCallFunctionCallExpression`
+ * Exit a parse tree produced by the `bracketNotationMemberAccessExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- exitExplicitCallFunctionCallExpression?: (ctx: ExplicitCallFunctionCallExpressionContext) => void;
+ exitBracketNotationMemberAccessExpression?: (ctx: BracketNotationMemberAccessExpressionContext) => void;
/**
- * Enter a parse tree produced by the `dotNotationMemberAccessExpression`
+ * Enter a parse tree produced by the `sliceNotationMemberAccessExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- enterDotNotationMemberAccessExpression?: (ctx: DotNotationMemberAccessExpressionContext) => void;
+ enterSliceNotationMemberAccessExpression?: (ctx: SliceNotationMemberAccessExpressionContext) => void;
/**
- * Exit a parse tree produced by the `dotNotationMemberAccessExpression`
+ * Exit a parse tree produced by the `sliceNotationMemberAccessExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- exitDotNotationMemberAccessExpression?: (ctx: DotNotationMemberAccessExpressionContext) => void;
+ exitSliceNotationMemberAccessExpression?: (ctx: SliceNotationMemberAccessExpressionContext) => void;
/**
- * Enter a parse tree produced by the `bracketNotationMemberAccessExpression`
+ * Enter a parse tree produced by the `functionCallExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- enterBracketNotationMemberAccessExpression?: (ctx: BracketNotationMemberAccessExpressionContext) => void;
+ enterFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void;
/**
- * Exit a parse tree produced by the `bracketNotationMemberAccessExpression`
+ * Exit a parse tree produced by the `functionCallExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- exitBracketNotationMemberAccessExpression?: (ctx: BracketNotationMemberAccessExpressionContext) => void;
+ exitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => void;
/**
- * Enter a parse tree produced by the `sliceNotationMemberAccessExpression`
+ * Enter a parse tree produced by the `explicitCallFunctionCallExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- enterSliceNotationMemberAccessExpression?: (ctx: SliceNotationMemberAccessExpressionContext) => void;
+ enterExplicitCallFunctionCallExpression?: (ctx: ExplicitCallFunctionCallExpressionContext) => void;
/**
- * Exit a parse tree produced by the `sliceNotationMemberAccessExpression`
+ * Exit a parse tree produced by the `explicitCallFunctionCallExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
*/
- exitSliceNotationMemberAccessExpression?: (ctx: SliceNotationMemberAccessExpressionContext) => void;
+ exitExplicitCallFunctionCallExpression?: (ctx: ExplicitCallFunctionCallExpressionContext) => void;
+
+ /**
+ * Enter a parse tree produced by the `newInstantiationExpression`
+ * labeled alternative in `KipperParser.computedPrimaryExpression`.
+ * @param ctx the parse tree
+ */
+ enterNewInstantiationExpression?: (ctx: NewInstantiationExpressionContext) => void;
+ /**
+ * Exit a parse tree produced by the `newInstantiationExpression`
+ * labeled alternative in `KipperParser.computedPrimaryExpression`.
+ * @param ctx the parse tree
+ */
+ exitNewInstantiationExpression?: (ctx: NewInstantiationExpressionContext) => void;
/**
* Enter a parse tree produced by the `passOnAssignmentExpression`
@@ -488,6 +534,32 @@ export interface KipperParserListener extends ParseTreeListener {
*/
exitActualRelationalExpression?: (ctx: ActualRelationalExpressionContext) => void;
+ /**
+ * Enter a parse tree produced by the `passOnInstanceOfExpression`
+ * labeled alternative in `KipperParser.instanceOfExpression`.
+ * @param ctx the parse tree
+ */
+ enterPassOnInstanceOfExpression?: (ctx: PassOnInstanceOfExpressionContext) => void;
+ /**
+ * Exit a parse tree produced by the `passOnInstanceOfExpression`
+ * labeled alternative in `KipperParser.instanceOfExpression`.
+ * @param ctx the parse tree
+ */
+ exitPassOnInstanceOfExpression?: (ctx: PassOnInstanceOfExpressionContext) => void;
+
+ /**
+ * Enter a parse tree produced by the `actualInstanceOfExpression`
+ * labeled alternative in `KipperParser.instanceOfExpression`.
+ * @param ctx the parse tree
+ */
+ enterActualInstanceOfExpression?: (ctx: ActualInstanceOfExpressionContext) => void;
+ /**
+ * Exit a parse tree produced by the `actualInstanceOfExpression`
+ * labeled alternative in `KipperParser.instanceOfExpression`.
+ * @param ctx the parse tree
+ */
+ exitActualInstanceOfExpression?: (ctx: ActualInstanceOfExpressionContext) => void;
+
/**
* Enter a parse tree produced by the `passOnConditionalExpression`
* labeled alternative in `KipperParser.conditionalExpression`.
@@ -1391,6 +1463,28 @@ export interface KipperParserListener extends ParseTreeListener {
*/
exitBitwiseShiftOperators?: (ctx: BitwiseShiftOperatorsContext) => void;
+ /**
+ * Enter a parse tree produced by `KipperParser.instanceOfExpression`.
+ * @param ctx the parse tree
+ */
+ enterInstanceOfExpression?: (ctx: InstanceOfExpressionContext) => void;
+ /**
+ * Exit a parse tree produced by `KipperParser.instanceOfExpression`.
+ * @param ctx the parse tree
+ */
+ exitInstanceOfExpression?: (ctx: InstanceOfExpressionContext) => void;
+
+ /**
+ * Enter a parse tree produced by `KipperParser.matchesExpression`.
+ * @param ctx the parse tree
+ */
+ enterMatchesExpression?: (ctx: MatchesExpressionContext) => void;
+ /**
+ * Exit a parse tree produced by `KipperParser.matchesExpression`.
+ * @param ctx the parse tree
+ */
+ exitMatchesExpression?: (ctx: MatchesExpressionContext) => void;
+
/**
* Enter a parse tree produced by `KipperParser.relationalExpression`.
* @param ctx the parse tree
diff --git a/kipper/core/src/compiler/lexer-parser/antlr/KipperParserVisitor.ts b/kipper/core/src/compiler/lexer-parser/antlr/KipperParserVisitor.ts
index cf7bf992f..2ad6bb27e 100644
--- a/kipper/core/src/compiler/lexer-parser/antlr/KipperParserVisitor.ts
+++ b/kipper/core/src/compiler/lexer-parser/antlr/KipperParserVisitor.ts
@@ -2,135 +2,142 @@
// Import the required class for the ctx super class, as well as the 'ASTKind' type defining all possible syntax
// kind values.
-import { KipperParserRuleContext, ParseRuleKindMapping, ASTKind } from "..";
-import KipperParserBase from "./base/KipperParserBase";
import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";
-import { PassOnBitwiseShiftExpressionContext } from "./KipperParser";
-import { ActualBitwiseShiftExpressionContext } from "./KipperParser";
-import { PassOnBitwiseAndExpressionContext } from "./KipperParser";
-import { ActualBitwiseAndExpressionContext } from "./KipperParser";
-import { PassOnLogicalAndExpressionContext } from "./KipperParser";
-import { ActualLogicalAndExpressionContext } from "./KipperParser";
-import { PassOnBitwiseXorExpressionContext } from "./KipperParser";
-import { ActualBitwiseXorExpressionContext } from "./KipperParser";
-import { ExternalBlockItemContext } from "./KipperParser";
-import { PassOncomputedPrimaryExpressionContext } from "./KipperParser";
-import { FunctionCallExpressionContext } from "./KipperParser";
-import { ExplicitCallFunctionCallExpressionContext } from "./KipperParser";
-import { DotNotationMemberAccessExpressionContext } from "./KipperParser";
-import { BracketNotationMemberAccessExpressionContext } from "./KipperParser";
-import { SliceNotationMemberAccessExpressionContext } from "./KipperParser";
-import { PassOnAssignmentExpressionContext } from "./KipperParser";
-import { ActualAssignmentExpressionContext } from "./KipperParser";
-import { PassOnCastOrConvertExpressionContext } from "./KipperParser";
-import { ActualCastOrConvertExpressionContext } from "./KipperParser";
-import { PassOnBitwiseOrExpressionContext } from "./KipperParser";
-import { ActualBitwiseOrExpressionContext } from "./KipperParser";
-import { PassOnEqualityExpressionContext } from "./KipperParser";
-import { ActualEqualityExpressionContext } from "./KipperParser";
-import { PassOnAdditiveExpressionContext } from "./KipperParser";
-import { ActualAdditiveExpressionContext } from "./KipperParser";
-import { PassOnRelationalExpressionContext } from "./KipperParser";
-import { ActualRelationalExpressionContext } from "./KipperParser";
-import { PassOnConditionalExpressionContext } from "./KipperParser";
-import { ActualConditionalExpressionContext } from "./KipperParser";
-import { PassOnMultiplicativeExpressionContext } from "./KipperParser";
-import { ActualMultiplicativeExpressionContext } from "./KipperParser";
-import { PassOnLogicalOrExpressionContext } from "./KipperParser";
-import { ActualLogicalOrExpressionContext } from "./KipperParser";
-import { CompilationUnitContext } from "./KipperParser";
-import { TranslationUnitContext } from "./KipperParser";
-import { ExternalItemContext } from "./KipperParser";
-import { BlockItemListContext } from "./KipperParser";
-import { BlockItemContext } from "./KipperParser";
-import { DeclarationContext } from "./KipperParser";
-import { VariableDeclarationContext } from "./KipperParser";
-import { StorageTypeSpecifierContext } from "./KipperParser";
-import { InitDeclaratorContext } from "./KipperParser";
-import { InitializerContext } from "./KipperParser";
-import { DeclaratorContext } from "./KipperParser";
-import { DirectDeclaratorContext } from "./KipperParser";
-import { FunctionDeclarationContext } from "./KipperParser";
-import { ParameterListContext } from "./KipperParser";
-import { ParameterDeclarationContext } from "./KipperParser";
-import { InterfaceDeclarationContext } from "./KipperParser";
-import { InterfaceMemberDeclarationContext } from "./KipperParser";
-import { InterfacePropertyDeclarationContext } from "./KipperParser";
-import { InterfaceMethodDeclarationContext } from "./KipperParser";
-import { ClassDeclarationContext } from "./KipperParser";
-import { ClassMemberDeclarationContext } from "./KipperParser";
-import { ClassPropertyDeclarationContext } from "./KipperParser";
-import { ClassMethodDeclarationContext } from "./KipperParser";
-import { ClassConstructorDeclarationContext } from "./KipperParser";
-import { StatementContext } from "./KipperParser";
-import { CompoundStatementContext } from "./KipperParser";
-import { ExpressionStatementContext } from "./KipperParser";
-import { SelectionStatementContext } from "./KipperParser";
-import { IfStatementContext } from "./KipperParser";
-import { SwitchStatementContext } from "./KipperParser";
-import { SwitchLabeledStatementContext } from "./KipperParser";
-import { IterationStatementContext } from "./KipperParser";
-import { ForLoopIterationStatementContext } from "./KipperParser";
-import { WhileLoopIterationStatementContext } from "./KipperParser";
-import { DoWhileLoopIterationStatementContext } from "./KipperParser";
-import { JumpStatementContext } from "./KipperParser";
-import { ReturnStatementContext } from "./KipperParser";
-import { TryCatchStatementContext } from "./KipperParser";
-import { TryClauseContext } from "./KipperParser";
-import { CatchClauseContext } from "./KipperParser";
-import { FinallyClauseContext } from "./KipperParser";
-import { PrimaryExpressionContext } from "./KipperParser";
-import { LambdaPrimaryExpressionContext } from "./KipperParser";
-import { TangledPrimaryExpressionContext } from "./KipperParser";
-import { BoolPrimaryExpressionContext } from "./KipperParser";
-import { IdentifierPrimaryExpressionContext } from "./KipperParser";
-import { IdentifierContext } from "./KipperParser";
-import { IdentifierOrStringPrimaryExpressionContext } from "./KipperParser";
-import { StringPrimaryExpressionContext } from "./KipperParser";
-import { FStringPrimaryExpressionContext } from "./KipperParser";
-import { FStringSingleQuoteAtomContext } from "./KipperParser";
-import { FStringDoubleQuoteAtomContext } from "./KipperParser";
-import { NumberPrimaryExpressionContext } from "./KipperParser";
-import { ArrayPrimaryExpressionContext } from "./KipperParser";
-import { ObjectPrimaryExpressionContext } from "./KipperParser";
-import { ObjectPropertyContext } from "./KipperParser";
-import { VoidOrNullOrUndefinedPrimaryExpressionContext } from "./KipperParser";
-import { ComputedPrimaryExpressionContext } from "./KipperParser";
-import { ArgumentExpressionListContext } from "./KipperParser";
-import { DotNotationContext } from "./KipperParser";
-import { BracketNotationContext } from "./KipperParser";
-import { SliceNotationContext } from "./KipperParser";
-import { PostfixExpressionContext } from "./KipperParser";
-import { IncrementOrDecrementPostfixExpressionContext } from "./KipperParser";
-import { TypeofExpressionContext } from "./KipperParser";
-import { UnaryExpressionContext } from "./KipperParser";
-import { IncrementOrDecrementUnaryExpressionContext } from "./KipperParser";
-import { OperatorModifiedUnaryExpressionContext } from "./KipperParser";
-import { IncrementOrDecrementOperatorContext } from "./KipperParser";
-import { UnaryOperatorContext } from "./KipperParser";
-import { CastOrConvertExpressionContext } from "./KipperParser";
-import { MultiplicativeExpressionContext } from "./KipperParser";
-import { AdditiveExpressionContext } from "./KipperParser";
-import { BitwiseShiftExpressionContext } from "./KipperParser";
-import { BitwiseShiftOperatorsContext } from "./KipperParser";
-import { RelationalExpressionContext } from "./KipperParser";
-import { EqualityExpressionContext } from "./KipperParser";
-import { BitwiseAndExpressionContext } from "./KipperParser";
-import { BitwiseXorExpressionContext } from "./KipperParser";
-import { BitwiseOrExpressionContext } from "./KipperParser";
-import { LogicalAndExpressionContext } from "./KipperParser";
-import { LogicalOrExpressionContext } from "./KipperParser";
-import { ConditionalExpressionContext } from "./KipperParser";
-import { AssignmentExpressionContext } from "./KipperParser";
-import { AssignmentOperatorContext } from "./KipperParser";
-import { ExpressionContext } from "./KipperParser";
-import { TypeSpecifierExpressionContext } from "./KipperParser";
-import { IdentifierTypeSpecifierExpressionContext } from "./KipperParser";
-import { GenericTypeSpecifierExpressionContext } from "./KipperParser";
-import { TypeofTypeSpecifierExpressionContext } from "./KipperParser";
-import { TypeSpecifierIdentifierContext } from "./KipperParser";
+import {
+ ActualAdditiveExpressionContext,
+ ActualAssignmentExpressionContext,
+ ActualBitwiseAndExpressionContext,
+ ActualBitwiseOrExpressionContext,
+ ActualBitwiseShiftExpressionContext,
+ ActualBitwiseXorExpressionContext,
+ ActualCastOrConvertExpressionContext,
+ ActualConditionalExpressionContext,
+ ActualEqualityExpressionContext,
+ ActualInstanceOfExpressionContext,
+ ActualLogicalAndExpressionContext,
+ ActualLogicalOrExpressionContext,
+ ActualMatchesExpressionContext,
+ ActualMultiplicativeExpressionContext,
+ ActualRelationalExpressionContext,
+ AdditiveExpressionContext,
+ ArgumentExpressionListContext,
+ ArrayPrimaryExpressionContext,
+ AssignmentExpressionContext,
+ AssignmentOperatorContext,
+ BitwiseAndExpressionContext,
+ BitwiseOrExpressionContext,
+ BitwiseShiftExpressionContext,
+ BitwiseShiftOperatorsContext,
+ BitwiseXorExpressionContext,
+ BlockItemContext,
+ BlockItemListContext,
+ BoolPrimaryExpressionContext,
+ BracketNotationContext,
+ BracketNotationMemberAccessExpressionContext,
+ CastOrConvertExpressionContext,
+ CatchClauseContext,
+ ClassConstructorDeclarationContext,
+ ClassDeclarationContext,
+ ClassMemberDeclarationContext,
+ ClassMethodDeclarationContext,
+ ClassPropertyDeclarationContext,
+ CompilationUnitContext,
+ CompoundStatementContext,
+ ComputedPrimaryExpressionContext,
+ ConditionalExpressionContext,
+ DeclarationContext,
+ DeclaratorContext,
+ DirectDeclaratorContext,
+ DotNotationContext,
+ DotNotationMemberAccessExpressionContext,
+ DoWhileLoopIterationStatementContext,
+ EqualityExpressionContext,
+ ExplicitCallFunctionCallExpressionContext,
+ ExpressionContext,
+ ExpressionStatementContext,
+ ExternalBlockItemContext,
+ ExternalItemContext,
+ FinallyClauseContext,
+ ForLoopIterationStatementContext,
+ FStringDoubleQuoteAtomContext,
+ FStringPrimaryExpressionContext,
+ FStringSingleQuoteAtomContext,
+ FunctionCallExpressionContext,
+ FunctionDeclarationContext,
+ GenericTypeSpecifierExpressionContext,
+ IdentifierContext,
+ IdentifierOrStringPrimaryExpressionContext,
+ IdentifierPrimaryExpressionContext,
+ IdentifierTypeSpecifierExpressionContext,
+ IfStatementContext,
+ IncrementOrDecrementOperatorContext,
+ IncrementOrDecrementPostfixExpressionContext,
+ IncrementOrDecrementUnaryExpressionContext,
+ InitDeclaratorContext,
+ InitializerContext,
+ InstanceOfExpressionContext,
+ InterfaceDeclarationContext,
+ InterfaceMemberDeclarationContext,
+ InterfaceMethodDeclarationContext,
+ InterfacePropertyDeclarationContext,
+ IterationStatementContext,
+ JumpStatementContext,
+ LambdaPrimaryExpressionContext,
+ LogicalAndExpressionContext,
+ LogicalOrExpressionContext,
+ MatchesExpressionContext,
+ MultiplicativeExpressionContext,
+ NewInstantiationExpressionContext,
+ NumberPrimaryExpressionContext,
+ ObjectPrimaryExpressionContext,
+ ObjectPropertyContext,
+ OperatorModifiedUnaryExpressionContext,
+ ParameterDeclarationContext,
+ ParameterListContext,
+ PassOnAdditiveExpressionContext,
+ PassOnAssignmentExpressionContext,
+ PassOnBitwiseAndExpressionContext,
+ PassOnBitwiseOrExpressionContext,
+ PassOnBitwiseShiftExpressionContext,
+ PassOnBitwiseXorExpressionContext,
+ PassOnCastOrConvertExpressionContext,
+ PassOncomputedPrimaryExpressionContext,
+ PassOnConditionalExpressionContext,
+ PassOnEqualityExpressionContext,
+ PassOnInstanceOfExpressionContext,
+ PassOnLogicalAndExpressionContext,
+ PassOnLogicalOrExpressionContext,
+ PassOnMatchesExpressionContext,
+ PassOnMultiplicativeExpressionContext,
+ PassOnRelationalExpressionContext,
+ PostfixExpressionContext,
+ PrimaryExpressionContext,
+ RelationalExpressionContext,
+ ReturnStatementContext,
+ SelectionStatementContext,
+ SliceNotationContext,
+ SliceNotationMemberAccessExpressionContext,
+ StatementContext,
+ StorageTypeSpecifierContext,
+ StringPrimaryExpressionContext,
+ SwitchLabeledStatementContext,
+ SwitchStatementContext,
+ TangledPrimaryExpressionContext,
+ TranslationUnitContext,
+ TryCatchStatementContext,
+ TryClauseContext,
+ TypeofExpressionContext,
+ TypeofTypeSpecifierExpressionContext,
+ TypeSpecifierExpressionContext,
+ TypeSpecifierIdentifierContext,
+ UnaryExpressionContext,
+ UnaryOperatorContext,
+ VariableDeclarationContext,
+ VoidOrNullOrUndefinedPrimaryExpressionContext,
+ WhileLoopIterationStatementContext,
+} from "./KipperParser";
/**
* This interface defines a complete generic visitor for a parse tree produced
@@ -140,6 +147,22 @@ import { TypeSpecifierIdentifierContext } from "./KipperParser";
* operations with no return type.
*/
export interface KipperParserVisitor extends ParseTreeVisitor {
+ /**
+ * Visit a parse tree produced by the `passOnMatchesExpression`
+ * labeled alternative in `KipperParser.matchesExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPassOnMatchesExpression?: (ctx: PassOnMatchesExpressionContext) => Result;
+
+ /**
+ * Visit a parse tree produced by the `actualMatchesExpression`
+ * labeled alternative in `KipperParser.matchesExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitActualMatchesExpression?: (ctx: ActualMatchesExpressionContext) => Result;
+
/**
* Visit a parse tree produced by the `passOnBitwiseShiftExpression`
* labeled alternative in `KipperParser.bitwiseShiftExpression`.
@@ -221,44 +244,52 @@ export interface KipperParserVisitor extends ParseTreeVisitor {
visitPassOncomputedPrimaryExpression?: (ctx: PassOncomputedPrimaryExpressionContext) => Result;
/**
- * Visit a parse tree produced by the `functionCallExpression`
+ * Visit a parse tree produced by the `dotNotationMemberAccessExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
* @return the visitor result
*/
- visitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => Result;
+ visitDotNotationMemberAccessExpression?: (ctx: DotNotationMemberAccessExpressionContext) => Result;
/**
- * Visit a parse tree produced by the `explicitCallFunctionCallExpression`
+ * Visit a parse tree produced by the `bracketNotationMemberAccessExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
* @return the visitor result
*/
- visitExplicitCallFunctionCallExpression?: (ctx: ExplicitCallFunctionCallExpressionContext) => Result;
+ visitBracketNotationMemberAccessExpression?: (ctx: BracketNotationMemberAccessExpressionContext) => Result;
/**
- * Visit a parse tree produced by the `dotNotationMemberAccessExpression`
+ * Visit a parse tree produced by the `sliceNotationMemberAccessExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
* @return the visitor result
*/
- visitDotNotationMemberAccessExpression?: (ctx: DotNotationMemberAccessExpressionContext) => Result;
+ visitSliceNotationMemberAccessExpression?: (ctx: SliceNotationMemberAccessExpressionContext) => Result;
/**
- * Visit a parse tree produced by the `bracketNotationMemberAccessExpression`
+ * Visit a parse tree produced by the `functionCallExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
* @return the visitor result
*/
- visitBracketNotationMemberAccessExpression?: (ctx: BracketNotationMemberAccessExpressionContext) => Result;
+ visitFunctionCallExpression?: (ctx: FunctionCallExpressionContext) => Result;
/**
- * Visit a parse tree produced by the `sliceNotationMemberAccessExpression`
+ * Visit a parse tree produced by the `explicitCallFunctionCallExpression`
* labeled alternative in `KipperParser.computedPrimaryExpression`.
* @param ctx the parse tree
* @return the visitor result
*/
- visitSliceNotationMemberAccessExpression?: (ctx: SliceNotationMemberAccessExpressionContext) => Result;
+ visitExplicitCallFunctionCallExpression?: (ctx: ExplicitCallFunctionCallExpressionContext) => Result;
+
+ /**
+ * Visit a parse tree produced by the `newInstantiationExpression`
+ * labeled alternative in `KipperParser.computedPrimaryExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitNewInstantiationExpression?: (ctx: NewInstantiationExpressionContext) => Result;
/**
* Visit a parse tree produced by the `passOnAssignmentExpression`
@@ -356,6 +387,22 @@ export interface KipperParserVisitor extends ParseTreeVisitor {
*/
visitActualRelationalExpression?: (ctx: ActualRelationalExpressionContext) => Result;
+ /**
+ * Visit a parse tree produced by the `passOnInstanceOfExpression`
+ * labeled alternative in `KipperParser.instanceOfExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitPassOnInstanceOfExpression?: (ctx: PassOnInstanceOfExpressionContext) => Result;
+
+ /**
+ * Visit a parse tree produced by the `actualInstanceOfExpression`
+ * labeled alternative in `KipperParser.instanceOfExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitActualInstanceOfExpression?: (ctx: ActualInstanceOfExpressionContext) => Result;
+
/**
* Visit a parse tree produced by the `passOnConditionalExpression`
* labeled alternative in `KipperParser.conditionalExpression`.
@@ -929,6 +976,20 @@ export interface KipperParserVisitor extends ParseTreeVisitor {
*/
visitBitwiseShiftOperators?: (ctx: BitwiseShiftOperatorsContext) => Result;
+ /**
+ * Visit a parse tree produced by `KipperParser.instanceOfExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitInstanceOfExpression?: (ctx: InstanceOfExpressionContext) => Result;
+
+ /**
+ * Visit a parse tree produced by `KipperParser.matchesExpression`.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ visitMatchesExpression?: (ctx: MatchesExpressionContext) => Result;
+
/**
* Visit a parse tree produced by `KipperParser.relationalExpression`.
* @param ctx the parse tree
diff --git a/kipper/core/src/compiler/lexer-parser/antlr/base/KipperParserBase.ts b/kipper/core/src/compiler/lexer-parser/antlr/base/KipperParserBase.ts
index 7266d66c4..5cc0d1b1c 100644
--- a/kipper/core/src/compiler/lexer-parser/antlr/base/KipperParserBase.ts
+++ b/kipper/core/src/compiler/lexer-parser/antlr/base/KipperParserBase.ts
@@ -2,26 +2,40 @@ import { Parser } from "antlr4ts/Parser";
import type { TokenStream } from "antlr4ts/TokenStream";
export default abstract class KipperParserBase extends Parser {
- private insideExpression: boolean;
+ private _insideExpression: boolean;
+ private _insideLambda: boolean;
protected constructor(input: TokenStream) {
super(input);
- this.insideExpression = false;
+ this._insideExpression = false;
+ this._insideLambda = false;
}
protected insideExpressionStatement(): boolean {
- return this.insideExpression;
+ return this._insideExpression;
}
protected notInsideExpressionStatement(): boolean {
- return !this.insideExpression;
+ return !this._insideExpression;
+ }
+
+ protected insideLambda(): boolean {
+ return this._insideExpression && this._insideLambda;
}
protected enterExpressionStatement(): void {
- this.insideExpression = true;
+ this._insideExpression = true;
}
protected exitExpressionStatement(): void {
- this.insideExpression = false;
+ this._insideExpression = false;
+ }
+
+ protected enterLambda(): void {
+ this._insideLambda = true;
+ }
+
+ protected exitLambda(): void {
+ this._insideLambda = false;
}
}
diff --git a/kipper/core/src/compiler/lexer-parser/parse-rule-kind-mapping.ts b/kipper/core/src/compiler/lexer-parser/parse-rule-kind-mapping.ts
index 1f74b762f..f1e0a45ba 100644
--- a/kipper/core/src/compiler/lexer-parser/parse-rule-kind-mapping.ts
+++ b/kipper/core/src/compiler/lexer-parser/parse-rule-kind-mapping.ts
@@ -105,9 +105,12 @@ export const ParseRuleKindMapping = {
RULE_genericTypeSpecifierExpression: KipperParser.RULE_genericTypeSpecifierExpression,
RULE_typeofTypeSpecifierExpression: KipperParser.RULE_typeofTypeSpecifierExpression,
RULE_typeSpecifierIdentifier: KipperParser.RULE_typeSpecifierIdentifier,
+ RULE_instanceofExpression: KipperParser.RULE_instanceOfExpression,
+ RULE_matchesExpression: KipperParser.RULE_matchesExpression,
// Labelled rules, which don't have a corresponding identifier number in KipperParser.
RULE_memberAccessExpression: 1001, // -> See 'computedPrimaryExpression'
RULE_functionCallExpression: 1002, // -> See 'computedPrimaryExpression'
+ RULE_newInstantiationExpression: 1003, // -> See 'computedPrimaryExpression'
} as const;
/**
diff --git a/kipper/core/src/compiler/optimiser/optimiser.ts b/kipper/core/src/compiler/optimiser/optimiser.ts
index a4761e110..91965766f 100644
--- a/kipper/core/src/compiler/optimiser/optimiser.ts
+++ b/kipper/core/src/compiler/optimiser/optimiser.ts
@@ -5,8 +5,8 @@
import type { RootASTNode } from "../ast";
import type { KipperProgramContext } from "../program-ctx";
import type {
- InternalFunction,
BuiltInReference,
+ InternalFunction,
ScopeFunctionDeclaration,
ScopeVariableDeclaration,
} from "../semantics/";
diff --git a/kipper/core/src/compiler/program-ctx.ts b/kipper/core/src/compiler/program-ctx.ts
index 9540773df..e66ef2cb6 100644
--- a/kipper/core/src/compiler/program-ctx.ts
+++ b/kipper/core/src/compiler/program-ctx.ts
@@ -30,7 +30,6 @@ import type {
} from "./semantics";
import {
BuiltInFunctions,
- BuiltInTypes,
BuiltInVariables,
KipperSemanticChecker,
KipperTypeChecker,
@@ -212,7 +211,9 @@ export class KipperProgramContext {
this._internalReferences = [];
this._warnings = [];
this._errors = [];
- this._initUniversalReferencables(compileConfig);
+
+ this.logger.debug("Setting up built-ins in global scope.");
+ this._initUniversalReferenceables(compileConfig);
}
// @ts-ignore
@@ -484,19 +485,6 @@ export class KipperProgramContext {
return listener.rootNode;
}
- /**
- * Sets up the built-ins for this program. This function should be called before the semantic analysis is run.
- *
- * TODO! For now this only registers the built-in types in the global scope so they can be use, but in the future
- * this should also generate the built-in functions and variables.
- * @since 0.11.0
- */
- public async setUpBuiltInsInGlobalScope(): Promise {
- for (const [_, type] of Object.entries(BuiltInTypes)) {
- this._universeScope.addType(type);
- }
- }
-
/**
* Runs the semantic analysis for this {@link KipperProgramContext program}. This function will log debugging messages
* and warnings using the {@link this.logger logger of this instance} and throw errors in case any logical issues are
@@ -599,8 +587,6 @@ export class KipperProgramContext {
this._rootASTNode = await this.generateAbstractSyntaxTree();
// Running the semantic analysis for the AST
- this.logger.debug("Setting up built-ins in global scope.");
- await this.setUpBuiltInsInGlobalScope();
this.logger.info(`Analysing semantics.`);
await this.semanticAnalysis();
@@ -796,7 +782,7 @@ export class KipperProgramContext {
}
/**
- * Initialises the universal referencables for the program context, by registering all built-in functions and
+ * Initialises the universal Referenceables for the program context, by registering all built-in functions and
* variables as well as adding all the extension functions and variables.
*
* This will initialise {@link this._universeScope}.
@@ -804,7 +790,7 @@ export class KipperProgramContext {
* @private
* @since 0.11.0
*/
- private _initUniversalReferencables(compileConfig: EvaluatedCompileConfig) {
+ private _initUniversalReferenceables(compileConfig: EvaluatedCompileConfig) {
// Register all built-in functions
const globalFunctions = [...Object.values(BuiltInFunctions), ...compileConfig.extendBuiltInFunctions];
this.registerBuiltInFunctions(globalFunctions);
@@ -821,9 +807,11 @@ export class KipperProgramContext {
this._universeScope.init();
for (const extFunction of compileConfig.extendBuiltInFunctions) {
+ this.logger.debug(`Adding extended built-in function '${extFunction.identifier}'.`);
this._universeScope.addFunction(extFunction);
}
for (const extVariable of compileConfig.extendBuiltInVariables) {
+ this.logger.debug(`Adding extended built-in variable '${extVariable.identifier}'.`);
this._universeScope.addVariable(extVariable);
}
}
diff --git a/kipper/core/src/compiler/semantics/analyser/semantic-checker.ts b/kipper/core/src/compiler/semantics/analyser/semantic-checker.ts
index 746059ea5..5f849a68d 100644
--- a/kipper/core/src/compiler/semantics/analyser/semantic-checker.ts
+++ b/kipper/core/src/compiler/semantics/analyser/semantic-checker.ts
@@ -3,18 +3,28 @@
* invalid use of tokens is detected.
* @since 0.7.0
*/
-import type { KipperReferenceable } from "../../const";
+import type { KipperCallable, KipperReferenceable } from "../../const";
import type { KipperProgramContext } from "../../program-ctx";
import type {
CompilableNodeChild,
CompilableNodeParent,
+ Declaration,
JumpStatement,
ReturnStatement,
VariableDeclaration,
} from "../../ast";
-import { MemberAccessExpression } from "../../ast";
-import { LambdaPrimaryExpression, Expression } from "../../ast";
-import { CompoundStatement, FunctionDeclaration, IdentifierPrimaryExpression, IterationStatement } from "../../ast";
+import {
+ ClassMemberDeclaration,
+ ClassMethodDeclaration,
+ ClassPropertyDeclaration,
+ CompoundStatement,
+ Expression,
+ FunctionDeclaration,
+ IdentifierPrimaryExpression,
+ IterationStatement,
+ LambdaPrimaryExpression,
+ MemberAccessExpression,
+} from "../../ast";
import { KipperSemanticsAsserter } from "./err-handler";
import type { Scope } from "../symbol-table";
import { ScopeFunctionDeclaration, ScopeVariableDeclaration } from "../symbol-table";
@@ -22,6 +32,7 @@ import {
BuiltInOrInternalGeneratorFunctionNotFoundError,
BuiltInOverwriteError,
IdentifierAlreadyUsedByFunctionError,
+ IdentifierAlreadyUsedByMemberError,
IdentifierAlreadyUsedByParameterError,
IdentifierAlreadyUsedByVariableError,
InvalidAssignmentError,
@@ -82,6 +93,7 @@ export class KipperSemanticChecker extends KipperSemanticsAsserter {
/**
* Recursively ensures that the identifier does not overwrite any declarations in this scope or parent scopes.
+ * @param declaration The declaration to check.
* @param identifier The identifier to search for in this scope and its parent scopes.
* @param scopeCtx The context instance of the scope.
* @throws {IdentifierAlreadyUsedByVariableError} If the identifier is already used by a variable.
@@ -90,20 +102,35 @@ export class KipperSemanticChecker extends KipperSemanticsAsserter {
* @throws {BuiltInOverwriteError} If the identifier is already in use by a built-in function.
* @since 0.10.0
*/
- public identifierNotUsed(identifier: string, scopeCtx: Scope): void {
+ public identifierNotUsed(declaration: Declaration, identifier: string, scopeCtx: Scope): void {
// Ensure beforehand that also no built-in has the same identifier
this.builtInNotDefined(identifier);
const ref = scopeCtx.getEntryRecursively(identifier);
if (ref) {
if (ref instanceof ScopeVariableDeclaration) {
- throw this.assertError(new IdentifierAlreadyUsedByVariableError(identifier));
+ if (ref.node instanceof ClassPropertyDeclaration) {
+ if (declaration instanceof ClassMemberDeclaration) {
+ throw this.assertError(new IdentifierAlreadyUsedByMemberError(identifier, "class"));
+ }
+ // If the declaration is a class property and the reference is a class property, throw an error
+ // Otherwise we are dealing with a variable shadowing a class property, which is allowed, as the user already
+ // needs to use "this" to access the class property
+ } else {
+ throw this.assertError(new IdentifierAlreadyUsedByVariableError(identifier));
+ }
} else if (ref instanceof ScopeFunctionDeclaration) {
- throw this.assertError(new IdentifierAlreadyUsedByFunctionError(identifier));
+ if (ref.node instanceof ClassMethodDeclaration) {
+ if (declaration instanceof ClassMemberDeclaration) {
+ throw this.assertError(new IdentifierAlreadyUsedByMemberError(identifier, "class"));
+ }
+ // If the declaration is a class property and the reference is a class property, throw an error
+ // Otherwise we are dealing with a variable shadowing a class method, which is allowed, as the user already
+ // needs to use "this" to access the class method
+ } else {
+ throw this.assertError(new IdentifierAlreadyUsedByFunctionError(identifier));
+ }
} else {
- // Currently, all other possible possibilities are narrowed to only being a parameter
- // This is due to the fact that no other classes inheriting from abstract class ScopeDeclaration are
- // implemented yet.
throw this.assertError(new IdentifierAlreadyUsedByParameterError(identifier));
}
}
@@ -201,12 +228,16 @@ export class KipperSemanticChecker extends KipperSemanticsAsserter {
* @returns The parent function if found.
* @since 0.10.0
*/
- public getReturnStatementParent(retStatement: ReturnStatement): FunctionDeclaration | LambdaPrimaryExpression {
+ public getReturnStatementParent(retStatement: ReturnStatement): KipperCallable {
// Move up the parent chain and continue as long as there are parents and the current parent is not a function
// declaration. This is to ensure a return statement is always used inside a function.
let currentParent: CompilableNodeParent | undefined = retStatement.parent;
while (
- !(currentParent instanceof FunctionDeclaration || currentParent instanceof LambdaPrimaryExpression) &&
+ !(
+ currentParent instanceof FunctionDeclaration ||
+ currentParent instanceof LambdaPrimaryExpression ||
+ currentParent instanceof ClassMethodDeclaration
+ ) &&
currentParent
) {
currentParent = currentParent.parent;
diff --git a/kipper/core/src/compiler/semantics/analyser/type-checker.ts b/kipper/core/src/compiler/semantics/analyser/type-checker.ts
index c6e5c9120..d41cb37b5 100644
--- a/kipper/core/src/compiler/semantics/analyser/type-checker.ts
+++ b/kipper/core/src/compiler/semantics/analyser/type-checker.ts
@@ -30,8 +30,14 @@ import {
TangledPrimaryExpression,
} from "../../ast";
import { KipperSemanticsAsserter } from "./err-handler";
-import { type Scope, ScopeFunctionDeclaration } from "../symbol-table";
-import { BuiltInTypes, ScopeDeclaration, ScopeTypeDeclaration, ScopeVariableDeclaration } from "../symbol-table";
+import {
+ BuiltInTypes,
+ type Scope,
+ ScopeDeclaration,
+ ScopeFunctionDeclaration,
+ ScopeTypeDeclaration,
+ ScopeVariableDeclaration,
+} from "../symbol-table";
import type { KipperArithmeticOperator, KipperBitwiseOperator, KipperReferenceable } from "../../const";
import {
kipperIncrementOrDecrementOperators,
@@ -49,23 +55,23 @@ import {
InvalidAmountOfArgumentsError,
InvalidAmountOfGenericArgumentsError,
InvalidConversionTypeError,
+ InvalidInstanceOfTypeError,
InvalidKeyTypeError,
+ InvalidMatchesTypeError,
InvalidRelationalComparisonTypeError,
InvalidUnaryExpressionOperandError,
InvalidUnaryExpressionTypeError,
KipperError,
KipperNotImplementedError,
+ PropertyDoesNotExistError,
ReadOnlyWriteTypeError,
ReferenceCanNotBeUsedAsTypeError,
UnknownTypeError,
ValueNotIndexableTypeError,
- PropertyDoesNotExistError,
ValueTypeNotIndexableWithGivenAccessor,
} from "../../../errors";
-import type { BuiltInTypeArray, CustomType, GenericType, GenericTypeArguments, ProcessedType, RawType } from "../types";
-import { BuiltInTypeFunc } from "../types";
-import { BuiltInTypeObj } from "../types";
-import { UndefinedType } from "../types";
+import type { BuiltInTypeArray, GenericType, GenericTypeArguments, ProcessedType, RawType } from "../types";
+import { BuiltInTypeFunc, BuiltInTypeObj, CustomType, UndefinedType } from "../types";
/**
* Kipper Type Checker, which asserts that type logic and cohesion is valid and throws errors in case that an
@@ -139,10 +145,9 @@ export class KipperTypeChecker extends KipperSemanticsAsserter {
}
// Assuming obj.fields is a Map or an iterable collection of [key, value] pairs
- for (const [fieldIdentifier, type] of obj.fields) {
- if (fieldIdentifier === identifier) {
- return type;
- }
+ const fieldType = obj.getProperty(identifier);
+ if (fieldType) {
+ return fieldType;
}
// If no matching field was found, throw an error
@@ -539,12 +544,8 @@ export class KipperTypeChecker extends KipperSemanticsAsserter {
// If the return statement has no return value, then the value is automatically 'void'
const statementValueType = semanticData.returnValue?.getTypeSemanticData().evaluatedType ?? BuiltInTypes.void;
- // TODO! DON'T DO THIS. THIS IS PUTTING TYPE CHECKING OF A PARENT INTO A CHILD
- // TODO! REALLY WE NEED TO REMOVE THIS SOON
- const functionReturnType = this.getCheckedType(
- semanticData.function.getSemanticData().returnType,
- semanticData.function.scope,
- );
+ // As the function type is evaluated preliminary, we can safely assume that the type is valid and use it
+ const functionReturnType = semanticData.function.getTypeSemanticData().valueType.returnType;
// If either one of the types is undefined, skip type checking (the types are invalid anyway)
if (statementValueType === undefined || functionReturnType === undefined) {
@@ -571,7 +572,7 @@ export class KipperTypeChecker extends KipperSemanticsAsserter {
public validReturnCodePathsInFunctionBody(func: FunctionDeclaration | LambdaPrimaryExpression): void {
const semanticData = func.getSemanticData();
const typeData = func.getTypeSemanticData();
- const returnType = typeData.type.returnType;
+ const returnType = typeData.valueType.returnType;
// If the return type is undefined, skip type checking (the type is invalid anyway)
if (returnType === undefined) {
@@ -648,6 +649,7 @@ export class KipperTypeChecker extends KipperSemanticsAsserter {
/**
* Checks whether the members of the passed {@link objLike} can be accessed. (As well if there are members)
* @param objLike The object-like expression to check.
+ * @param accessType The type of accessor that is used to access the members.
* @throws {TypeError} If the object expression is not an object.
* @since 0.10.0
*/
@@ -782,7 +784,7 @@ export class KipperTypeChecker extends KipperSemanticsAsserter {
* @throws {KipperNotImplementedError} When the branch types are mismatching, as union types are not implemented yet.
* @since 0.11.0
*/
- validConditionalExpression(trueBranch: Expression, falseBranch: Expression) {
+ public validConditionalExpression(trueBranch: Expression, falseBranch: Expression) {
const trueBranchType = trueBranch.getTypeSemanticData().evaluatedType;
const falseBranchType = falseBranch.getTypeSemanticData().evaluatedType;
@@ -807,7 +809,7 @@ export class KipperTypeChecker extends KipperSemanticsAsserter {
* @param param The array primary expression to check.
* @since 0.12.0
*/
- validArrayExpression(param: ArrayPrimaryExpression) {
+ public validArrayExpression(param: ArrayPrimaryExpression) {
const children = param.getSemanticData().value;
if (children.length > 0) {
const expectedType = children[0].getTypeSemanticData().evaluatedType;
@@ -822,4 +824,28 @@ export class KipperTypeChecker extends KipperSemanticsAsserter {
}
}
}
+
+ /**
+ * Checks whether the passed object expression is valid.
+ * @param type The object primary expression to check.
+ * @since 0.12.0
+ */
+ public validInstanceofClassType(type: ProcessedType) {
+ // Ensure that the type is a class type
+ if (!(type instanceof CustomType) || type.kind !== "class") {
+ throw this.notImplementedError(new InvalidInstanceOfTypeError(type.toString()));
+ }
+ }
+
+ /**
+ * Checks whether the passed expression can be checked against the given interface pattern.
+ * @param patternType The pattern to check against.
+ * @since 0.12.0
+ */
+ public validMatchesInterfaceType(patternType: ProcessedType) {
+ // Ensure that the pattern is an interface type
+ if (!(patternType instanceof CustomType) || patternType.kind !== "interface") {
+ throw this.notImplementedError(new InvalidMatchesTypeError(patternType.toString()));
+ }
+ }
}
diff --git a/kipper/core/src/compiler/semantics/symbol-table/base/user-scope.ts b/kipper/core/src/compiler/semantics/symbol-table/base/user-scope.ts
new file mode 100644
index 000000000..621a33a24
--- /dev/null
+++ b/kipper/core/src/compiler/semantics/symbol-table/base/user-scope.ts
@@ -0,0 +1,25 @@
+import { Scope } from "./scope";
+import type { CompilableASTNode, Declaration, RootASTNode, ScopeNode } from "../../../ast";
+
+/**
+ * Represents any scope that the user can access and write to in a Kipper program.
+ *
+ * This in practise means any scope except the universe scope.
+ * @since 0.12.0
+ */
+export abstract class UserScope extends Scope {
+ protected constructor(public readonly ctx: (ScopeNode & CompilableASTNode) | RootASTNode) {
+ super();
+ }
+
+ /**
+ * Ensures that the given declaration is not already used in the current scope.
+ * @param identifier The identifier to check.
+ * @param declaration The declaration to check.
+ * @private
+ * @since 0.12.0
+ */
+ protected ensureNotUsed(identifier: string, declaration: Declaration): void {
+ this.ctx.programCtx.semanticCheck(declaration).identifierNotUsed(declaration, identifier, this);
+ }
+}
diff --git a/kipper/core/src/compiler/semantics/symbol-table/class-scope.ts b/kipper/core/src/compiler/semantics/symbol-table/class-scope.ts
index 6efc40e4b..281f3b84e 100644
--- a/kipper/core/src/compiler/semantics/symbol-table/class-scope.ts
+++ b/kipper/core/src/compiler/semantics/symbol-table/class-scope.ts
@@ -3,15 +3,88 @@
* the global namespace.
* @since 0.11.0
*/
-import type { ClassDeclaration } from "../../ast";
-import { LocalScope } from "./local-scope";
+import type {
+ ClassConstructorDeclaration,
+ ClassDeclaration,
+ ClassMethodDeclaration,
+ ClassPropertyDeclaration,
+} from "../../ast";
+import type { LocalScope } from "./local-scope";
+import type { GlobalScope } from "./global-scope";
+import type { ScopeTypeDeclaration } from "./entry";
+import { type ScopeDeclaration, ScopeFunctionDeclaration, ScopeVariableDeclaration } from "./entry";
+import { KipperNotImplementedError } from "../../../errors";
+import { UserScope } from "./base/user-scope";
+import type { ClassScopeThisDeclaration } from "./entry/class-scope-this-declaration";
/**
* A function-specific scope that is bound to a {@link FunctionDeclaration} and not the global namespace.
* @since 0.11.0
*/
-export class ClassScope extends LocalScope {
- constructor(public ctx: ClassDeclaration) {
+export class ClassScope extends UserScope {
+ constructor(public readonly ctx: ClassDeclaration) {
super(ctx);
}
+
+ /**
+ * The parent scope of this local scope. This will be either a {@link LocalScope} or a {@link GlobalScope} (unique
+ * to the {@link KipperProgramContext} class).
+ * @since 0.10.0
+ */
+ public get parent(): LocalScope | GlobalScope {
+ return this.ctx.scope;
+ }
+
+ public addConstructor(declaration: ClassConstructorDeclaration): ScopeFunctionDeclaration {
+ const identifier = declaration.getSemanticData().identifier;
+ this.ensureNotUsed(identifier, declaration);
+
+ const scopeDeclaration = ScopeFunctionDeclaration.fromClassConstructorDeclaration(declaration);
+ this.entries.set(identifier, scopeDeclaration);
+ return scopeDeclaration;
+ }
+
+ public override addFunction(declaration: ClassMethodDeclaration): ScopeFunctionDeclaration {
+ const identifier = declaration.getSemanticData().identifier;
+ this.ensureNotUsed(identifier, declaration);
+
+ const scopeDeclaration = ScopeFunctionDeclaration.fromClassMethodDeclaration(declaration);
+ this.entries.set(identifier, scopeDeclaration);
+ return scopeDeclaration;
+ }
+
+ public addVariable(declaration: ClassPropertyDeclaration): ScopeVariableDeclaration {
+ const identifier = declaration.getSemanticData().identifier;
+ this.ensureNotUsed(identifier, declaration);
+
+ const scopeDeclaration = ScopeVariableDeclaration.fromClassPropertyDeclaration(declaration);
+ this._entries.set(identifier, scopeDeclaration);
+ return scopeDeclaration;
+ }
+
+ public addType(declaration: any): ScopeTypeDeclaration {
+ throw this.ctx.programCtx
+ .semanticCheck(declaration)
+ .notImplementedError(new KipperNotImplementedError("Local types have not been implemented yet."));
+ }
+
+ /**
+ * Gets the "this" keyword which is simply a reference to the class.
+ * @since 0.12.0
+ */
+ public getThis(): ClassScopeThisDeclaration {
+ return this.ctx.thisAliasDeclaration;
+ }
+
+ public getEntry(identifier: string): ScopeDeclaration | undefined {
+ return identifier === "this" ? this.getThis() : this.entries.get(identifier);
+ }
+
+ public getEntryRecursively(identifier: string): ScopeDeclaration | undefined {
+ const localRef = this.getEntry(identifier);
+ if (!localRef) {
+ return this.parent.getEntryRecursively(identifier);
+ }
+ return localRef;
+ }
}
diff --git a/kipper/core/src/compiler/semantics/symbol-table/entry/class-scope-this-declaration.ts b/kipper/core/src/compiler/semantics/symbol-table/entry/class-scope-this-declaration.ts
new file mode 100644
index 000000000..970c91c3e
--- /dev/null
+++ b/kipper/core/src/compiler/semantics/symbol-table/entry/class-scope-this-declaration.ts
@@ -0,0 +1,97 @@
+import type { ClassDeclaration, TypeDeclaration } from "../../../ast";
+import type { ProcessedType } from "../../types";
+import { ScopeDeclaration } from "./scope-declaration";
+
+/**
+ * A scope declaration for the "this" keyword inside a class. This is almost identical to a {@link ScopeTypeDeclaration}
+ * for a class, but it is specifically initialised prematurely to allow for references to "this" inside the class.
+ * @since 0.12.0
+ */
+export class ClassScopeThisDeclaration extends ScopeDeclaration {
+ public constructor(public readonly _declaration: ClassDeclaration) {
+ super();
+ }
+
+ /**
+ * The identifier of this declaration. This is always "this" as we are referring to the "this" keyword inside a class.
+ * @since 0.12.0
+ */
+ public get identifier(): string {
+ return "this";
+ }
+
+ /**
+ * Returns whether this type declaration is a built-in type.
+ *
+ * As this is an auto-initialised declaration custom to every class, it will never be a built-in type.
+ * @since 0.12.0
+ */
+ public override get isBuiltIn(): boolean {
+ return false;
+ }
+
+ /**
+ * Returns the built-in structure of this declaration, if this declaration is based on one.
+ *
+ * As this is an auto-initialised declaration custom to every class, it will never be based on a built-in type.
+ * @since 0.12.0
+ */
+ public override get builtInStructure(): undefined {
+ return undefined;
+ }
+
+ /**
+ * Returns the {@link InterfaceDeclaration} or {@link ClassDeclaration AST node} this scope type declaration bases on.
+ */
+ public get node(): TypeDeclaration | undefined {
+ return this._declaration;
+ }
+
+ /**
+ * The type of this type.
+ *
+ * This is always the custom type of the class declaration.
+ * @since 0.12.0
+ */
+ public get type(): ProcessedType {
+ return this._declaration.getTypeSemanticData().valueType;
+ }
+
+ /**
+ * Returns whether the declaration is defined.
+ *
+ * As this is auto-initialized, it will always be defined.
+ * @since 0.12.0
+ */
+ public get isDefined(): true {
+ return true;
+ }
+
+ /**
+ * Returns the scope associated with this {@link ScopeDeclaration}.
+ * @since 0.12.0
+ */
+ public get scope() {
+ return this._declaration.scope;
+ }
+
+ /**
+ * Returns whether the declaration has a value.
+ *
+ * As this is auto-initialized, it will always have a value.
+ * @since 0.12.0
+ */
+ public get hasValue(): true {
+ return true;
+ }
+
+ /**
+ * Returns whether the declaration has a callable value (function).
+ *
+ * A class is not callable, so this will always be false.
+ * @since 0.12.0
+ */
+ public get isCallable(): false {
+ return false;
+ }
+}
diff --git a/kipper/core/src/compiler/semantics/symbol-table/entry/scope-function-declaration.ts b/kipper/core/src/compiler/semantics/symbol-table/entry/scope-function-declaration.ts
index 822989632..deb6d2098 100644
--- a/kipper/core/src/compiler/semantics/symbol-table/entry/scope-function-declaration.ts
+++ b/kipper/core/src/compiler/semantics/symbol-table/entry/scope-function-declaration.ts
@@ -3,6 +3,12 @@
* @since 0.10.0
*/
import type {
+ ClassConstructorDeclaration,
+ ClassConstructorDeclarationSemantics,
+ ClassConstructorDeclarationTypeSemantics,
+ ClassMethodDeclaration,
+ ClassMethodDeclarationSemantics,
+ ClassMethodDeclarationTypeSemantics,
FunctionDeclaration,
FunctionDeclarationSemantics,
FunctionDeclarationTypeSemantics,
@@ -19,7 +25,7 @@ import type { UniverseScope } from "../universe-scope";
*/
export class ScopeFunctionDeclaration extends ScopeDeclaration {
private constructor(
- private readonly _declaration?: FunctionDeclaration,
+ private readonly _declaration?: FunctionDeclaration | ClassMethodDeclaration | ClassConstructorDeclaration,
private readonly _builtInFunction?: BuiltInFunction,
private readonly _universeScope?: UniverseScope,
) {
@@ -34,9 +40,26 @@ export class ScopeFunctionDeclaration extends ScopeDeclaration {
return new ScopeFunctionDeclaration(declaration);
}
+ /**
+ * Creates a new scope function declaration from a given class method declaration.
+ * @param declaration The method declaration node.
+ */
+ public static fromClassMethodDeclaration(declaration: ClassMethodDeclaration): ScopeFunctionDeclaration {
+ return new ScopeFunctionDeclaration(declaration);
+ }
+
+ /**
+ * Creates a new scope function declaration from a given class constructor declaration.
+ * @param declaration The constructor declaration node.
+ */
+ public static fromClassConstructorDeclaration(declaration: ClassConstructorDeclaration): ScopeFunctionDeclaration {
+ return new ScopeFunctionDeclaration(declaration);
+ }
+
/**
* Creates a new scope function declaration from a function declaration.
* @param declaration The function declaration node.
+ * @param universeScope The universe scope i.e. the scope for all the built-ins.
*/
static fromBuiltInFunction(declaration: BuiltInFunction, universeScope: UniverseScope): ScopeFunctionDeclaration {
return new ScopeFunctionDeclaration(undefined, declaration, universeScope);
@@ -63,7 +86,11 @@ export class ScopeFunctionDeclaration extends ScopeDeclaration {
* @throws UndefinedSemanticsError If this is accessed, before semantic analysis was performed.
* @private
*/
- private get semanticData(): FunctionDeclarationSemantics | undefined {
+ private get semanticData():
+ | FunctionDeclarationSemantics
+ | ClassMethodDeclarationSemantics
+ | ClassConstructorDeclarationSemantics
+ | undefined {
return this._declaration?.getSemanticData();
}
@@ -72,14 +99,18 @@ export class ScopeFunctionDeclaration extends ScopeDeclaration {
* @throws UndefinedSemanticsError If this is accessed, before type checking was performed.
* @private
*/
- private get typeData(): FunctionDeclarationTypeSemantics | undefined {
+ private get typeData():
+ | FunctionDeclarationTypeSemantics
+ | ClassMethodDeclarationTypeSemantics
+ | ClassConstructorDeclarationTypeSemantics
+ | undefined {
return this._declaration?.getTypeSemanticData();
}
/**
* Returns the {@link FunctionDeclaration AST node} this scope function declaration bases on.
*/
- public get node(): FunctionDeclaration | undefined {
+ public get node(): FunctionDeclaration | ClassMethodDeclaration | ClassConstructorDeclaration | undefined {
return this._declaration;
}
@@ -95,7 +126,7 @@ export class ScopeFunctionDeclaration extends ScopeDeclaration {
* @since 0.10.0
*/
public get type(): BuiltInTypeFunc {
- return this.typeData?.type ?? this._builtInFunction!!.funcType;
+ return this.typeData?.valueType ?? this._builtInFunction!!.funcType;
}
/**
diff --git a/kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts b/kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts
index c44276f44..e79098887 100644
--- a/kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts
+++ b/kipper/core/src/compiler/semantics/symbol-table/entry/scope-type-declaration.ts
@@ -13,10 +13,10 @@ import { BuiltInTypes } from "../universe-scope";
* @since 0.11.0
*/
export class ScopeTypeDeclaration extends ScopeDeclaration {
- private constructor(
- private readonly _declaration?: TypeDeclaration,
- private readonly _builtInType?: BuiltInType,
- private readonly _universeScope?: UniverseScope,
+ protected constructor(
+ protected readonly _declaration?: TypeDeclaration,
+ protected readonly _builtInType?: BuiltInType,
+ protected readonly _universeScope?: UniverseScope,
) {
super();
}
@@ -32,12 +32,12 @@ export class ScopeTypeDeclaration extends ScopeDeclaration {
/**
* Creates a new scope type declaration from a built-in type.
- * @param identifier The identifier of the built-in type.
+ * @param builtInType The built-in type.
* @param universeScope The universe scope this type is associated with.
* @since 0.11.0
*/
- public static fromBuiltInType(type: BuiltInType, universeScope: UniverseScope): ScopeTypeDeclaration {
- return new ScopeTypeDeclaration(undefined, type, universeScope);
+ public static fromBuiltInType(builtInType: BuiltInType, universeScope: UniverseScope): ScopeTypeDeclaration {
+ return new ScopeTypeDeclaration(undefined, builtInType, universeScope);
}
/**
@@ -93,17 +93,17 @@ export class ScopeTypeDeclaration extends ScopeDeclaration {
* @since 0.11.0
*/
public get typeValue(): CustomType | ProcessedType {
- return this.node?.getTypeSemanticData()?.type || this._builtInType!!;
+ return this.node?.getTypeSemanticData()?.valueType || this._builtInType!!;
}
/**
- * Returns whether the declaration has a value.
+ * Returns whether the declaration is defined.
*
- * As this is a type, it will always be false.
+ * As this is a type, it will always be true;
* @since 0.11.0
*/
- public get isDefined(): false {
- return false;
+ public get isDefined(): true {
+ return true;
}
/**
diff --git a/kipper/core/src/compiler/semantics/symbol-table/entry/scope-variable-declaration.ts b/kipper/core/src/compiler/semantics/symbol-table/entry/scope-variable-declaration.ts
index 6ca5e3faa..574373c0e 100644
--- a/kipper/core/src/compiler/semantics/symbol-table/entry/scope-variable-declaration.ts
+++ b/kipper/core/src/compiler/semantics/symbol-table/entry/scope-variable-declaration.ts
@@ -2,7 +2,14 @@
* A symbol table entry for a variable declaration.
* @since 0.10.0
*/
-import type { VariableDeclaration, VariableDeclarationSemantics, VariableDeclarationTypeSemantics } from "../../../ast";
+import type {
+ ClassPropertyDeclaration,
+ ClassPropertyDeclarationSemantics,
+ ClassPropertyDeclarationTypeSemantics,
+ VariableDeclaration,
+ VariableDeclarationSemantics,
+ VariableDeclarationTypeSemantics,
+} from "../../../ast";
import type { KipperStorageType } from "../../../const";
import type { UniverseScope } from "../index";
import { BuiltInTypeFunc, type ProcessedType } from "../../types";
@@ -16,8 +23,8 @@ import type { BuiltInVariable } from "../../runtime-built-ins";
export class ScopeVariableDeclaration extends ScopeDeclaration {
private _valueWasUpdated: boolean = false;
- public constructor(
- private readonly _declaration?: VariableDeclaration,
+ protected constructor(
+ private readonly _declaration?: VariableDeclaration | ClassPropertyDeclaration,
private readonly _builtInVariable?: BuiltInVariable,
private readonly _universeScope?: UniverseScope,
) {
@@ -32,6 +39,14 @@ export class ScopeVariableDeclaration extends ScopeDeclaration {
return new ScopeVariableDeclaration(declaration);
}
+ /**
+ * Creates a new scope variable declaration from a given class property declaration.
+ * @param declaration The class property declaration.
+ */
+ public static fromClassPropertyDeclaration(declaration: ClassPropertyDeclaration): ScopeVariableDeclaration {
+ return new ScopeVariableDeclaration(declaration);
+ }
+
/**
* Creates a new scope variable declaration from a built-in variable.
* @param builtInVariable The built-in variable.
@@ -65,7 +80,7 @@ export class ScopeVariableDeclaration extends ScopeDeclaration {
* @throws UndefinedSemanticsError If this is accessed, before semantic analysis was performed.
* @private
*/
- private get semanticData(): VariableDeclarationSemantics | undefined {
+ private get semanticData(): VariableDeclarationSemantics | ClassPropertyDeclarationSemantics | undefined {
return this._declaration?.getSemanticData();
}
@@ -74,14 +89,14 @@ export class ScopeVariableDeclaration extends ScopeDeclaration {
* @throws UndefinedSemanticsError If this is accessed, before type checking was performed.
* @private
*/
- private get typeData(): VariableDeclarationTypeSemantics | undefined {
+ private get typeData(): VariableDeclarationTypeSemantics | ClassPropertyDeclarationTypeSemantics | undefined {
return this._declaration?.getTypeSemanticData();
}
/**
* Returns the {@link VariableDeclaration AST node} this scope declaration bases on.
*/
- public get node(): VariableDeclaration | undefined {
+ public get node(): VariableDeclaration | ClassPropertyDeclaration | undefined {
return this._declaration;
}
@@ -96,7 +111,7 @@ export class ScopeVariableDeclaration extends ScopeDeclaration {
* The value type of this variable.
*/
public get type(): ProcessedType {
- return this.typeData?.valueType ?? this._builtInVariable!!.valueType;
+ return this.typeData?.valueType ?? this._builtInVariable!!.valueType; //<-- thrown here
}
/**
diff --git a/kipper/core/src/compiler/semantics/symbol-table/function-scope.ts b/kipper/core/src/compiler/semantics/symbol-table/function-scope.ts
index 69461f17c..3eeeda6fb 100644
--- a/kipper/core/src/compiler/semantics/symbol-table/function-scope.ts
+++ b/kipper/core/src/compiler/semantics/symbol-table/function-scope.ts
@@ -3,11 +3,15 @@
* the global namespace.
* @since 0.8.0
*/
-import type { FunctionDeclaration, LambdaPrimaryExpression, ParameterDeclaration } from "../../ast";
+import type {
+ ClassMethodDeclaration,
+ FunctionDeclaration,
+ LambdaPrimaryExpression,
+ ParameterDeclaration,
+} from "../../ast";
import type { ScopeDeclaration } from "./entry";
import { ScopeParameterDeclaration } from "./entry";
import { LocalScope } from "./local-scope";
-import type { ClassMethodDeclaration } from "../../ast";
import type { ClassConstructorDeclaration } from "../../ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration";
/**
@@ -42,9 +46,7 @@ export class FunctionScope extends LocalScope {
*/
public addArgument(declaration: ParameterDeclaration): ScopeParameterDeclaration {
const identifier = declaration.getSemanticData().identifier;
-
- // Ensuring that the declaration does not overwrite other declarations
- this.ctx.programCtx.semanticCheck(declaration).identifierNotUsed(identifier, this);
+ this.ensureNotUsed(identifier, declaration);
const scopeDeclaration = ScopeParameterDeclaration.fromParameterDeclaration(declaration);
this.arguments.set(scopeDeclaration.identifier, scopeDeclaration);
diff --git a/kipper/core/src/compiler/semantics/symbol-table/global-scope.ts b/kipper/core/src/compiler/semantics/symbol-table/global-scope.ts
index d35ca4175..0ebe87645 100644
--- a/kipper/core/src/compiler/semantics/symbol-table/global-scope.ts
+++ b/kipper/core/src/compiler/semantics/symbol-table/global-scope.ts
@@ -4,22 +4,22 @@
* @since 0.8.0
*/
import type { ScopeDeclaration } from "./entry";
-import type { FunctionDeclaration, RootASTNode, TypeDeclaration, VariableDeclaration } from "../../ast";
import { ScopeFunctionDeclaration, ScopeTypeDeclaration, ScopeVariableDeclaration } from "./entry";
-import { Scope } from "./base/scope";
+import type { FunctionDeclaration, RootASTNode, TypeDeclaration, VariableDeclaration } from "../../ast";
import type { UniverseScope } from "./universe-scope";
+import { UserScope } from "./base/user-scope";
/**
* The global scope of a {@link KipperProgramContext}, which contains the global variables and functions of a
* Kipper program.
* @since 0.8.0
*/
-export class GlobalScope extends Scope {
+export class GlobalScope extends UserScope {
constructor(
public readonly ctx: RootASTNode,
public readonly universe: UniverseScope,
) {
- super();
+ super(ctx);
}
/**
@@ -30,9 +30,7 @@ export class GlobalScope extends Scope {
- constructor(public ctx: ScopeNode & CompilableASTNode) {
- super();
+export class LocalScope extends UserScope {
+ constructor(public readonly ctx: ScopeNode & CompilableASTNode) {
+ super(ctx);
}
/**
@@ -30,7 +31,7 @@ export class LocalScope extends Scope {
}
}
+ /**
+ * Ensures that the given declaration is not already used in the current scope.
+ * @param identifier The identifier to check.
+ * @private
+ * @since 0.12.0
+ */
+ protected ensureNotUsed(identifier: string): void {
+ if (this.entries.has(identifier)) {
+ throw new DuplicateUniverseKeyError(identifier);
+ }
+ }
+
/**
* Adds a built-in variable to the universal scope.
* @param declaration The built-in variable to add.
@@ -100,6 +113,7 @@ export class UniverseScope extends Scope {
* @since 0.11.0
*/
public addVariable(declaration: BuiltInVariable): ScopeVariableDeclaration {
+ this.ensureNotUsed(declaration.identifier);
const scopeDeclaration = ScopeVariableDeclaration.fromBuiltInVariable(declaration, this);
this.entries.set(scopeDeclaration.identifier, scopeDeclaration);
return scopeDeclaration;
@@ -112,6 +126,7 @@ export class UniverseScope extends Scope {
* @since 0.11.0
*/
public addFunction(declaration: BuiltInFunction): ScopeFunctionDeclaration {
+ this.ensureNotUsed(declaration.identifier);
const scopeDeclaration = ScopeFunctionDeclaration.fromBuiltInFunction(declaration, this);
this.entries.set(scopeDeclaration.identifier, scopeDeclaration);
return scopeDeclaration;
@@ -119,12 +134,13 @@ export class UniverseScope extends Scope {
/**
* Adds a built-in type to the universal scope.
- * @param declarationOrIdentifier The built-in type to add.
+ * @param declaration The built-in type to add.
* @returns The scope declaration of the added type.
* @since 0.11.0
*/
- public addType(declarationOrIdentifier: BuiltInType): ScopeTypeDeclaration {
- const scopeDeclaration = ScopeTypeDeclaration.fromBuiltInType(declarationOrIdentifier, this);
+ public addType(declaration: BuiltInType): ScopeTypeDeclaration {
+ this.ensureNotUsed(declaration.identifier);
+ const scopeDeclaration = ScopeTypeDeclaration.fromBuiltInType(declaration, this);
this.entries.set(scopeDeclaration.identifier, scopeDeclaration);
return scopeDeclaration;
}
diff --git a/kipper/core/src/compiler/semantics/types/base/generic-type.ts b/kipper/core/src/compiler/semantics/types/base/generic-type.ts
index 092340c64..aa75878ba 100644
--- a/kipper/core/src/compiler/semantics/types/base/generic-type.ts
+++ b/kipper/core/src/compiler/semantics/types/base/generic-type.ts
@@ -21,6 +21,7 @@ export interface GenericType extends ProcessedTy
* @since 0.12.0
*/
readonly genericTypeArguments: T;
+
/**
* Changes the generic type arguments for this generic type and returns a new generic type instance with the new
* arguments where the types have been adjusted.
diff --git a/kipper/core/src/compiler/semantics/types/base/processed-type.ts b/kipper/core/src/compiler/semantics/types/base/processed-type.ts
index e421c5b2b..b4a1212b7 100644
--- a/kipper/core/src/compiler/semantics/types/base/processed-type.ts
+++ b/kipper/core/src/compiler/semantics/types/base/processed-type.ts
@@ -93,12 +93,12 @@ export abstract class ProcessedType extends Type {
public toString(): string {
let type = this.identifier;
if (this.isGeneric) {
- type +=
- "<" +
- (>(this)).genericTypeArguments
- ?.map((arg) => arg.type.toString())
- .join(", ") +
- ">";
+ const genericArgs = (>(this)).genericTypeArguments
+ ?.map((arg) =>
+ Array.isArray(arg.type) ? arg.type.map((type) => type.toString()).join(", ") : arg.type.toString(),
+ )
+ .join(", ");
+ type += `<${genericArgs}>`;
}
return type;
}
diff --git a/kipper/core/src/compiler/semantics/types/built-in/any.ts b/kipper/core/src/compiler/semantics/types/built-in/any.ts
index 3553d2e5e..9ecd1df77 100644
--- a/kipper/core/src/compiler/semantics/types/built-in/any.ts
+++ b/kipper/core/src/compiler/semantics/types/built-in/any.ts
@@ -1,6 +1,5 @@
import type { ProcessedType } from "../../types";
-import { UnionType } from "../../types";
-import { BuiltInType, type CompilableType } from "../../types";
+import { BuiltInType, type CompilableType, UnionType } from "../../types";
import { ArgumentAssignmentTypeError, AssignmentTypeError, PropertyAssignmentTypeError } from "../../../../errors";
/**
diff --git a/kipper/core/src/compiler/semantics/types/custom-type.ts b/kipper/core/src/compiler/semantics/types/custom-type.ts
index 0958bd426..be2de30a9 100644
--- a/kipper/core/src/compiler/semantics/types/custom-type.ts
+++ b/kipper/core/src/compiler/semantics/types/custom-type.ts
@@ -34,17 +34,43 @@ export type CustomTypeFields = Map;
* @since 0.12.0
*/
export class CustomType extends ProcessedType {
+ private readonly _fields: CustomTypeFields;
+ private readonly _clsStaticFields?: CustomTypeFields;
+
/**
* The kind of this type. This is simply used to differentiate between classes and interfaces.
* @since 0.12.0
*/
public readonly kind: CustomTypeKind;
- private readonly _fields: CustomTypeFields;
- protected constructor(identifier: string, kind: CustomTypeKind, fields: CustomTypeFields) {
+ /**
+ * The type that this type extends. This is only applicable to classes.
+ * @since 0.12.0
+ */
+ public readonly clsExtends?: CustomType;
+
+ /**
+ * The types that this type implements. This is only applicable to classes.
+ * @since 0.12.0
+ */
+ public readonly clsImplements?: CustomType[];
+
+ /**
+ * The interface that this type extends. This is only applicable to interfaces.
+ * @since 0.12.0
+ */
+ public readonly intfExtends?: CustomType;
+
+ protected constructor(
+ identifier: string,
+ kind: CustomTypeKind,
+ fields: CustomTypeFields,
+ staticFields?: CustomTypeFields,
+ ) {
super(identifier);
- this._fields = fields;
this.kind = kind;
+ this._fields = fields;
+ this._clsStaticFields = staticFields;
}
/**
@@ -66,6 +92,14 @@ export class CustomType extends ProcessedType {
return this._fields;
}
+ /**
+ * The static fields of this type. This is only applicable to classes.
+ * @since 0.12.0
+ */
+ public get clsStaticFields(): CustomTypeFields | undefined {
+ return this._clsStaticFields;
+ }
+
/**
* Creates a custom type from a class declaration.
*
@@ -80,7 +114,7 @@ export class CustomType extends ProcessedType {
const semanticData = classDeclaration.getSemanticData();
for (const field of semanticData.classMembers) {
- fields.set(field.getSemanticData().identifier, field.getTypeSemanticData().type);
+ fields.set(field.getSemanticData().identifier, field.getTypeSemanticData().valueType);
}
return new CustomType(classDeclaration.getSemanticData().identifier, "class", fields);
}
@@ -97,7 +131,7 @@ export class CustomType extends ProcessedType {
const fields: CustomTypeFields = new Map();
for (const field of interfaceDeclaration.getSemanticData().members) {
- fields.set(field.getSemanticData().identifier, field.getTypeSemanticData().type);
+ fields.set(field.getSemanticData().identifier, field.getTypeSemanticData().valueType);
}
return new CustomType(interfaceDeclaration.getSemanticData().identifier, "interface", fields);
}
@@ -162,4 +196,13 @@ export class CustomType extends ProcessedType {
throw new AssignmentTypeError(type.identifier, this.identifier);
}
}
+
+ /**
+ * Returns the field type for the passed identifier. May return undefined if the field does not exist.
+ * @param identifier The identifier of the field to get.
+ * @since 0.12.0
+ */
+ getProperty(identifier: string): CustomTypeField | undefined {
+ return this.fields.get(identifier);
+ }
}
diff --git a/kipper/core/src/compiler/target-presets/semantic-analyser.ts b/kipper/core/src/compiler/target-presets/semantic-analyser.ts
index 187757e88..07fcb5c0b 100644
--- a/kipper/core/src/compiler/target-presets/semantic-analyser.ts
+++ b/kipper/core/src/compiler/target-presets/semantic-analyser.ts
@@ -13,6 +13,7 @@ import type {
BitwiseXorExpression,
BoolPrimaryExpression,
CastOrConvertExpression,
+ ClassConstructorDeclaration,
ClassDeclaration,
ClassMethodDeclaration,
CompoundStatement,
@@ -30,6 +31,7 @@ import type {
IfStatement,
IncrementOrDecrementPostfixExpression,
IncrementOrDecrementUnaryExpression,
+ InstanceOfExpression,
InterfaceDeclaration,
InterfaceMethodDeclaration,
InterfacePropertyDeclaration,
@@ -37,8 +39,10 @@ import type {
LambdaPrimaryExpression,
LogicalAndExpression,
LogicalOrExpression,
+ MatchesExpression,
MemberAccessExpression,
MultiplicativeExpression,
+ NewInstantiationExpression,
NumberPrimaryExpression,
ObjectPrimaryExpression,
ObjectProperty,
@@ -50,16 +54,15 @@ import type {
StringPrimaryExpression,
SwitchStatement,
TangledPrimaryExpression,
+ TryCatchStatement,
TypeData,
+ TypeofExpression,
TypeofTypeSpecifierExpression,
VariableDeclaration,
VoidOrNullOrUndefinedPrimaryExpression,
WhileLoopIterationStatement,
- TypeofExpression,
- TryCatchStatement,
} from "../ast";
import { KipperSemanticErrorHandler } from "../semantics";
-import type { ClassConstructorDeclaration } from "../ast/nodes/declarations/type-declaration/class-declaration/class-member-declaration/class-constructor-declaration/class-constructor-declaration";
/**
* Represents a function that checks the semantics for a {@link AnalysableASTNode}.
@@ -147,6 +150,11 @@ export abstract class KipperTargetSemanticAnalyser extends KipperSemanticErrorHa
*/
public abstract classDeclaration?: TargetASTNodeSemanticAnalyser;
+ /**
+ * Performs translation-specific semantic analysis for {@link NewInstantiationExpression} instances.
+ */
+ public abstract newInstantiationExpression?: TargetASTNodeSemanticAnalyser;
+
/**
* Performs translation-specific semantic analysis for {@link ClassMethodDeclaration} instances.
*/
@@ -338,6 +346,16 @@ export abstract class KipperTargetSemanticAnalyser extends KipperSemanticErrorHa
*/
public abstract typeofExpression?: TargetASTNodeSemanticAnalyser;
+ /**
+ * Performs translation-specific semantic analysis for {@link MatchesExpression} instances.
+ */
+ public abstract matchesExpression?: TargetASTNodeSemanticAnalyser;
+
+ /**
+ * Performs translation-specific semantic analysis for {@link InstanceOfExpression} instances.
+ */
+ public abstract instanceOfExpression?: TargetASTNodeSemanticAnalyser;
+
/**
* Performs translation-specific semantic analysis for {@link TryCatchStatement} instances.
*/
diff --git a/kipper/core/src/compiler/target-presets/translation/code-generator.ts b/kipper/core/src/compiler/target-presets/translation/code-generator.ts
index 11181ca52..0a8a8d98f 100644
--- a/kipper/core/src/compiler/target-presets/translation/code-generator.ts
+++ b/kipper/core/src/compiler/target-presets/translation/code-generator.ts
@@ -32,6 +32,7 @@ import type {
IfStatement,
IncrementOrDecrementPostfixExpression,
IncrementOrDecrementUnaryExpression,
+ InstanceOfExpression,
InterfaceDeclaration,
InterfaceMethodDeclaration,
InterfacePropertyDeclaration,
@@ -39,8 +40,10 @@ import type {
LambdaPrimaryExpression,
LogicalAndExpression,
LogicalOrExpression,
+ MatchesExpression,
MemberAccessExpression,
MultiplicativeExpression,
+ NewInstantiationExpression,
NumberPrimaryExpression,
ObjectPrimaryExpression,
ObjectProperty,
@@ -217,6 +220,14 @@ export abstract class KipperTargetCodeGenerator {
Array
>;
+ /**
+ * Translates a {@link NewInstantiationExpression} into a specific language.
+ */
+ public abstract newInstantiationExpression: TargetASTNodeCodeGenerator<
+ NewInstantiationExpression,
+ TranslatedExpression
+ >;
+
/**
* Translates a {@link VariableDeclaration} into a specific language.
*/
@@ -429,6 +440,16 @@ export abstract class KipperTargetCodeGenerator {
*/
public abstract typeofExpression: TargetASTNodeCodeGenerator;
+ /**
+ * Translates a {@link MatchesExpression} into a specific language.
+ */
+ public abstract matchesExpression: TargetASTNodeCodeGenerator;
+
+ /**
+ * Translates a {@Link InstanceOfExpression} into a specific language.
+ */
+ public abstract instanceOfExpression: TargetASTNodeCodeGenerator;
+
/**
* Translates a {@link TryCatchStatement} into a specific language.
*/
diff --git a/kipper/core/src/errors.ts b/kipper/core/src/errors.ts
index 4f3ff6451..f828c9241 100644
--- a/kipper/core/src/errors.ts
+++ b/kipper/core/src/errors.ts
@@ -329,6 +329,17 @@ export class GenericCanOnlyHaveOneSpreadError extends KipperInternalError {
}
}
+/**
+ * Error that is thrown whenever a variable, type or function is registered in the universe scope where the identifier
+ * is already in use.
+ * @since 0.12.0
+ */
+export class DuplicateUniverseKeyError extends KipperInternalError {
+ constructor(key: string) {
+ super(`Duplicate key '${key}' in universe scope.`);
+ }
+}
+
/**
* An error that is raised whenever a feature is used that has not been implemented yet.
* @since 0.6.0
@@ -541,6 +552,16 @@ export class IdentifierAlreadyUsedByFunctionError extends IdentifierError {
}
}
+/**
+ * Error that is thrown when a new identifier is registered, but the used identifier is already in use by
+ * another member.
+ */
+export class IdentifierAlreadyUsedByMemberError extends IdentifierError {
+ constructor(identifier: string, kind: "interface" | "class") {
+ super(`Redeclaration of ${kind} member '${identifier}'.`);
+ }
+}
+
/**
* Error that is thrown when a new identifier is registered, but the used identifier is already in use by
* a parameter declaration.
@@ -840,6 +861,26 @@ export class PropertyDoesNotExistError extends TypeError {
}
}
+/**
+ * Error that is thrown whenever a type is used for an instanceof expression that is not a class.
+ * @since 0.12.0
+ */
+export class InvalidInstanceOfTypeError extends TypeError {
+ constructor(type: string) {
+ super(`Type '${type}' can not be used with 'instanceof' operator. Expects a class.`);
+ }
+}
+
+/**
+ * Error that is thrown whenever a type is used for a matches expression that is not an interface.
+ * @since 0.12.0
+ */
+export class InvalidMatchesTypeError extends TypeError {
+ constructor(type: string) {
+ super(`Type '${type}' can not be used with 'matches' operator. Expects an interface.`);
+ }
+}
+
/**
* Error that is thrown whenever a constant declaration is not defined.
* @since 0.8.3
diff --git a/kipper/core/src/index.ts b/kipper/core/src/index.ts
index 5d04c8186..c4b7e150e 100644
--- a/kipper/core/src/index.ts
+++ b/kipper/core/src/index.ts
@@ -17,7 +17,7 @@ export * as utils from "./tools";
// eslint-disable-next-line no-unused-vars
export const name = "@kipper/core";
// eslint-disable-next-line no-unused-vars
-export const version = "0.12.0-alpha.1";
+export const version = "0.12.0";
// eslint-disable-next-line no-unused-vars
export const author = "Luna Klatzer";
// eslint-disable-next-line no-unused-vars
diff --git a/kipper/core/src/tools/functions/indent.ts b/kipper/core/src/tools/functions/indent.ts
index 1544b084d..417d55af9 100644
--- a/kipper/core/src/tools/functions/indent.ts
+++ b/kipper/core/src/tools/functions/indent.ts
@@ -1,13 +1,16 @@
/**
* Adds a left indentation to the message with the specified amount of spaces.
* @param msg The message to indent.
- * @param prefix The prefix to add to the message.
+ * @param firstLinePrefix The prefix to add to the message on the first line.
* @param spaces The amount of spaces to indent the message with.
* @since 0.11.0
*/
-export function addLeftIndent(msg: string, prefix: string = "", spaces: number = 2): string {
+export function addLeftIndent(msg: string, firstLinePrefix: string = "", spaces: number = 2): string {
return msg
.split("\n")
- .map((line: string): string => `${" ".repeat(spaces)}${prefix}${line}`)
+ .map(
+ (line, index) =>
+ (index === 0 ? " ".repeat(spaces) + firstLinePrefix : " ".repeat(spaces + firstLinePrefix.length)) + line,
+ )
.join("\n");
}
diff --git a/kipper/index.ts b/kipper/index.ts
index c4867a806..40352fe10 100644
--- a/kipper/index.ts
+++ b/kipper/index.ts
@@ -13,7 +13,7 @@ export * from "@kipper/target-ts";
// eslint-disable-next-line no-unused-vars
export const name = "kipper";
// eslint-disable-next-line no-unused-vars
-export const version = "0.12.0-alpha.1";
+export const version = "0.12.0";
// eslint-disable-next-line no-unused-vars
export const author = "Luna Klatzer";
// eslint-disable-next-line no-unused-vars
diff --git a/kipper/target-js/package.json b/kipper/target-js/package.json
index 7304ef8a0..a3c533095 100644
--- a/kipper/target-js/package.json
+++ b/kipper/target-js/package.json
@@ -1,14 +1,14 @@
{
"name": "@kipper/target-js",
"description": "The JavaScript target for the Kipper compiler 🦊",
- "version": "0.12.0-alpha.1",
+ "version": "0.12.0",
"author": "Luna-Klatzer @Luna-Klatzer",
"dependencies": {
"@kipper/core": "workspace:~",
"tslib": "~2.6.2"
},
"devDependencies": {
- "@types/node": "18.16.16",
+ "@types/node": "20.16.5",
"typescript": "5.1.3",
"prettier": "3.3.3"
},
diff --git a/kipper/target-js/pnpm-lock.yaml b/kipper/target-js/pnpm-lock.yaml
index 988078785..ff12758ea 100644
--- a/kipper/target-js/pnpm-lock.yaml
+++ b/kipper/target-js/pnpm-lock.yaml
@@ -14,8 +14,8 @@ dependencies:
devDependencies:
'@types/node':
- specifier: 18.16.16
- version: 18.16.16
+ specifier: 20.16.5
+ version: 20.16.5
prettier:
specifier: 3.3.3
version: 3.3.3
@@ -25,8 +25,10 @@ devDependencies:
packages:
- /@types/node@18.16.16:
- resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==}
+ /@types/node@20.16.5:
+ resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==}
+ dependencies:
+ undici-types: 6.19.8
dev: true
/prettier@3.3.3:
@@ -42,3 +44,7 @@ packages:
resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==}
engines: {node: '>=14.17'}
dev: true
+
+ /undici-types@6.19.8:
+ resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
+ dev: true
diff --git a/kipper/target-js/src/code-generator.ts b/kipper/target-js/src/code-generator.ts
index 8751c0a9e..937b9ca88 100644
--- a/kipper/target-js/src/code-generator.ts
+++ b/kipper/target-js/src/code-generator.ts
@@ -33,6 +33,7 @@ import type {
IdentifierTypeSpecifierExpression,
IncrementOrDecrementPostfixExpression,
IncrementOrDecrementUnaryExpression,
+ InstanceOfExpression,
InterfaceDeclaration,
JumpStatement,
KipperProgramContext,
@@ -41,8 +42,10 @@ import type {
LogicalExpression,
LogicalExpressionSemantics,
LogicalOrExpression,
+ MatchesExpression,
MemberAccessExpression,
MultiplicativeExpression,
+ NewInstantiationExpression,
NumberPrimaryExpression,
ObjectPrimaryExpression,
ObjectProperty,
@@ -61,22 +64,24 @@ import type {
TypeofTypeSpecifierExpression,
VoidOrNullOrUndefinedPrimaryExpression,
WhileLoopIterationStatement,
+ InterfaceMethodDeclaration,
+ InterfacePropertyDeclaration,
} from "@kipper/core";
import {
+ AssignmentExpression,
+ BuiltInType,
BuiltInTypes,
CompoundStatement,
Expression,
getConversionFunctionIdentifier,
IfStatement,
KipperTargetCodeGenerator,
- VariableDeclaration,
- InterfaceMethodDeclaration,
- InterfacePropertyDeclaration,
- AssignmentExpression,
ScopeDeclaration,
+ VariableDeclaration,
} from "@kipper/core";
import { createJSFunctionSignature, getJSFunctionSignature, indentLines, removeBraces } from "./tools";
-import { TargetJS, version } from "./index";
+import { KipperJavaScriptTarget, TargetJS, version } from "./index";
+import { RuntimeTypesGenerator } from "./runtime-types";
function removeBrackets(lines: Array) {
return lines.slice(1, lines.length - 1);
@@ -119,6 +124,10 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
[
"var __createKipper = () => {" +
" if (__globalScope.__kipper || __kipper) { return undefined; }" +
+ " class KipperError extends Error { constructor(msg) { super(msg); this.name='KipError'; }};" +
+ " class KipperNotImplementedError extends KipperError { " +
+ " constructor(msg) { super(msg); this.name = 'KipNotImplementedError'; } " +
+ " }" +
" class KipperType {" +
" constructor(name, fields, methods, baseType = null) " +
" { this.name = name; this.fields = fields; this.methods = methods; this.baseType = baseType; }" +
@@ -130,9 +139,6 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
" isCompatibleWith(obj) { return this.name === obj.name; }" +
" changeGenericTypeArguments(genericArgs) { return new KipperGenericType(this.name, this.fields, this.methods, genericArgs, this.baseType) }" +
" };" +
- " class KipperError extends Error { " +
- ` constructor(msg) { this.name="Error"; this.msg = msg; }` +
- " };" +
" const __type_any = new KipperType('any', undefined, undefined);" +
" const __type_null = new KipperType('null', undefined, undefined);" +
" const __type_undefined = new KipperType('undefined', undefined, undefined);" +
@@ -144,9 +150,12 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
" const __type_Func = new KipperGenericType('Func', undefined, undefined, {T: [], R: __type_any});" +
" const __type_Error = new KipperType('error', undefined, undefined);" +
" return {" +
+ " KipperError: KipperError," +
" TypeError: (class KipperTypeError extends KipperError { constructor(msg) { super(msg); this.name = 'KipTypeError'; } })," +
" IndexError: (class KipperIndexError extends KipperError { constructor(msg) { super(msg); this.name = 'KipIndexError'; } })," +
+ " NotImplementedError: KipperNotImplementedError," +
" Property: class KipperProperty { constructor(name, type) { this.name = name; this.type = type; } }," +
+ " MethodParameter: class MethodParameter { constructor(name, type) { this.name = name; this.type = type; } }," +
" Method: class KipperMethod { constructor(name, returnType, parameters) { this.name = name; this.returnType = returnType; this.parameters = parameters; } }," +
" Type: KipperType," +
" builtIn: {" +
@@ -187,6 +196,61 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
" }" +
" }" +
" }," +
+ " matches: (value, pattern) => {" +
+ " const primTypes = [ 'str', 'num', 'bool', 'null', 'undefined' ];" +
+ " const genTypes = [ 'Array', 'Func' ];" +
+ " if (pattern.fields && Array.isArray(pattern.fields)) {" +
+ " for (const field of pattern.fields) {" +
+ " const fieldName = field.name;" +
+ " const fieldType = field.type;" +
+ " const nameIsInType = fieldName in value;" +
+ " if (!nameIsInType) {" +
+ " return false;" +
+ " }" +
+ " const fieldValue = value[fieldName];" +
+ " const isSameType = __kipper.typeOf(fieldValue) === field.type;" +
+ " if (primTypes.includes(field.type.name) && !isSameType) {" +
+ " return false;" +
+ " }" +
+ " if (genTypes.includes(fieldType.name)) {" +
+ " throw new KipperNotImplementedError(\"Matches does not yet support the 'Array' and 'Func' types\");" +
+ " }" +
+ " if (!primTypes.includes(fieldType.name)) {" +
+ " if (!__kipper.matches(fieldValue, fieldType)) {" +
+ " return false;" +
+ " }" +
+ " }" +
+ " }" +
+ " }" +
+ " if (pattern.methods && Array.isArray(pattern.methods)) {" +
+ " for (const field of pattern.methods) {" +
+ " const fieldName = field.name;" +
+ " const fieldReturnType = field.returnType;" +
+ " const parameters = field.parameters;" +
+ " const nameIsInType = fieldName in value;" +
+ " if (!nameIsInType) {" +
+ " return false;" +
+ " }" +
+ " const fieldValue = value[fieldName];" +
+ " const isSameType = fieldReturnType === fieldValue.__kipType.genericArgs.R;" +
+ " if (!isSameType) {" +
+ " return false;" +
+ " }" +
+ " const methodParameters = fieldValue.__kipType.genericArgs.T;" +
+ " if (parameters.length !== methodParameters.length) {" +
+ " return false;" +
+ " }" +
+ " let count = 0;" +
+ " for (let param of parameters) {" +
+ " if (param.type.name !== methodParameters[count].name) {" +
+ " return false;" +
+ " }" +
+ " count++;" +
+ " }" +
+ " }" +
+ " }" +
+ " return true;" +
+ " }," +
inlinedRequirements +
" };" +
"};",
@@ -208,55 +272,6 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
return [];
};
- protected generateInterfaceRuntimeTypeChecks = async (
- node: InterfaceDeclaration,
- ): Promise> => {
- const semanticData = node.getSemanticData();
- const interfaceName = semanticData.identifier;
- const interfaceMembers = semanticData.members;
- const identifier = "__intf_" + interfaceName;
-
- let propertiesWithTypes = "";
- let functionsWithTypes = "";
- for (let member of interfaceMembers) {
- if (member instanceof InterfacePropertyDeclaration) {
- const property = member.getSemanticData();
- const type = member.getTypeSemanticData();
- const runtimeType = TargetJS.getRuntimeType(type.type);
- propertiesWithTypes +=
- `new ${TargetJS.getBuiltInIdentifier("Property")}` + `("${property.identifier}", ${runtimeType}),`;
- }
- if (member instanceof InterfaceMethodDeclaration) {
- const method = member.getSemanticData();
- const returnType = member.getTypeSemanticData();
- const params = method.parameters.map((param) => {
- return param.getTypeSemanticData().valueType;
- });
- const runtimeReturnType = TargetJS.getRuntimeType(returnType.type);
- const runtimeParams = params.map((paramType) => {
- return `__intf_${TargetJS.getRuntimeType(paramType)}`;
- });
- functionsWithTypes +=
- `new ${TargetJS.getBuiltInIdentifier("Method")}` +
- `("${method.identifier}", ${runtimeReturnType}, [${runtimeParams.join(",")}]),`;
- }
- }
-
- let lines: Array = [
- [
- "const ",
- identifier,
- ` = new ${TargetJS.internalObjectIdentifier}.Type("` + interfaceName + '"',
- ", [",
- propertiesWithTypes,
- "], [",
- functionsWithTypes,
- "])",
- ],
- ];
- return lines;
- };
-
/**
* Translates a {@link CompoundStatement} into the JavaScript language.
*/
@@ -559,7 +574,7 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
* Translates a {@link AssignmentExpression} into the JavaScript language.
*/
interfaceDeclaration = async (node: InterfaceDeclaration): Promise> => {
- const runtimeInterfaceType = await this.generateInterfaceRuntimeTypeChecks(node);
+ const runtimeInterfaceType = await RuntimeTypesGenerator.generateInterfaceRuntimeType(node);
return [...runtimeInterfaceType];
};
@@ -606,6 +621,18 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
];
};
+ newInstantiationExpression = async (node: NewInstantiationExpression): Promise => {
+ const semanticData = node.getSemanticData();
+ const identifier = semanticData.class.getSemanticData().rawType.identifier;
+ const args = semanticData.args;
+ const translatedArgs = args.map(async (arg) => {
+ return await arg.translateCtxAndChildren();
+ });
+ const finishedArgs = await Promise.all(translatedArgs);
+
+ return ["new", " ", identifier, "(", ...finishedArgs.join(", "), ")"];
+ };
+
classPropertyDeclaration = async (node: ClassPropertyDeclaration): Promise => {
const semanticData = node.getSemanticData();
const identifier = semanticData.identifier;
@@ -616,7 +643,7 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
classMethodDeclaration = async (node: ClassMethodDeclaration): Promise> => {
const semanticData = node.getSemanticData();
const identifier = semanticData.identifier;
- const params = semanticData.parameters;
+ const params = semanticData.params;
const body = semanticData.functionBody;
const concatParams = async () => {
@@ -628,7 +655,7 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
return translatedParams.join(", ");
};
- return [[`${identifier}(${await concatParams()}) {`], ...(await body.translateCtxAndChildren()), ["}"]];
+ return [[identifier, `(`, await concatParams(), `)`], ...(await body.translateCtxAndChildren())];
};
/**
@@ -636,7 +663,7 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
*/
classConstructorDeclaration = async (node: ClassConstructorDeclaration): Promise> => {
const semanticData = node.getSemanticData();
- const params = semanticData.parameters;
+ const params = semanticData.params;
const body = semanticData.functionBody;
let processedParams = (
@@ -650,7 +677,7 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
.flat();
processedParams.pop();
- return [["constructor", "(", ...processedParams, ")", " "], ...(await body.translateCtxAndChildren())];
+ return [["constructor", "(", ...processedParams, ")"], ...(await body.translateCtxAndChildren())];
};
/**
@@ -1132,4 +1159,35 @@ export class JavaScriptTargetCodeGenerator extends KipperTargetCodeGenerator {
return [TargetJS.getBuiltInIdentifier("typeOf"), "(", ...operand, ")"];
};
+
+ /**
+ * Translates a {@link MatchesExpression} into the JavaScript language.
+ */
+ matchesExpression = async (node: MatchesExpression): Promise => {
+ const semanticData = node.getSemanticData();
+ const pattern = semanticData.pattern.getTypeSemanticData();
+ const translatedExpression = await semanticData.expression.translateCtxAndChildren();
+
+ return [
+ TargetJS.getBuiltInIdentifier("matches"),
+ "(",
+ ...translatedExpression,
+ ", ",
+ // Always only accepts a Kipper interface
+ `${TargetJS.internalInterfacePrefix}_${pattern.storedType.identifier}`,
+ ")",
+ ];
+ };
+
+ /**
+ * Translates a {@link InstanceOfExpression} into the JavaScript language.
+ */
+ instanceOfExpression = async (node: InstanceOfExpression): Promise => {
+ const semanticData = node.getSemanticData();
+ const typeData = node.getTypeSemanticData();
+ const operand = await semanticData.operand.translateCtxAndChildren();
+ const classType = TargetJS.getRuntimeType(typeData.classType);
+
+ return [...operand, " ", "instanceof", " ", classType];
+ };
}
diff --git a/kipper/target-js/src/index.ts b/kipper/target-js/src/index.ts
index 336ef6ca5..fce744b2d 100644
--- a/kipper/target-js/src/index.ts
+++ b/kipper/target-js/src/index.ts
@@ -8,12 +8,13 @@ export * from "./target";
export * from "./semantic-analyser";
export * from "./code-generator";
export * from "./built-in-generator";
+export * from "./runtime-types";
export * from "./tools";
// eslint-disable-next-line no-unused-vars
export const name = "@kipper/target-js";
// eslint-disable-next-line no-unused-vars
-export const version = "0.12.0-alpha.1";
+export const version = "0.12.0";
// eslint-disable-next-line no-unused-vars
export const author = "Luna Klatzer";
// eslint-disable-next-line no-unused-vars
diff --git a/kipper/target-js/src/runtime-types.ts b/kipper/target-js/src/runtime-types.ts
new file mode 100644
index 000000000..369b7047c
--- /dev/null
+++ b/kipper/target-js/src/runtime-types.ts
@@ -0,0 +1,73 @@
+import type { InterfaceDeclaration, TranslatedCodeLine } from "@kipper/core";
+import { BuiltInType, InterfaceMethodDeclaration, InterfacePropertyDeclaration } from "@kipper/core";
+import { KipperJavaScriptTarget, TargetJS } from "./index";
+
+/**
+ * The runtime types generator for the JavaScript target.
+ * @since 0.12.0
+ */
+export class RuntimeTypesGenerator {
+ /**
+ * Generates the runtime type structure for an interface declaration.
+ * @param node The node to translate.
+ * @since 0.12.0
+ */
+ public static async generateInterfaceRuntimeType(node: InterfaceDeclaration): Promise> {
+ const semanticData = node.getSemanticData();
+ const interfaceName = semanticData.identifier;
+ const interfaceMembers = semanticData.members;
+ const identifier = `${KipperJavaScriptTarget.internalInterfacePrefix}_${interfaceName}`;
+
+ const propertiesWithTypes: Array = [];
+ const functionsWithTypes: Array = [];
+ for (let member of interfaceMembers) {
+ if (member instanceof InterfacePropertyDeclaration) {
+ const property = member.getSemanticData();
+ const type = member.getTypeSemanticData();
+
+ if (type.valueType instanceof BuiltInType) {
+ const runtimeType = TargetJS.getRuntimeType(type.valueType);
+ propertiesWithTypes.push(
+ `new ${TargetJS.getBuiltInIdentifier("Property")}("${property.identifier}", ${runtimeType}),`,
+ );
+ } else {
+ propertiesWithTypes.push(
+ `new ${TargetJS.getBuiltInIdentifier("Property")}("${property.identifier}",` +
+ ` ${KipperJavaScriptTarget.internalInterfacePrefix}_${type.valueType}),`,
+ );
+ }
+ }
+
+ if (member instanceof InterfaceMethodDeclaration) {
+ const method = member.getSemanticData();
+ const methodName = method.identifier;
+ const returnType = method.returnTypeSpecifier.getTypeSemanticData().storedType;
+ const runtimeReturnType = TargetJS.getRuntimeType(returnType);
+
+ const paramsArray = method.params.map((param) => {
+ const type = param.getTypeSemanticData().valueType;
+ const name = param.getSemanticData().identifier;
+ return `new ${TargetJS.getBuiltInIdentifier("Property")}` + `("${name}", ${TargetJS.getRuntimeType(type)})`;
+ });
+ const params = paramsArray.length > 0 ? `[${paramsArray.join(", ")}]` : "[]";
+
+ functionsWithTypes.push(
+ `new ${TargetJS.getBuiltInIdentifier("Method")}` + `("${methodName}", ${runtimeReturnType}, ${params})`,
+ );
+ }
+ }
+
+ return [
+ [
+ "const ",
+ identifier,
+ ` = new ${TargetJS.internalObjectIdentifier}.Type("` + interfaceName + '"',
+ ", [",
+ ...propertiesWithTypes,
+ "], [",
+ ...functionsWithTypes,
+ "])",
+ ],
+ ];
+ }
+}
diff --git a/kipper/target-js/src/semantic-analyser.ts b/kipper/target-js/src/semantic-analyser.ts
index 86af33728..88e20d048 100644
--- a/kipper/target-js/src/semantic-analyser.ts
+++ b/kipper/target-js/src/semantic-analyser.ts
@@ -8,11 +8,11 @@ import type {
Declaration,
FunctionDeclaration,
InterfaceDeclaration,
+ InterfaceMethodDeclaration,
InterfacePropertyDeclaration,
ParameterDeclaration,
TargetASTNodeSemanticAnalyser,
VariableDeclaration,
- InterfaceMethodDeclaration,
} from "@kipper/core";
import { KipperTargetSemanticAnalyser, ReservedIdentifierOverwriteError } from "@kipper/core";
import { TargetJS } from "./target";
@@ -145,6 +145,11 @@ export class JavaScriptTargetSemanticAnalyser extends KipperTargetSemanticAnalys
this.checkViabilityOfIdentifier(node);
};
+ /**
+ * Performs typescript-specific semantic analysis for {@link NewInstantiationExpression} instances.
+ */
+ newInstantiationExpression = undefined;
+
/**
* Performs typescript-specific semantic analysis for {@link classConstructorDeclaration} instances.
*/
@@ -322,4 +327,14 @@ export class JavaScriptTargetSemanticAnalyser extends KipperTargetSemanticAnalys
* Performs typescript-specific semantic analysis for {@link TypeofExpression} instances.
*/
typeofExpression = undefined;
+
+ /**
+ * Performs typescript-specific semantic analysis for {@link MatchesExpression} instances.
+ */
+ matchesExpression = undefined;
+
+ /**
+ * Performs typescript-specific semantic analysis for {@link InstanceOfExpression} instances.
+ */
+ instanceOfExpression = undefined;
}
diff --git a/kipper/target-js/src/target.ts b/kipper/target-js/src/target.ts
index b8d258256..973f5828c 100644
--- a/kipper/target-js/src/target.ts
+++ b/kipper/target-js/src/target.ts
@@ -5,8 +5,7 @@
* @since 0.10.0
*/
import type { BuiltInFunction, ProcessedType } from "@kipper/core";
-import { BuiltInType } from "@kipper/core";
-import { BuiltInVariable, KipperCompileTarget } from "@kipper/core";
+import { BuiltInType, BuiltInVariable, KipperCompileTarget } from "@kipper/core";
import { JavaScriptTargetSemanticAnalyser } from "./semantic-analyser";
import { JavaScriptTargetCodeGenerator } from "./code-generator";
import { JavaScriptTargetBuiltInGenerator } from "./built-in-generator";
@@ -22,6 +21,12 @@ export class KipperJavaScriptTarget extends KipperCompileTarget {
*/
static readonly internalObjectIdentifier = "__kipper";
+ /**
+ * The internal prefix for interfaces in the JavaScript target.
+ * @since 0.12.0
+ */
+ static readonly internalInterfacePrefix = "__intf";
+
/**
* All reserved identifiers in JavaScript (and TypeScript for good measure) that may not be overwritten.
* @since 0.10.0
diff --git a/kipper/target-ts/package.json b/kipper/target-ts/package.json
index 0973653f7..a1cfefba4 100644
--- a/kipper/target-ts/package.json
+++ b/kipper/target-ts/package.json
@@ -1,7 +1,7 @@
{
"name": "@kipper/target-ts",
"description": "The TypeScript target for the Kipper compiler 🦊",
- "version": "0.12.0-alpha.1",
+ "version": "0.12.0",
"author": "Luna-Klatzer @Luna-Klatzer",
"dependencies": {
"@kipper/target-js": "workspace:~",
@@ -9,7 +9,7 @@
"tslib": "~2.6.2"
},
"devDependencies": {
- "@types/node": "18.16.16",
+ "@types/node": "20.16.5",
"typescript": "5.1.3",
"prettier": "3.3.3"
},
diff --git a/kipper/target-ts/pnpm-lock.yaml b/kipper/target-ts/pnpm-lock.yaml
index a140032c6..50bddf86d 100644
--- a/kipper/target-ts/pnpm-lock.yaml
+++ b/kipper/target-ts/pnpm-lock.yaml
@@ -17,8 +17,8 @@ dependencies:
devDependencies:
'@types/node':
- specifier: 18.16.16
- version: 18.16.16
+ specifier: 20.16.5
+ version: 20.16.5
prettier:
specifier: 3.3.3
version: 3.3.3
@@ -28,8 +28,10 @@ devDependencies:
packages:
- /@types/node@18.16.16:
- resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==}
+ /@types/node@20.16.5:
+ resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==}
+ dependencies:
+ undici-types: 6.19.8
dev: true
/prettier@3.3.3:
@@ -45,3 +47,7 @@ packages:
resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==}
engines: {node: '>=14.17'}
dev: true
+
+ /undici-types@6.19.8:
+ resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
+ dev: true
diff --git a/kipper/target-ts/src/code-generator.ts b/kipper/target-ts/src/code-generator.ts
index 43837d1ce..30aef9e7f 100644
--- a/kipper/target-ts/src/code-generator.ts
+++ b/kipper/target-ts/src/code-generator.ts
@@ -3,22 +3,21 @@
* @since 0.8.0
*/
import type {
+ ClassMethodDeclaration,
+ ClassPropertyDeclaration,
FunctionDeclaration,
InterfaceDeclaration,
+ InterfaceMethodDeclaration,
+ InterfacePropertyDeclaration,
ObjectPrimaryExpression,
ParameterDeclaration,
TranslatedCodeLine,
TranslatedExpression,
VariableDeclaration,
- ClassMethodDeclaration,
- ClassPropertyDeclaration,
- InterfaceMethodDeclaration,
- InterfacePropertyDeclaration,
} from "@kipper/core";
-import { CompoundStatement } from "@kipper/core";
-import { Expression, type LambdaPrimaryExpression } from "@kipper/core";
+import { CompoundStatement, Expression, type LambdaPrimaryExpression } from "@kipper/core";
import { createTSFunctionSignature, getTSFunctionSignature } from "./tools";
-import { indentLines, JavaScriptTargetCodeGenerator, TargetJS } from "@kipper/target-js";
+import { indentLines, JavaScriptTargetCodeGenerator, RuntimeTypesGenerator, TargetJS } from "@kipper/target-js";
import { TargetTS } from "./target";
/**
@@ -76,7 +75,7 @@ export class TypeScriptTargetCodeGenerator extends JavaScriptTargetCodeGenerator
}),
);
- const runtimeInterfaceType = await this.generateInterfaceRuntimeTypeChecks(node);
+ const runtimeInterfaceType = await RuntimeTypesGenerator.generateInterfaceRuntimeType(node);
return [
["interface", " ", interfaceName, " ", "{"],
...memberDeclarations.flat().map((line) => [" ", ...line]),
@@ -89,8 +88,10 @@ export class TypeScriptTargetCodeGenerator extends JavaScriptTargetCodeGenerator
node: InterfaceMethodDeclaration,
): Promise> => {
const semanticData = node.getSemanticData();
- const params = semanticData.parameters;
- const returnTypeIdentifier = TargetTS.getTypeScriptType(semanticData.returnType.getTypeSemanticData().storedType);
+ const params = semanticData.params;
+ const returnTypeIdentifier = TargetTS.getTypeScriptType(
+ semanticData.returnTypeSpecifier.getTypeSemanticData().storedType,
+ );
const paramsCode: TranslatedCodeLine[] = await Promise.all(
params.map(async (param) => {
@@ -119,7 +120,7 @@ export class TypeScriptTargetCodeGenerator extends JavaScriptTargetCodeGenerator
const semanticData = node.getSemanticData();
const typeSemantics = node.getTypeSemanticData();
const identifier = semanticData.identifier;
- const valueType = TargetTS.getTypeScriptType(typeSemantics.type);
+ const valueType = TargetTS.getTypeScriptType(typeSemantics.valueType);
// Return the property declaration
return [[identifier, ":", " ", valueType, ";"]];
@@ -130,7 +131,7 @@ export class TypeScriptTargetCodeGenerator extends JavaScriptTargetCodeGenerator
const typeData = node.getTypeSemanticData();
const params = semanticData.params;
const body = semanticData.functionBody;
- const returnTypeSpecifier = TargetTS.getTypeScriptType(typeData.type.returnType);
+ const returnTypeSpecifier = TargetTS.getTypeScriptType(typeData.valueType.returnType);
const funcType = node.getTypeSemanticData().evaluatedType;
// Generate the function signature
@@ -198,11 +199,14 @@ export class TypeScriptTargetCodeGenerator extends JavaScriptTargetCodeGenerator
override classMethodDeclaration = async (node: ClassMethodDeclaration): Promise> => {
const semanticData = node.getSemanticData();
+ const typeData = node.getTypeSemanticData();
const identifier = semanticData.identifier;
- const params = semanticData.parameters;
+ const params = semanticData.params;
const body = semanticData.functionBody;
- const evaluatedType = TargetTS.getTypeScriptType(semanticData.returnType.getTypeSemanticData().storedType);
- const returnType = evaluatedType;
+
+ // Get the required function signature
+ const type = typeData.valueType;
+ const returnType = TargetTS.getTypeScriptType(type.returnType);
const translatedParams = (
await Promise.all(
diff --git a/kipper/target-ts/src/index.ts b/kipper/target-ts/src/index.ts
index 004db3b08..284f32921 100644
--- a/kipper/target-ts/src/index.ts
+++ b/kipper/target-ts/src/index.ts
@@ -13,7 +13,7 @@ export * from "./tools";
// eslint-disable-next-line no-unused-vars
export const name = "@kipper/target-ts";
// eslint-disable-next-line no-unused-vars
-export const version = "0.12.0-alpha.1";
+export const version = "0.12.0";
// eslint-disable-next-line no-unused-vars
export const author = "Luna Klatzer";
// eslint-disable-next-line no-unused-vars
diff --git a/kipper/target-ts/src/target.ts b/kipper/target-ts/src/target.ts
index 3fa8b079d..493e73665 100644
--- a/kipper/target-ts/src/target.ts
+++ b/kipper/target-ts/src/target.ts
@@ -3,8 +3,7 @@
* @since 0.10.0
*/
import type { BuiltInFunction, BuiltInVariable, ProcessedType } from "@kipper/core";
-import { UnionType, CustomType } from "@kipper/core";
-import { BuiltInTypes, KipperCompileTarget, KipperNotImplementedError } from "@kipper/core";
+import { BuiltInTypes, CustomType, KipperCompileTarget, KipperNotImplementedError, UnionType } from "@kipper/core";
import { TypeScriptTargetSemanticAnalyser } from "./semantic-analyser";
import { TypeScriptTargetCodeGenerator } from "./code-generator";
import { TypeScriptTargetBuiltInGenerator } from "./built-in-generator";
@@ -88,6 +87,9 @@ export class KipperTypeScriptTarget extends KipperCompileTarget {
);
return `Array<${memberType}>`;
}
+ case BuiltInTypes.obj.identifier: {
+ return "object";
+ }
case BuiltInTypes.any.identifier: {
return "any";
}
diff --git a/kipper/target-ts/src/tools.ts b/kipper/target-ts/src/tools.ts
index d0594ef1f..fab1703d0 100644
--- a/kipper/target-ts/src/tools.ts
+++ b/kipper/target-ts/src/tools.ts
@@ -34,7 +34,7 @@ export function getTSFunctionSignature(funcSpec: InternalFunction | BuiltInFunct
type: param.getTypeSemanticData().valueType,
};
}),
- returnType: typeData.type.returnType,
+ returnType: typeData.valueType.returnType,
};
} else {
return {
diff --git a/kipper/web/package.json b/kipper/web/package.json
index 8fc7b3c3a..8fb4a9184 100644
--- a/kipper/web/package.json
+++ b/kipper/web/package.json
@@ -1,13 +1,13 @@
{
"name": "@kipper/web",
"description": "The standalone web-module for the Kipper compiler 🦊",
- "version": "0.12.0-alpha.1",
+ "version": "0.12.0",
"author": "Luna-Klatzer @Luna-Klatzer",
"devDependencies": {
"@kipper/target-js": "workspace:~",
"@kipper/target-ts": "workspace:~",
"@kipper/core": "workspace:~",
- "@types/node": "18.16.16",
+ "@types/node": "20.16.5",
"typescript": "5.1.3",
"prettier": "3.3.3",
"browserify": "17.0.0",
diff --git a/kipper/web/pnpm-lock.yaml b/kipper/web/pnpm-lock.yaml
index c85e80731..2a30cd8f3 100644
--- a/kipper/web/pnpm-lock.yaml
+++ b/kipper/web/pnpm-lock.yaml
@@ -15,8 +15,8 @@ devDependencies:
specifier: workspace:~
version: link:../target-ts
'@types/node':
- specifier: 18.16.16
- version: 18.16.16
+ specifier: 20.16.5
+ version: 20.16.5
browserify:
specifier: 17.0.0
version: 17.0.0
@@ -32,8 +32,10 @@ devDependencies:
packages:
- /@types/node@18.16.16:
- resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==}
+ /@types/node@20.16.5:
+ resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==}
+ dependencies:
+ undici-types: 6.19.8
dev: true
/JSONStream@1.3.5:
@@ -1207,6 +1209,10 @@ packages:
xtend: 4.0.2
dev: true
+ /undici-types@6.19.8:
+ resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
+ dev: true
+
/url@0.11.0:
resolution: {integrity: sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==}
dependencies:
diff --git a/package.json b/package.json
index 43bbecf53..6741d1145 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "kipper",
"description": "The Kipper programming language and compiler 🦊",
- "version": "0.12.0-alpha.1",
+ "version": "0.12.0",
"author": "Luna-Klatzer @Luna-Klatzer",
"dependencies": {
"@kipper/cli": "workspace:~",
@@ -16,8 +16,8 @@
"@oclif/test": "2.5.6",
"@types/chai": "4.3.0",
"@types/mocha": "10.0.7",
- "@types/node": "18.16.16",
- "@types/semver": "7.5.7",
+ "@types/node": "20.16.5",
+ "@types/semver": "7.5.8",
"@typescript-eslint/eslint-plugin": "7.16.0",
"ansi-regex": "6.0.1",
"antlr4ts": "0.5.0-alpha.4",
@@ -32,7 +32,7 @@
"nyc": "17.0.0",
"prettier": "3.3.3",
"run-script-os": "1.1.6",
- "semver": "7.6.0",
+ "semver": "7.6.3",
"source-map-support": "0.5.21",
"ts-mocha": "10.0.0",
"ts-node": "10.9.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9ab144053..558a8d500 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -30,7 +30,7 @@ devDependencies:
version: 1.0.2(nyc@17.0.0)
'@oclif/test':
specifier: 2.5.6
- version: 2.5.6(@types/node@18.16.16)(typescript@5.1.3)
+ version: 2.5.6(@types/node@20.16.5)(typescript@5.1.3)
'@types/chai':
specifier: 4.3.0
version: 4.3.0
@@ -38,11 +38,11 @@ devDependencies:
specifier: 10.0.7
version: 10.0.7
'@types/node':
- specifier: 18.16.16
- version: 18.16.16
+ specifier: 20.16.5
+ version: 20.16.5
'@types/semver':
- specifier: 7.5.7
- version: 7.5.7
+ specifier: 7.5.8
+ version: 7.5.8
'@typescript-eslint/eslint-plugin':
specifier: 7.16.0
version: 7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.1.3)
@@ -86,8 +86,8 @@ devDependencies:
specifier: 1.1.6
version: 1.1.6
semver:
- specifier: 7.6.0
- version: 7.6.0
+ specifier: 7.6.3
+ version: 7.6.3
source-map-support:
specifier: 0.5.21
version: 0.5.21
@@ -96,7 +96,7 @@ devDependencies:
version: 10.0.0(mocha@10.6.0)
ts-node:
specifier: 10.9.2
- version: 10.9.2(@types/node@18.16.16)(typescript@5.1.3)
+ version: 10.9.2(@types/node@20.16.5)(typescript@5.1.3)
tsify:
specifier: 5.0.4
version: 5.0.4(browserify@17.0.0)(typescript@5.1.3)
@@ -466,7 +466,7 @@ packages:
fastq: 1.17.1
dev: true
- /@oclif/core@2.15.0(@types/node@18.16.16)(typescript@5.1.3):
+ /@oclif/core@2.15.0(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA==}
engines: {node: '>=14.0.0'}
dependencies:
@@ -493,7 +493,7 @@ packages:
strip-ansi: 6.0.1
supports-color: 8.1.1
supports-hyperlinks: 2.3.0
- ts-node: 10.9.2(@types/node@18.16.16)(typescript@5.1.3)
+ ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.1.3)
tslib: 2.6.2
widest-line: 3.1.0
wordwrap: 1.0.0
@@ -505,11 +505,11 @@ packages:
- typescript
dev: true
- /@oclif/test@2.5.6(@types/node@18.16.16)(typescript@5.1.3):
+ /@oclif/test@2.5.6(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-AcusFApdU6/akXaofhBDrY4IM9uYzlOD9bYCCM0NwUXOv1m6320hSp2DT/wkj9H1gsvKbJXZHqgtXsNGZTWLFg==}
engines: {node: '>=12.0.0'}
dependencies:
- '@oclif/core': 2.15.0(@types/node@18.16.16)(typescript@5.1.3)
+ '@oclif/core': 2.15.0(@types/node@20.16.5)(typescript@5.1.3)
fancy-test: 2.0.42
transitivePeerDependencies:
- '@swc/core'
@@ -542,7 +542,7 @@ packages:
/@types/cli-progress@3.11.5:
resolution: {integrity: sha512-D4PbNRbviKyppS5ivBGyFO29POlySLmA2HyUFE4p5QGazAMM3CwkKWcvTl8gvElSuxRh6FPKL8XmidX873ou4g==}
dependencies:
- '@types/node': 18.16.16
+ '@types/node': 20.16.5
dev: true
/@types/json5@0.0.29:
@@ -559,12 +559,14 @@ packages:
resolution: {integrity: sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==}
dev: true
- /@types/node@18.16.16:
- resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==}
+ /@types/node@20.16.5:
+ resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==}
+ dependencies:
+ undici-types: 6.19.8
dev: true
- /@types/semver@7.5.7:
- resolution: {integrity: sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==}
+ /@types/semver@7.5.8:
+ resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==}
dev: true
/@types/sinon@17.0.3:
@@ -673,7 +675,7 @@ packages:
globby: 11.1.0
is-glob: 4.0.3
minimatch: 9.0.5
- semver: 7.6.0
+ semver: 7.6.3
ts-api-utils: 1.3.0(typescript@5.1.3)
typescript: 5.1.3
transitivePeerDependencies:
@@ -1709,7 +1711,7 @@ packages:
dependencies:
'@types/chai': 4.3.0
'@types/lodash': 4.14.202
- '@types/node': 18.16.16
+ '@types/node': 20.16.5
'@types/sinon': 17.0.3
lodash: 4.17.21
mock-stdin: 1.0.0
@@ -2267,7 +2269,7 @@ packages:
'@babel/parser': 7.24.0
'@istanbuljs/schema': 0.1.3
istanbul-lib-coverage: 3.2.2
- semver: 7.6.0
+ semver: 7.6.3
transitivePeerDependencies:
- supports-color
dev: true
@@ -2454,13 +2456,6 @@ packages:
yallist: 3.1.1
dev: true
- /lru-cache@6.0.0:
- resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
- engines: {node: '>=10'}
- dependencies:
- yallist: 4.0.0
- dev: true
-
/make-dir@3.1.0:
resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==}
engines: {node: '>=8'}
@@ -2472,7 +2467,7 @@ packages:
resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==}
engines: {node: '>=10'}
dependencies:
- semver: 7.6.0
+ semver: 7.6.3
dev: true
/make-error@1.3.6:
@@ -3096,13 +3091,13 @@ packages:
/semver@6.3.1:
resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
+ hasBin: true
dev: true
- /semver@7.6.0:
- resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
+ /semver@7.6.3:
+ resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}
engines: {node: '>=10'}
- dependencies:
- lru-cache: 6.0.0
+ hasBin: true
dev: true
/serialize-javascript@6.0.2:
@@ -3427,6 +3422,7 @@ packages:
/ts-mocha@10.0.0(mocha@10.6.0):
resolution: {integrity: sha512-VRfgDO+iiuJFlNB18tzOfypJ21xn2xbuZyDvJvqpTbWgkAgD17ONGr8t+Tl8rcBtOBdjXp5e/Rk+d39f7XBHRw==}
engines: {node: '>= 6.X.X'}
+ hasBin: true
peerDependencies:
mocha: ^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X
dependencies:
@@ -3436,8 +3432,9 @@ packages:
tsconfig-paths: 3.15.0
dev: true
- /ts-node@10.9.2(@types/node@18.16.16)(typescript@5.1.3):
+ /ts-node@10.9.2(@types/node@20.16.5)(typescript@5.1.3):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
+ hasBin: true
peerDependencies:
'@swc/core': '>=1.2.50'
'@swc/wasm': '>=1.2.50'
@@ -3454,7 +3451,7 @@ packages:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
- '@types/node': 18.16.16
+ '@types/node': 20.16.5
acorn: 8.11.3
acorn-walk: 8.3.2
arg: 4.1.3
@@ -3585,8 +3582,13 @@ packages:
xtend: 4.0.2
dev: true
+ /undici-types@6.19.8:
+ resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
+ dev: true
+
/update-browserslist-db@1.0.13(browserslist@4.23.0):
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
+ hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
dependencies:
@@ -3743,10 +3745,6 @@ packages:
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
dev: true
- /yallist@4.0.0:
- resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
- dev: true
-
/yargs-parser@18.1.3:
resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==}
engines: {node: '>=6'}
diff --git a/test/kipper-files/matches.kip b/test/kipper-files/matches.kip
new file mode 100644
index 000000000..65f6e6e2a
--- /dev/null
+++ b/test/kipper-files/matches.kip
@@ -0,0 +1,21 @@
+interface Y {
+ v: bool;
+ t(gr: str): num;
+}
+
+interface X {
+ y: Y;
+ z: num;
+}
+
+var x: X = {
+ y: {
+ v: true,
+ t: (gr: str): num -> {
+ return 0;
+ }
+ },
+ z: 5
+};
+var res: bool = x matches X;
+print(res);
diff --git a/test/module/core/ast-node.test.ts b/test/module/core/ast-node.test.ts
index 1fd46e0a7..e1ece4e85 100644
--- a/test/module/core/ast-node.test.ts
+++ b/test/module/core/ast-node.test.ts
@@ -1,14 +1,14 @@
import { assert } from "chai";
import { promises as fs } from "fs";
import * as path from "path";
-import type { KipperParserRuleContext } from "@kipper/core";
import type {
+ CompilableNodeParent,
+ KipperParserRuleContext,
KipperProgramContext,
LexerParserData,
- TargetASTNodeSemanticAnalyser,
TargetASTNodeCodeGenerator,
+ TargetASTNodeSemanticAnalyser,
TranslatedCodeLine,
- CompilableNodeParent,
} from "@kipper/core";
import { CompilableASTNode, KipperCompiler, KipperFileStream, RootASTNode } from "@kipper/core";
import { KipperTypeScriptTarget } from "@kipper/target-ts";
diff --git a/test/module/core/compiler.test.ts b/test/module/core/compiler.test.ts
index 2697c61aa..84a7da7d4 100644
--- a/test/module/core/compiler.test.ts
+++ b/test/module/core/compiler.test.ts
@@ -1,6 +1,6 @@
import { assert } from "chai";
import type { KipperCompileResult } from "@kipper/core";
-import { KipperCompiler, KipperError, KipperLogger, KipperFileStream, KipperSyntaxError, LogLevel } from "@kipper/core";
+import { KipperCompiler, KipperError, KipperFileStream, KipperLogger, KipperSyntaxError, LogLevel } from "@kipper/core";
import { promises as fs } from "fs";
import * as ts from "typescript";
import * as path from "path";
diff --git a/test/module/core/core-functionality.test.ts b/test/module/core/core-functionality.test.ts
index 113e4caff..2be4c7500 100644
--- a/test/module/core/core-functionality.test.ts
+++ b/test/module/core/core-functionality.test.ts
@@ -4,6 +4,7 @@ import { assert } from "chai";
import * as ts from "typescript";
import { KipperTypeScriptTarget } from "@kipper/target-ts";
import { jsConfig } from "./errors";
+import { ScriptTarget } from "typescript";
/**
* Tests the 'print' function of Kipper.
@@ -156,7 +157,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "4", "Expected different output"), jsCode);
});
});
@@ -326,7 +327,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
// Overwrite built-in to access output
const prevLog = console.log;
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
@@ -353,7 +354,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput(() => assert(false, "Expected no output"), jsCode);
});
@@ -371,7 +372,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput(() => assert(false, "Expected no output"), jsCode);
});
@@ -389,7 +390,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput(() => assert(false, "Expected no output"), jsCode);
});
});
@@ -409,7 +410,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
@@ -427,7 +428,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
@@ -445,7 +446,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
@@ -463,7 +464,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput(() => assert(false, "Expected no output"), jsCode);
});
});
@@ -485,7 +486,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
@@ -503,7 +504,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
@@ -521,7 +522,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
@@ -539,7 +540,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
@@ -557,7 +558,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
@@ -575,7 +576,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
});
@@ -684,7 +685,7 @@ describe("Core functionality", () => {
const code = instance.write();
assert.include(code, "while (x <= 5) {\n x += 1;\n}", "Invalid TypeScript code (Expected different output)");
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "6", "Expected different output"), jsCode);
});
@@ -698,7 +699,7 @@ describe("Core functionality", () => {
const code = instance.write();
assert.include(code, "while (x <= 10) \n x += 1;", "Invalid TypeScript code (Expected different output)");
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "11", "Expected different output"), jsCode);
});
@@ -716,7 +717,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "10", "Expected different output"), jsCode);
});
@@ -734,7 +735,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "5", "Expected different output"), jsCode);
});
@@ -753,7 +754,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "5", "Expected different output"), jsCode);
});
});
@@ -773,7 +774,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "9", "Expected different output"), jsCode);
});
@@ -791,7 +792,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "9", "Expected different output"), jsCode);
});
@@ -809,7 +810,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "9", "Expected different output"), jsCode);
});
@@ -828,7 +829,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "4", "Expected different output"), jsCode);
});
@@ -847,7 +848,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "9", "Expected different output"), jsCode);
});
});
@@ -864,7 +865,7 @@ describe("Core functionality", () => {
const code = instance.write();
assert.include(code, "do {\n x += 1;\n} while (x <= 5)", "Invalid TypeScript code (Expected different output)");
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "6", "Expected different output"), jsCode);
});
@@ -878,7 +879,7 @@ describe("Core functionality", () => {
const code = instance.write();
assert.include(code, "do \n x += 1;\nwhile (x <= 10)", "Invalid TypeScript code (Expected different output)");
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "11", "Expected different output"), jsCode);
});
@@ -896,7 +897,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "10", "Expected different output"), jsCode);
});
@@ -914,7 +915,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "5", "Expected different output"), jsCode);
});
@@ -933,7 +934,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "5", "Expected different output"), jsCode);
});
});
@@ -955,12 +956,12 @@ describe("Core functionality", () => {
"Expected different TypeScript code",
);
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "2", "Expected different output"), jsCode);
});
});
- describe("Slice notation ", () => {
+ describe("Slice notation", () => {
describe("str", () => {
it("Simple slice with both start and end", async () => {
const fileContent = 'var x: str = "1234"[1:2]; print(x);';
@@ -975,7 +976,7 @@ describe("Core functionality", () => {
"Expected different TypeScript code",
);
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "2", "Expected different output"), jsCode);
});
@@ -992,7 +993,7 @@ describe("Core functionality", () => {
"Expected different TypeScript code",
);
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "234", "Expected different output"), jsCode);
});
@@ -1009,7 +1010,7 @@ describe("Core functionality", () => {
"Expected different TypeScript code",
);
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "12", "Expected different output"), jsCode);
});
@@ -1026,7 +1027,7 @@ describe("Core functionality", () => {
"Expected different TypeScript code",
);
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "1234", "Expected different output"), jsCode);
});
});
@@ -1110,7 +1111,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1130,7 +1131,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1150,7 +1151,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1178,7 +1179,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1198,7 +1199,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1218,7 +1219,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1246,7 +1247,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1266,7 +1267,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1286,7 +1287,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1308,7 +1309,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1328,7 +1329,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1348,7 +1349,7 @@ describe("Core functionality", () => {
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
assert(instance.programCtx?.stream.stringContent === fileContent, "Expected matching streams");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput(
(msg: any) =>
assert.equal(
@@ -1399,7 +1400,7 @@ describe("Core functionality", () => {
assert.isDefined(instance.programCtx);
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "2", "Expected different output"), jsCode);
});
@@ -1410,75 +1411,94 @@ describe("Core functionality", () => {
assert.isDefined(instance.programCtx);
assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
- const jsCode = ts.transpile(instance.write());
+ const jsCode = ts.transpile(instance.write(), { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "2", "Expected different output"), jsCode);
});
});
describe("Lambdas", () => {
- describe("js", () => {
- it("parses simple lambda expression without syntax errors", async () => {
- const code = `var add: Func = (x: num, y: num): num -> x + y;`;
- try {
- const result = await compiler.compile(code, jsConfig);
-
- // Evaluate the compiled code
- let stringResult = result.result!.map((x) => x.join("")).join("\n");
- stringResult = stringResult.concat("\nadd(1, 2);");
- const res = eval(stringResult);
- assert.equal(res, 3, "Lambda expression evaluated correctly");
- } catch (e) {
- assert.fail("Failed to analyze lambda expression semantically");
- }
- });
+ it("parses simple lambda expression without syntax errors", async () => {
+ const code = `var add: Func = (x: num, y: num): num -> x + y; print(add(1, 2));`;
+ const result = await compiler.compile(code, jsConfig);
- it("correctly identifies semantic data for a lambda with compound statement", async () => {
- const code = `var greet: Func = (name: str): str -> { return "Hello, " + name; };`;
- try {
- const result = await compiler.compile(code, jsConfig);
-
- // Evaluate the compiled code
- let stringResult = result.result!.map((x) => x.join("")).join("\n");
- stringResult = stringResult.concat("\ngreet('John');");
- const res = eval(stringResult);
- assert.equal(res, "Hello, John", "Lambda expression evaluated correctly");
- } catch (e) {
- assert.fail("Failed to analyze lambda expression semantically");
- }
- });
+ assert.isDefined(result.programCtx);
+ assert.deepEqual(result.programCtx?.errors, [], "Expected no compilation errors");
+ const stringResult = result.write();
+
+ testPrintOutput((message: any) => assert.equal(message, "3", "Expected different output"), stringResult);
+ });
+
+ it("correctly identifies semantic data for a lambda with compound statement", async () => {
+ const code = `var greet: Func = (name: str): str -> { return "Hello, " + name; }; print(greet('John'));`;
+ const result = await compiler.compile(code, jsConfig);
+
+ assert.isDefined(result.programCtx);
+ assert.deepEqual(result.programCtx?.errors, [], "Expected no compilation errors");
+ const stringResult = result.write();
+
+ testPrintOutput(
+ (message: any) => assert.equal(message, "Hello, John", "Expected different output"),
+ stringResult,
+ );
+ });
+
+ it("correctly identifies semantic data for a lambda with single statement", async () => {
+ const code = `var greet: Func = (name: str): str -> "Hello, " + name; print(greet('John'));`;
+ const result = await compiler.compile(code, jsConfig);
+
+ assert.isDefined(result.programCtx);
+ assert.deepEqual(result.programCtx?.errors, [], "Expected no compilation errors");
+ const stringResult = result.write();
+
+ testPrintOutput(
+ (message: any) => assert.equal(message, "Hello, John", "Expected different output"),
+ stringResult,
+ );
+ });
+
+ it("correctly identifies semantic data for a lambda with no parameters", async () => {
+ const code = `var greet: Func = (): str -> "Hello, World!"; print(greet());`;
+ const result = await compiler.compile(code, jsConfig);
- it("correctly identifies semantic data for a lambda with single statement", async () => {
- const code = `var greet: Func = (name: str): str -> "Hello, " + name;`;
- try {
- const result = await compiler.compile(code, jsConfig);
-
- // Evaluate the compiled code
- let stringResult = result.result!.map((x) => x.join("")).join("\n");
- stringResult = stringResult.concat("\ngreet('John');");
- const res = eval(stringResult);
- assert.equal(res, "Hello, John", "Lambda expression evaluated correctly");
- } catch (e) {
- assert.fail("Failed to analyze lambda expression semantically");
- }
+ assert.isDefined(result.programCtx);
+ assert.deepEqual(result.programCtx?.errors, [], "Expected no compilation errors");
+ const stringResult = result.write();
+
+ testPrintOutput(
+ (message: any) => assert.equal(message, "Hello, World!", "Expected different output"),
+ stringResult,
+ );
+ });
+
+ describe("can use a lambda as a direct value in a function", () => {
+ it("using a lambda with an expression body", async () => {
+ const code = `var greet: Func = (): str -> "Hello, World!"; print(greet());`;
+ const result = await compiler.compile(code, jsConfig);
+
+ assert.isDefined(result.programCtx);
+ assert.deepEqual(result.programCtx?.errors, [], "Expected no compilation errors");
+ const stringResult = result.write();
+
+ testPrintOutput(
+ (message: any) => assert.equal(message, "Hello, World!", "Expected different output"),
+ stringResult,
+ );
});
- it("correctly identifies semantic data for a lambda with no parameters", async () => {
- const code = `var greet: Func = (): str -> "Hello, World!";`;
- try {
- const result = await compiler.compile(code, jsConfig);
-
- // Evaluate the compiled code
- let stringResult = result.result!.map((x) => x.join("")).join("\n");
- stringResult = stringResult.concat("\ngreet();");
- const res = eval(stringResult);
- assert.equal(res, "Hello, World!", "Lambda expression evaluated correctly");
- } catch (e) {
- assert.fail("Failed to analyze lambda expression semantically");
- }
+ it("using a lambda with a compound statement body", async () => {
+ const code = `var greet: Func = (): str -> { return "Hello, World!"; }; print(greet());`;
+ const result = await compiler.compile(code, jsConfig);
+
+ assert.isDefined(result.programCtx);
+ assert.deepEqual(result.programCtx?.errors, [], "Expected no compilation errors");
+ const stringResult = result.write();
+
+ testPrintOutput(
+ (message: any) => assert.equal(message, "Hello, World!", "Expected different output"),
+ stringResult,
+ );
});
});
-
- describe("ts", () => {});
});
describe("Functions", () => {
@@ -1507,7 +1527,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "Works", "Expected different output"), jsCode);
});
@@ -1525,7 +1545,7 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "5", "Expected different result"), jsCode);
});
@@ -1543,11 +1563,79 @@ describe("Core functionality", () => {
"Invalid TypeScript code (Expected different output)",
);
- const jsCode = ts.transpile(code);
+ const jsCode = ts.transpile(code, { target: ScriptTarget.ES2015 });
testPrintOutput((message: any) => assert.equal(message, "6", "Expected different result"), jsCode);
});
});
+ describe("Object literals", () => {
+ it("should be able to create an object literal", async () => {
+ const fileContent = "{ x: 1, y: '2' };";
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+ let written = instance.write();
+ assert.include(written, "{\n x: 1,\n y: '2',\n};", "Invalid TypeScript code (Expected different output)");
+ });
+
+ it("should create an object with different types of properties", async () => {
+ const fileContent = "{ numProp: 1, strProp: '2', boolProp: true };";
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
+ const written = instance.write();
+ assert.include(
+ written,
+ "{\n numProp: 1,\n strProp: '2',\n boolProp: true,\n};",
+ "Invalid TypeScript code (Expected different output)",
+ );
+ });
+
+ it("should create an object with nested objects", async () => {
+ const fileContent = "{ outerProp: { innerProp: 1 } };";
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
+ const written = instance.write();
+ assert.include(
+ written,
+ "{\n outerProp: {\n innerProp: 1,\n},\n};",
+ "Invalid TypeScript code (Expected different output)",
+ );
+ });
+
+ it("should create an object with array properties", async () => {
+ const fileContent = "{ arrProp: [1, 2, 3] };";
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
+ const written = instance.write();
+ assert.include(
+ written,
+ "{\n arrProp: __kipper.assignTypeMeta([1, 2, 3],",
+ "Invalid TypeScript code (Expected different output)",
+ );
+ });
+
+ it("should create an object with method properties", async () => {
+ const fileContent = "{ methodProp: (): num -> 1 };";
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.deepEqual(instance.programCtx?.errors, [], "Expected no compilation errors");
+ const written = instance.write();
+ assert.include(
+ written,
+ "{\n methodProp: __kipper.assignTypeMeta((): number => 1,",
+ "Invalid TypeScript code (Expected different output)",
+ );
+ });
+ });
+
describe("Interfaces", async () => {
it("Can initialize empty interface", async () => {
const fileContent = "interface Test { }";
@@ -1559,7 +1647,27 @@ describe("Core functionality", () => {
assert.include(written, "interface Test {\n}", "Invalid TypeScript code (Expected different output)");
});
- /* TODO Implement runtime code generation for functions in interfaces (Fabos task I guess)
+ it("should be able to to create object with interface blueprint", async () => {
+ const fileContent = `interface Test {a: str;}; var x: Test = {a: "3"}; print(x.a);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+ let written = instance.write();
+ assert.include(
+ written,
+ `interface Test {\n` +
+ ` a: string;\n` +
+ `}\n` +
+ `const __intf_Test = new __kipper.Type("Test", [new __kipper.Property("a", __kipper.builtIn.str),], [])\n` +
+ "let x: Test = {\n" +
+ ' a: "3",\n' +
+ "};\n" +
+ "__kipper.print(x.a);",
+ "Invalid TypeScript code (Expected different output)",
+ );
+ });
+
it("can initialize interface with members", async () => {
const fileContent = "interface Test {\n x: num;\n y: str;\n greet(name: str): str;}";
const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
@@ -1569,13 +1677,13 @@ describe("Core functionality", () => {
let written = instance.write();
assert.include(
written,
- "interface Test {\n x: number;\n y: string;\n greet(name: string): string;\n}",
+ "interface Test {\n x: number;\n y: string;\n greet(name: string): string;\n}",
"Invalid TypeScript code (Expected different output)",
);
});
it("should can initialize with mixed members", async () => {
- const fileContent = "interface Test {\n x: num;\n isTrue(f: bool): str;\n y: str;\n greet(name: str) : str;}";
+ const fileContent = "interface Test {\n x: num;\n isTrue(f: bool): str;\n y: str;\n greet(name: str): str;}";
const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
assert.isDefined(instance.programCtx);
@@ -1583,22 +1691,185 @@ describe("Core functionality", () => {
let written = instance.write();
assert.include(
written,
- "interface Test {\n x: number;\n isTrue(f: boolean): string;\n y: string;\n greet(name: string): string;\n}",
+ "interface Test {\n x: number;\n isTrue(f: boolean): string;\n y: string;\n greet(name: string):" +
+ " string;\n}",
"Invalid TypeScript code (Expected different output)",
);
});
- */
});
- describe("Object literals", () => {
- it("should be able to create an Object literal", async () => {
- const fileContent = "{ x: 1, y: '2' };";
+ describe("Matches", () => {
+ it("should return true for an empty interface with an empty object", async () => {
+ const fileContent = `interface Test { }; var x: obj = { }; print(x matches Test);`;
const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
assert.isDefined(instance.programCtx);
assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
- let written = instance.write();
- assert.include(written, "{\n x: 1,\n y: '2',\n};", "Invalid TypeScript code (Expected different output)");
+
+ const written = instance.write();
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "true", "Expected different output"), jsCode);
+ });
+
+ it("should return true for an empty interface with an object with properties", async () => {
+ const fileContent = `interface Test { }; var x: obj = { a: 1, b: '2' }; print(x matches Test);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+
+ const written = instance.write();
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "true", "Expected different output"), jsCode);
+ });
+
+ it("should return false for an interface with properties with an object with less properties", async () => {
+ const fileContent = `interface Test { a: num; b: str; }; var x: obj = { a: 1 }; print(x matches Test);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+
+ const written = instance.write();
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "false", "Expected different output"), jsCode);
+ });
+
+ it("should return true for an interface with properties with an object with more properties", async () => {
+ const fileContent = `interface Test { a: num; b: str; }; var x: obj = { a: 1, b: '2', c: true }; print(x matches Test);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+
+ const written = instance.write();
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "true", "Expected different output"), jsCode);
+ });
+
+ it("should return false for an interface with properties with an object with different properties", async () => {
+ const fileContent = `interface Test { a: num; b: str; }; var x: obj = { a: 1, c: '2' }; print(x matches Test);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+
+ const written = instance.write();
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "false", "Expected different output"), jsCode);
+ });
+
+ // it("should support generics such as arrays and lambda", async () => {
+ // const fileContent = `interface Test { a: Array; b: Func; }; var x: obj = { a: [1, 2, 3], b: (x: num): num -> x + 1 }; print(x matches Test);`;
+ // const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+ //
+ // assert.isDefined(instance.programCtx);
+ // assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+ //
+ // const written = instance.write();
+ // const jsCode = ts.transpile(written);
+ // testPrintOutput((message: any) => assert.equal(message, "true", "Expected different output"), jsCode);
+ // });
+
+ it("should support nested interfaces", async () => {
+ const fileContent = `interface Test { a: num; b: str; }; interface Test2 { c: Test; }; var x: obj = { c: { a: 1, b: '2' } }; print(x matches Test2);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+
+ const written = instance.write();
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "true", "Expected different output"), jsCode);
+ });
+ });
+
+ describe("Instanceof", () => {
+ it("should return true when object is instance of class", async () => {
+ const fileContent = `class Test {a: str; constructor (b: str) {this.a = b;}}; var x: Test = new Test("3"); print(x instanceof Test);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+
+ const written = instance.write();
+ assert.include(
+ written,
+ "class Test {\n" +
+ " a: string;\n" +
+ " constructor(b: string)\n" +
+ " {\n" +
+ " this.a = b;\n" +
+ " }\n" +
+ "}\n" +
+ 'let x: Test = new Test("3");\n' +
+ "__kipper.print(x instanceof Test);",
+ "Invalid TypeScript code (Expected different output)",
+ );
+
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "true", "Expected different output"), jsCode);
+ });
+
+ describe("should return false when object is not instance of class", () => {
+ it("object literal instanceof class", async () => {
+ const fileContent = `class Test {a: str; constructor (b: str) {this.a = b;}}; var x: obj = {a: "3"}; print(x instanceof Test);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+
+ const written = instance.write();
+ assert.include(
+ written,
+ "class Test {\n" +
+ " a: string;\n" +
+ " constructor(b: string)\n" +
+ " {\n" +
+ " this.a = b;\n" +
+ " }\n" +
+ "}\n" +
+ 'let x: object = {\n a: "3",\n};\n' +
+ "__kipper.print(x instanceof Test);",
+ "Invalid TypeScript code (Expected different output)",
+ );
+
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "false", "Expected different output"), jsCode);
+ });
+
+ it("different class instanceof class", async () => {
+ const fileContent = `class Test {a: str; constructor (b: str) {this.a = b;}}; class Test2 {a: str; constructor (b: str) {this.a = b;}}; var x: Test2 = new Test2("3"); print(x instanceof Test);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+
+ const written = instance.write();
+ assert.include(
+ written,
+ "class Test {\n" +
+ " a: string;\n" +
+ " constructor(b: string)\n" +
+ " {\n" +
+ " this.a = b;\n" +
+ " }\n" +
+ "}\n" +
+ "class Test2 {\n" +
+ " a: string;\n" +
+ " constructor(b: string)\n" +
+ " {\n" +
+ " this.a = b;\n" +
+ " }\n" +
+ "}\n" +
+ 'let x: Test2 = new Test2("3");\n' +
+ "__kipper.print(x instanceof Test);",
+ "Invalid TypeScript code (Expected different output)",
+ );
+
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "false", "Expected different output"), jsCode);
+ });
});
});
@@ -1622,7 +1893,7 @@ describe("Core functionality", () => {
let written = instance.write();
assert.include(
written,
- "class Test {\n constructor(a: number, b: string) \n {\n }\n}",
+ "class Test {\n constructor(a: number, b: string)\n {\n }\n}",
"Invalid TypeScript code (Expected different output)",
);
});
@@ -1633,7 +1904,8 @@ describe("Core functionality", () => {
assert.isDefined(instance.programCtx);
assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
- let written = instance.write();
+
+ const written = instance.write();
assert.include(
written,
"class Test {\n" +
@@ -1643,34 +1915,123 @@ describe("Core functionality", () => {
" {\n" +
' __kipper.print("Kippa");\n' +
" }\n" +
- " constructor(a: number, b: string) \n" +
+ " constructor(a: number, b: string)\n" +
" {\n" +
" }\n" +
"}",
);
});
- });
- describe("should be able to to initialize interface", () => {
- it("should be able to init class", async () => {
- const fileContent = `interface Test {a: str;}; var x : Test = {a: "3"}; print(x.a);`;
+ it("should be able to instantiate a class with new", async () => {
+ const fileContent = `class Test {a: str; constructor (b: str) {this.a = b;}}; var x: Test = new Test("3"); print(x.a);`;
const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
assert.isDefined(instance.programCtx);
assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
- let written = instance.write();
+
+ const written = instance.write();
assert.include(
written,
- `interface Test {\n` +
- ` a: string;\n` +
- `}\n` +
- `const __intf_Test = new __kipper.Type("Test", [new __kipper.Property("a", __kipper.builtIn.str),], [])\n` +
- "let x: Test = {\n" +
- ' a: "3",\n' +
- "};\n" +
+ "class Test {\n" +
+ " a: string;\n" +
+ " constructor(b: string)\n" +
+ " {\n" +
+ " this.a = b;\n" +
+ " }\n" +
+ "}\n" +
+ 'let x: Test = new Test("3");\n' +
"__kipper.print(x.a);",
"Invalid TypeScript code (Expected different output)",
);
+
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "3", "Expected different output"), jsCode);
+ });
+
+ it("should be able to instantiate a class with new and two properties", async () => {
+ const fileContent = `class Test {x: str; y: num; constructor (a: str, b: num) {this.x = a; this.y = b;}}; var x: Test = new Test("hello", 42); print(x.x);`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+
+ const written = instance.write();
+ assert.include(
+ written,
+ "class Test {\n" +
+ " x: string;\n" +
+ " y: number;\n" +
+ " constructor(a: string, b: number)\n" +
+ " {\n" +
+ " this.x = a;\n" +
+ " this.y = b;\n" +
+ " }\n" +
+ "}\n" +
+ 'let x: Test = new Test("hello", 42);\n' +
+ "__kipper.print(x.x);",
+ "Invalid TypeScript code (Expected different output)",
+ );
+
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "hello", "Expected different output"), jsCode);
+ });
+
+ it("should be able to access 'this' inside a class method", async () => {
+ const fileContent = `class Test {x: str; constructor (a: str) {this.x = a;} greet(): void {print(this.x);}}; var x: Test = new Test("hello"); x.greet();`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+ let written = instance.write();
+ assert.include(
+ written,
+ "class Test {\n" +
+ " x: string;\n" +
+ " greet(): void\n" +
+ " {\n" +
+ " __kipper.print(this.x);\n" +
+ " }\n" +
+ " constructor(a: string)\n" +
+ " {\n" +
+ " this.x = a;\n" +
+ " }\n" +
+ "}\n" +
+ 'let x: Test = new Test("hello");\n' +
+ "x.greet();",
+ "Invalid TypeScript code (Expected different output)",
+ );
+
+ const jsCode = ts.transpile(written);
+ testPrintOutput((message: any) => assert.equal(message, "hello", "Expected different output"), jsCode);
+ });
+
+ it("should be able to return a value inside a class method", async () => {
+ const fileContent = `class Test {x: str; constructor (a: str) {this.x = a;} greet(): str {return this.x;}}; var x: Test = new Test("hello"); print(x.greet());`;
+ const instance: KipperCompileResult = await compiler.compile(fileContent, { target: defaultTarget });
+
+ assert.isDefined(instance.programCtx);
+ assert.equal(instance.programCtx!!.errors.length, 0, "Expected no compilation errors");
+ let written = instance.write();
+ assert.include(
+ written,
+ "class Test {\n" +
+ " x: string;\n" +
+ " greet(): string\n" +
+ " {\n" +
+ " return this.x;\n" +
+ " }\n" +
+ " constructor(a: string)\n" +
+ " {\n" +
+ " this.x = a;\n" +
+ " }\n" +
+ "}\n" +
+ 'let x: Test = new Test("hello");\n' +
+ "__kipper.print(x.greet());",
+ "Invalid TypeScript code (Expected different output)",
+ );
+
+ const jsCode = ts.transpile(written, { target: ScriptTarget.ES2015 });
+ testPrintOutput((message: any) => assert.equal(message, "hello", "Expected different output"), jsCode);
});
});
diff --git a/test/module/core/errors/semantic-errors/builtin-overwrite.ts b/test/module/core/errors/semantic-errors/builtin-overwrite.ts
index f3a3fe2c5..7e82d84ed 100644
--- a/test/module/core/errors/semantic-errors/builtin-overwrite.ts
+++ b/test/module/core/errors/semantic-errors/builtin-overwrite.ts
@@ -1,7 +1,5 @@
import type { CompileConfig, KipperError } from "@kipper/core";
-import { BuiltInFunction } from "@kipper/core";
-import { BuiltInTypes } from "@kipper/core";
-import { KipperCompiler } from "@kipper/core";
+import { BuiltInFunction, BuiltInTypes, KipperCompiler } from "@kipper/core";
import { defaultConfig, ensureTracebackDataExists } from "../index";
import { assert } from "chai";
diff --git a/test/module/core/errors/semantic-errors/invalid-global.ts b/test/module/core/errors/semantic-errors/invalid-global.ts
index 4245dc010..305453009 100644
--- a/test/module/core/errors/semantic-errors/invalid-global.ts
+++ b/test/module/core/errors/semantic-errors/invalid-global.ts
@@ -1,7 +1,5 @@
import type { KipperError, KipperProgramContext, LexerParserData } from "@kipper/core";
-import { BuiltInFunction } from "@kipper/core";
-import { BuiltInTypes } from "@kipper/core";
-import { KipperCompiler, KipperFileStream } from "@kipper/core";
+import { BuiltInFunction, BuiltInTypes, KipperCompiler, KipperFileStream } from "@kipper/core";
import { defaultConfig } from "../index";
import { assert } from "chai";
diff --git a/test/module/core/errors/semantic-errors/reserved-identifier-overwrite.ts b/test/module/core/errors/semantic-errors/reserved-identifier-overwrite.ts
index f255d1650..8c9eb08d5 100644
--- a/test/module/core/errors/semantic-errors/reserved-identifier-overwrite.ts
+++ b/test/module/core/errors/semantic-errors/reserved-identifier-overwrite.ts
@@ -8,8 +8,8 @@ describe("ReservedIdentifierOverwriteError", () => {
try {
await new KipperCompiler().compile("var instanceof: str;", defaultConfig);
} catch (e) {
- assert.equal((e).constructor.name, "ReservedIdentifierOverwriteError", "Expected different error");
- assert((e).name === "IdentifierError", "Expected different error");
+ assert.equal((e).constructor.name, "LexerOrParserSyntaxError", "Expected different error");
+ assert((e).name === "SyntaxError", "Expected different error");
ensureTracebackDataExists(e);
return;
}
diff --git a/test/module/core/errors/type-errors/invalid-instanceof-type.ts b/test/module/core/errors/type-errors/invalid-instanceof-type.ts
new file mode 100644
index 000000000..7e9ead05a
--- /dev/null
+++ b/test/module/core/errors/type-errors/invalid-instanceof-type.ts
@@ -0,0 +1,44 @@
+import type { KipperCompileResult, KipperError } from "@kipper/core";
+import { KipperCompiler } from "@kipper/core";
+import { defaultConfig, ensureTracebackDataExists } from "../index";
+import { assert } from "chai";
+
+describe("InvalidInstanceOfTypeError", () => {
+ describe("Error", () => {
+ it("Using primitive type", async () => {
+ try {
+ await new KipperCompiler().compile("var x: obj = {}; x instanceof str;", defaultConfig);
+ } catch (e) {
+ assert.equal((e).constructor.name, "InvalidInstanceOfTypeError", "Expected different error");
+ assert((e).name === "TypeError", "Expected different error");
+ ensureTracebackDataExists(e);
+ return;
+ }
+ assert.fail("Expected 'InvalidInstanceOfTypeError'");
+ });
+
+ it("Using interface type", async () => {
+ try {
+ await new KipperCompiler().compile("var x: obj = {}; interface A {}; x instanceof A;", defaultConfig);
+ } catch (e) {
+ assert.equal((e).constructor.name, "InvalidInstanceOfTypeError", "Expected different error");
+ assert((e).name === "TypeError", "Expected different error");
+ ensureTracebackDataExists(e);
+ return;
+ }
+ assert.fail("Expected 'InvalidInstanceOfTypeError'");
+ });
+ });
+
+ it("NoError", async () => {
+ let result: KipperCompileResult | undefined = undefined;
+ try {
+ result = await new KipperCompiler().compile("class A {}; var x: obj = {}; x instanceof A;", defaultConfig);
+ } catch (e) {
+ assert.fail(`Expected no '${(e).name}'`);
+ }
+ assert.isDefined(result, "Expected defined compilation result");
+ assert.isDefined(result?.programCtx, "Expected programCtx to be defined");
+ assert.isFalse(result?.programCtx?.hasFailed, "Expected no errors");
+ });
+});
diff --git a/test/module/core/errors/type-errors/invalid-matches-type.ts b/test/module/core/errors/type-errors/invalid-matches-type.ts
new file mode 100644
index 000000000..2cae00fb9
--- /dev/null
+++ b/test/module/core/errors/type-errors/invalid-matches-type.ts
@@ -0,0 +1,44 @@
+import type { KipperCompileResult, KipperError } from "@kipper/core";
+import { KipperCompiler } from "@kipper/core";
+import { defaultConfig, ensureTracebackDataExists } from "../index";
+import { assert } from "chai";
+
+describe("InvalidMatchesTypeError", () => {
+ describe("Error", () => {
+ it("Using primitive type", async () => {
+ try {
+ await new KipperCompiler().compile("var x: obj = {}; x matches str;", defaultConfig);
+ } catch (e) {
+ assert.equal((e).constructor.name, "InvalidMatchesTypeError", "Expected different error");
+ assert((e).name === "TypeError", "Expected different error");
+ ensureTracebackDataExists(e);
+ return;
+ }
+ assert.fail("Expected 'InvalidMatchesTypeError'");
+ });
+
+ it("Using class type", async () => {
+ try {
+ await new KipperCompiler().compile("var x: obj = {}; class A {}; x matches A;", defaultConfig);
+ } catch (e) {
+ assert.equal((e).constructor.name, "InvalidMatchesTypeError", "Expected different error");
+ assert((e).name === "TypeError", "Expected different error");
+ ensureTracebackDataExists(e);
+ return;
+ }
+ assert.fail("Expected 'InvalidMatchesTypeError'");
+ });
+ });
+
+ it("NoError", async () => {
+ let result: KipperCompileResult | undefined = undefined;
+ try {
+ result = await new KipperCompiler().compile("interface A {}; var x: obj = {}; x matches A;", defaultConfig);
+ } catch (e) {
+ assert.fail(`Expected no '${(e).name}'`);
+ }
+ assert.isDefined(result, "Expected defined compilation result");
+ assert.isDefined(result?.programCtx, "Expected programCtx to be defined");
+ assert.isFalse(result?.programCtx?.hasFailed, "Expected no errors");
+ });
+});
diff --git a/test/module/core/global-scope.test.ts b/test/module/core/global-scope.test.ts
index 087b0d49c..41e8a2d33 100644
--- a/test/module/core/global-scope.test.ts
+++ b/test/module/core/global-scope.test.ts
@@ -1,6 +1,5 @@
import type { ScopeFunctionDeclaration } from "@kipper/core";
-import { BuiltInTypes } from "@kipper/core";
-import { KipperCompiler, ScopeVariableDeclaration } from "@kipper/core";
+import { BuiltInTypes, KipperCompiler, ScopeVariableDeclaration } from "@kipper/core";
import { KipperTypeScriptTarget } from "@kipper/target-ts";
import { assert } from "chai";
diff --git a/test/module/core/parse-stream.test.ts b/test/module/core/parse-stream.test.ts
index 626e916a5..ba5073ed9 100644
--- a/test/module/core/parse-stream.test.ts
+++ b/test/module/core/parse-stream.test.ts
@@ -1,7 +1,7 @@
import { assert } from "chai";
import { promises as fs } from "fs";
import * as path from "path";
-import { KipperFileStream, KipperConfigError } from "@kipper/core";
+import { KipperConfigError, KipperFileStream } from "@kipper/core";
import { CharStreams } from "antlr4ts";
const fileLocation: string = path.resolve(`${__dirname}/../../kipper-files/main.kip`);
diff --git a/test/module/core/program-ctx.test.ts b/test/module/core/program-ctx.test.ts
index af247d509..93d75a6d9 100644
--- a/test/module/core/program-ctx.test.ts
+++ b/test/module/core/program-ctx.test.ts
@@ -1,7 +1,14 @@
import { assert } from "chai";
-import { BuiltInFunction } from "@kipper/core";
-import { BuiltInFunctions, BuiltInTypes, BuiltInVariables } from "@kipper/core";
-import { EvaluatedCompileConfig, InvalidGlobalError, KipperCompiler, KipperFileStream } from "@kipper/core";
+import {
+ BuiltInFunction,
+ BuiltInFunctions,
+ BuiltInTypes,
+ BuiltInVariables,
+ EvaluatedCompileConfig,
+ InvalidGlobalError,
+ KipperCompiler,
+ KipperFileStream,
+} from "@kipper/core";
import { promises as fs } from "fs";
import { KipperTypeScriptTarget } from "@kipper/target-ts";
import * as path from "path";
diff --git a/test/module/core/universe-scope.test.ts b/test/module/core/universe-scope.test.ts
index ab1120b6e..24a6561d0 100644
--- a/test/module/core/universe-scope.test.ts
+++ b/test/module/core/universe-scope.test.ts
@@ -1,6 +1,4 @@
-import { BuiltInFunctions, BuiltInVariables } from "@kipper/core";
-import { BuiltInTypes } from "@kipper/core";
-import { KipperCompiler } from "@kipper/core";
+import { BuiltInFunctions, BuiltInTypes, BuiltInVariables, KipperCompiler } from "@kipper/core";
import { KipperTypeScriptTarget } from "@kipper/target-ts";
import { assert } from "chai";
diff --git a/test/module/core/warnings/useless-statement.ts b/test/module/core/warnings/useless-statement.ts
index 974a56ef8..51f5097dc 100644
--- a/test/module/core/warnings/useless-statement.ts
+++ b/test/module/core/warnings/useless-statement.ts
@@ -1,5 +1,5 @@
import { KipperCompiler } from "@kipper/core";
-import { defaultConfig, ensureWarningWasReported, ensureTracebackDataExists } from ".";
+import { defaultConfig, ensureTracebackDataExists, ensureWarningWasReported } from ".";
import { assert } from "chai";
describe("UselessExpressionStatementWarning", () => {