From a3e1d6a83f7542437ab980ebf80587b262c5a8ed Mon Sep 17 00:00:00 2001 From: Anton Trunov Date: Sun, 14 Apr 2024 21:55:24 +0400 Subject: [PATCH] fix(grammar): allow `!!` in chains of method calls chore: remove auto-generated parser files from Git --- .gitignore | 5 +- CHANGELOG.md | 1 + .../__snapshots__/grammar.spec.ts.snap | 76 ++++++ src/grammar/grammar.ohm | 14 +- src/grammar/grammar.ohm-bundle.d.ts | 229 ------------------ src/grammar/grammar.ohm-bundle.js | 1 - src/grammar/grammar.ts | 2 +- src/grammar/test/case-33.tact | 3 + 8 files changed, 92 insertions(+), 239 deletions(-) delete mode 100644 src/grammar/grammar.ohm-bundle.d.ts delete mode 100644 src/grammar/grammar.ohm-bundle.js create mode 100644 src/grammar/test/case-33.tact diff --git a/.gitignore b/.gitignore index f414165d6..a120bb0bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ node_modules coverage dist -output/ \ No newline at end of file +output/ +src/grammar/grammar.ohm-bundle.js +src/grammar/grammar.ohm-bundle.d.ts + diff --git a/CHANGELOG.md b/CHANGELOG.md index cc1190fd1..64c75a964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Incorrect "already exists" errors when using names such as `toString` or `valueOf`: PR [#208](https://github.com/tact-lang/tact/pull/208) - Escape backticks in error messages for generated TypeScript code: PR [#192](https://github.com/tact-lang/tact/pull/192) - Empty inherited trait lists after `with` keyword are now disallowed: PR [#246](https://github.com/tact-lang/tact/pull/246) +- Allow chaining method calls with `!!`, for instance, `map.asCell()!!.hash()` is grammatically correct now: PR [#257](ttps://github.com/tact-lang/tact/pull/257) ## [1.2.0] - 2024-02-29 diff --git a/src/grammar/__snapshots__/grammar.spec.ts.snap b/src/grammar/__snapshots__/grammar.spec.ts.snap index ae2527b8f..9befd46ca 100644 --- a/src/grammar/__snapshots__/grammar.spec.ts.snap +++ b/src/grammar/__snapshots__/grammar.spec.ts.snap @@ -5266,3 +5266,79 @@ exports[`grammar should parse case-32 1`] = ` "kind": "program", } `; + +exports[`grammar should parse case-33 1`] = ` +{ + "entries": [ + { + "args": [ + { + "id": 3, + "kind": "def_argument", + "name": "m", + "ref": m: map, + "type": { + "id": 2, + "key": "Int", + "keyAs": null, + "kind": "type_ref_map", + "ref": map, + "value": "Int", + "valueAs": null, + }, + }, + ], + "attributes": [], + "id": 9, + "kind": "def_function", + "name": "testFunc", + "origin": "user", + "ref": fun testFunc(m: map): Int { + return m.asCell()!!.hash(); +}, + "return": { + "id": 1, + "kind": "type_ref_simple", + "name": "Int", + "optional": false, + "ref": Int, + }, + "statements": [ + { + "expression": { + "args": [], + "id": 7, + "kind": "op_call", + "name": "hash", + "ref": m.asCell()!!.hash(), + "src": { + "id": 6, + "kind": "op_unary", + "op": "!!", + "ref": m.asCell()!!, + "right": { + "args": [], + "id": 5, + "kind": "op_call", + "name": "asCell", + "ref": m.asCell(), + "src": { + "id": 4, + "kind": "id", + "ref": m, + "value": "m", + }, + }, + }, + }, + "id": 8, + "kind": "statement_return", + "ref": return m.asCell()!!.hash();, + }, + ], + }, + ], + "id": 10, + "kind": "program", +} +`; diff --git a/src/grammar/grammar.ohm b/src/grammar/grammar.ohm index 2465b7f87..84798e523 100644 --- a/src/grammar/grammar.ohm +++ b/src/grammar/grammar.ohm @@ -151,16 +151,15 @@ Tact { | ExpressionMul "/" ExpressionUnary --div | ExpressionMul "%" ExpressionUnary --rem | ExpressionUnary - ExpressionUnary = "-" ExpressionUnarySuffix --neg - | "+" ExpressionUnarySuffix --add - | "!" ExpressionUnarySuffix --not - | ExpressionUnarySuffix - ExpressionUnarySuffix = ExpressionValue "!!" --notNull - | ExpressionValue + ExpressionUnary = "-" ExpressionValue --neg + | "+" ExpressionValue --add + | "!" ExpressionValue --not + | ExpressionValue ExpressionBracket = "(" Expression ")" // Order is important - ExpressionValue = ExpressionCall + ExpressionValue = ExpressionUnboxNotNull + | ExpressionCall | ExpressionField | ExpressionStaticCall | ExpressionBracket @@ -171,6 +170,7 @@ Tact { | null | ExpressionInitOf | ExpressionString + ExpressionUnboxNotNull = ExpressionValue "!!" ExpressionString = stringLiteral ExpressionField = ExpressionValue "." id ~"(" ExpressionCall = ExpressionValue "." id "(" ListOf ","? ")" diff --git a/src/grammar/grammar.ohm-bundle.d.ts b/src/grammar/grammar.ohm-bundle.d.ts deleted file mode 100644 index c5e64a8ca..000000000 --- a/src/grammar/grammar.ohm-bundle.d.ts +++ /dev/null @@ -1,229 +0,0 @@ -// AUTOGENERATED FILE -// This file was generated from grammar.ohm by `ohm generateBundles`. - -import { - ActionDict, - Grammar, - IterationNode, - Node, - NonterminalNode, - Semantics, - TerminalNode -} from 'ohm-js'; - -export interface TactActionDict extends ActionDict { - Program?: (this: NonterminalNode, arg0: IterationNode) => T; - ProgramItem?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ProgramImport?: (this: NonterminalNode, arg0: NonterminalNode, arg1: NonterminalNode, arg2: TerminalNode) => T; - Primitive?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: TerminalNode) => T; - StaticFunction?: (this: NonterminalNode, arg0: NonterminalNode) => T; - NativeFunction_withVoid?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: IterationNode, arg5: NonterminalNode, arg6: NonterminalNode, arg7: TerminalNode, arg8: NonterminalNode, arg9: IterationNode, arg10: TerminalNode, arg11: TerminalNode) => T; - NativeFunction_withType?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: IterationNode, arg5: NonterminalNode, arg6: NonterminalNode, arg7: TerminalNode, arg8: NonterminalNode, arg9: IterationNode, arg10: TerminalNode, arg11: TerminalNode, arg12: NonterminalNode, arg13: TerminalNode) => T; - NativeFunction?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Type_optional?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode) => T; - Type_required?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Type_map?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: IterationNode, arg4: IterationNode, arg5: TerminalNode, arg6: NonterminalNode, arg7: IterationNode, arg8: IterationNode, arg9: TerminalNode) => T; - Type_bounced?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode) => T; - Type?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Field_default?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode) => T; - Field_defaultWithInit?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: TerminalNode) => T; - Field_withSerialization?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: NonterminalNode, arg4: NonterminalNode, arg5: TerminalNode) => T; - Field_withSerializationAndInit?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: NonterminalNode, arg4: NonterminalNode, arg5: TerminalNode, arg6: NonterminalNode, arg7: TerminalNode) => T; - Field?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ConstantAttribute_virtual?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ConstantAttribute_override?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ConstantAttribute_abstract?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ConstantAttribute?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Constant_withValue?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: TerminalNode, arg6: NonterminalNode, arg7: TerminalNode) => T; - Constant_withEmpty?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: TerminalNode) => T; - Constant?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Struct_originary?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: TerminalNode, arg3: IterationNode, arg4: TerminalNode) => T; - Struct_message?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: TerminalNode, arg3: IterationNode, arg4: TerminalNode) => T; - Struct_messageWithId?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: TerminalNode, arg6: IterationNode, arg7: TerminalNode) => T; - Struct?: (this: NonterminalNode, arg0: NonterminalNode) => T; - StructBody?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Contract_simple?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: IterationNode, arg5: TerminalNode) => T; - Contract_withTraits?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: NonterminalNode, arg4: NonterminalNode, arg5: IterationNode, arg6: TerminalNode, arg7: IterationNode, arg8: TerminalNode) => T; - Contract?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ContractInit?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: IterationNode, arg4: TerminalNode, arg5: TerminalNode, arg6: IterationNode, arg7: TerminalNode) => T; - ContractBody?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Trait_originary?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: IterationNode, arg5: TerminalNode) => T; - Trait_withTraits?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: NonterminalNode, arg4: NonterminalNode, arg5: IterationNode, arg6: TerminalNode, arg7: IterationNode, arg8: TerminalNode) => T; - Trait?: (this: NonterminalNode, arg0: NonterminalNode) => T; - TraitBody?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ContractAttribute_interface?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode) => T; - ContractAttribute?: (this: NonterminalNode, arg0: NonterminalNode) => T; - FunctionAttribute_getter?: (this: NonterminalNode, arg0: TerminalNode) => T; - FunctionAttribute_mutates?: (this: NonterminalNode, arg0: NonterminalNode) => T; - FunctionAttribute_extends?: (this: NonterminalNode, arg0: NonterminalNode) => T; - FunctionAttribute_virtual?: (this: NonterminalNode, arg0: NonterminalNode) => T; - FunctionAttribute_override?: (this: NonterminalNode, arg0: NonterminalNode) => T; - FunctionAttribute_inline?: (this: NonterminalNode, arg0: NonterminalNode) => T; - FunctionAttribute_abstract?: (this: NonterminalNode, arg0: NonterminalNode) => T; - FunctionAttribute?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Function_withVoid?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: IterationNode, arg6: TerminalNode, arg7: TerminalNode, arg8: IterationNode, arg9: TerminalNode) => T; - Function_withType?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: IterationNode, arg6: TerminalNode, arg7: TerminalNode, arg8: NonterminalNode, arg9: TerminalNode, arg10: IterationNode, arg11: TerminalNode) => T; - Function_abstractVoid?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: IterationNode, arg6: TerminalNode, arg7: TerminalNode) => T; - Function_abstractType?: (this: NonterminalNode, arg0: IterationNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: IterationNode, arg6: TerminalNode, arg7: TerminalNode, arg8: NonterminalNode, arg9: TerminalNode) => T; - Function?: (this: NonterminalNode, arg0: NonterminalNode) => T; - FunctionArg?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ReceiveFunction_simple?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: TerminalNode, arg5: IterationNode, arg6: TerminalNode) => T; - ReceiveFunction_empty?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: TerminalNode, arg3: TerminalNode, arg4: IterationNode, arg5: TerminalNode) => T; - ReceiveFunction_comment?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: TerminalNode, arg5: IterationNode, arg6: TerminalNode) => T; - ReceiveFunction_bounced?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: TerminalNode, arg5: IterationNode, arg6: TerminalNode) => T; - ReceiveFunction_externalSimple?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: TerminalNode, arg5: IterationNode, arg6: TerminalNode) => T; - ReceiveFunction_externalComment?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: TerminalNode, arg5: IterationNode, arg6: TerminalNode) => T; - ReceiveFunction_externalEmpty?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode, arg2: TerminalNode, arg3: TerminalNode, arg4: IterationNode, arg5: TerminalNode) => T; - ReceiveFunction?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Statement?: (this: NonterminalNode, arg0: NonterminalNode) => T; - StatementBlock?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: TerminalNode) => T; - StatementLet?: (this: NonterminalNode, arg0: NonterminalNode, arg1: NonterminalNode, arg2: TerminalNode, arg3: NonterminalNode, arg4: TerminalNode, arg5: NonterminalNode, arg6: TerminalNode) => T; - StatementReturn_withExpression?: (this: NonterminalNode, arg0: NonterminalNode, arg1: NonterminalNode, arg2: TerminalNode) => T; - StatementReturn_withoutExpression?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode) => T; - StatementReturn?: (this: NonterminalNode, arg0: NonterminalNode) => T; - StatementExpression?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode) => T; - StatementAssign?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode) => T; - StatementAugmentedAssign?: (this: NonterminalNode, arg0: NonterminalNode) => T; - StatementAugmentedAssignAdd?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode) => T; - StatementAugmentedAssignSub?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode) => T; - StatementAugmentedAssignMul?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode) => T; - StatementAugmentedAssignDiv?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode) => T; - StatementAugmentedAssignRem?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode) => T; - StatementCondition_simple?: (this: NonterminalNode, arg0: NonterminalNode, arg1: NonterminalNode, arg2: TerminalNode, arg3: IterationNode, arg4: TerminalNode) => T; - StatementCondition_withElse?: (this: NonterminalNode, arg0: NonterminalNode, arg1: NonterminalNode, arg2: TerminalNode, arg3: IterationNode, arg4: TerminalNode, arg5: NonterminalNode, arg6: TerminalNode, arg7: IterationNode, arg8: TerminalNode) => T; - StatementCondition_withElseIf?: (this: NonterminalNode, arg0: NonterminalNode, arg1: NonterminalNode, arg2: TerminalNode, arg3: IterationNode, arg4: TerminalNode, arg5: NonterminalNode, arg6: NonterminalNode) => T; - StatementCondition?: (this: NonterminalNode, arg0: NonterminalNode) => T; - StatementWhile?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: TerminalNode, arg5: IterationNode, arg6: TerminalNode) => T; - StatementRepeat?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: TerminalNode, arg5: IterationNode, arg6: TerminalNode) => T; - StatementUntil?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: IterationNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: TerminalNode, arg6: NonterminalNode, arg7: TerminalNode, arg8: TerminalNode) => T; - LValue_more?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - LValue_single?: (this: NonterminalNode, arg0: NonterminalNode) => T; - LValue?: (this: NonterminalNode, arg0: NonterminalNode) => T; - Expression?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionConditional_ternary?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode) => T; - ExpressionConditional?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionOr_or?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionOr?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionAnd_and?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionAnd?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionCompare_not?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionCompare_eq?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionCompare_gt?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionCompare_gte?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionCompare_lt?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionCompare_lte?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionCompare?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionBinary_shr?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionBinary_shl?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionBinary_bin_and?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionBinary_bin_or?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionBinary?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionAdd_add?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionAdd_sub?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionAdd?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionMul_mul?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionMul_div?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionMul_rem?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionMul?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionUnary_neg?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T; - ExpressionUnary_add?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T; - ExpressionUnary_not?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode) => T; - ExpressionUnary?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionUnarySuffix_notNull?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode) => T; - ExpressionUnarySuffix?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionBracket?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: TerminalNode) => T; - ExpressionValue?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionString?: (this: NonterminalNode, arg0: NonterminalNode) => T; - ExpressionField?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionCall?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: TerminalNode, arg4: NonterminalNode, arg5: IterationNode, arg6: TerminalNode) => T; - ExpressionNew?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: IterationNode, arg4: TerminalNode) => T; - NewParameter?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode) => T; - ExpressionStaticCall?: (this: NonterminalNode, arg0: NonterminalNode, arg1: TerminalNode, arg2: NonterminalNode, arg3: IterationNode, arg4: TerminalNode) => T; - ExpressionInitOf?: (this: NonterminalNode, arg0: NonterminalNode, arg1: NonterminalNode, arg2: TerminalNode, arg3: NonterminalNode, arg4: IterationNode, arg5: TerminalNode) => T; - typeLiteral?: (this: NonterminalNode, arg0: NonterminalNode, arg1: IterationNode) => T; - typeLiteralPart?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode) => T; - integerLiteral?: (this: NonterminalNode, arg0: NonterminalNode) => T; - integerLiteralDec_nonZeroIntegerLiteralDec?: (this: NonterminalNode, arg0: NonterminalNode, arg1: IterationNode, arg2: IterationNode) => T; - integerLiteralDec_integerLiteralWithLeadingZero?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode) => T; - integerLiteralDec?: (this: NonterminalNode, arg0: NonterminalNode) => T; - integerLiteralHex?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: IterationNode, arg3: IterationNode) => T; - integerLiteralBin?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: IterationNode, arg3: IterationNode) => T; - integerLiteralOct?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: IterationNode, arg3: IterationNode) => T; - binDigit?: (this: NonterminalNode, arg0: TerminalNode) => T; - octDigit?: (this: NonterminalNode, arg0: TerminalNode) => T; - nonZeroDigit?: (this: NonterminalNode, arg0: TerminalNode) => T; - letterAsciiLC?: (this: NonterminalNode, arg0: TerminalNode) => T; - letterAsciiUC?: (this: NonterminalNode, arg0: TerminalNode) => T; - letterAscii?: (this: NonterminalNode, arg0: NonterminalNode) => T; - letterComment?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode) => T; - idStart?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode) => T; - idPart?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode) => T; - id?: (this: NonterminalNode, arg0: NonterminalNode, arg1: IterationNode) => T; - funcLetter?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode) => T; - funcId?: (this: NonterminalNode, arg0: NonterminalNode, arg1: IterationNode) => T; - boolLiteral?: (this: NonterminalNode, arg0: TerminalNode) => T; - stringLiteral?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: TerminalNode) => T; - nonQuoteOrBackslashChar?: (this: NonterminalNode, arg0: NonterminalNode) => T; - escapeSequence_backslash?: (this: NonterminalNode, arg0: TerminalNode) => T; - escapeSequence_doubleQuote?: (this: NonterminalNode, arg0: TerminalNode) => T; - escapeSequence_newline?: (this: NonterminalNode, arg0: TerminalNode) => T; - escapeSequence_carriageReturn?: (this: NonterminalNode, arg0: TerminalNode) => T; - escapeSequence_tab?: (this: NonterminalNode, arg0: TerminalNode) => T; - escapeSequence_verticalTab?: (this: NonterminalNode, arg0: TerminalNode) => T; - escapeSequence_backspace?: (this: NonterminalNode, arg0: TerminalNode) => T; - escapeSequence_formFeed?: (this: NonterminalNode, arg0: TerminalNode) => T; - escapeSequence_unicodeCodePoint?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: IterationNode, arg3: IterationNode, arg4: IterationNode, arg5: IterationNode, arg6: IterationNode, arg7: TerminalNode) => T; - escapeSequence_unicodeEscape?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: NonterminalNode, arg3: NonterminalNode, arg4: NonterminalNode) => T; - escapeSequence_hexEscape?: (this: NonterminalNode, arg0: TerminalNode, arg1: NonterminalNode, arg2: NonterminalNode) => T; - escapeSequence?: (this: NonterminalNode, arg0: NonterminalNode) => T; - keyword?: (this: NonterminalNode, arg0: NonterminalNode) => T; - contract?: (this: NonterminalNode, arg0: TerminalNode) => T; - let?: (this: NonterminalNode, arg0: TerminalNode) => T; - fun?: (this: NonterminalNode, arg0: TerminalNode) => T; - return?: (this: NonterminalNode, arg0: TerminalNode) => T; - extend?: (this: NonterminalNode, arg0: TerminalNode) => T; - native?: (this: NonterminalNode, arg0: TerminalNode) => T; - public?: (this: NonterminalNode, arg0: TerminalNode) => T; - null?: (this: NonterminalNode, arg0: TerminalNode) => T; - if?: (this: NonterminalNode, arg0: TerminalNode) => T; - else?: (this: NonterminalNode, arg0: TerminalNode) => T; - while?: (this: NonterminalNode, arg0: TerminalNode) => T; - repeat?: (this: NonterminalNode, arg0: TerminalNode) => T; - do?: (this: NonterminalNode, arg0: TerminalNode) => T; - until?: (this: NonterminalNode, arg0: TerminalNode) => T; - as?: (this: NonterminalNode, arg0: TerminalNode) => T; - mutates?: (this: NonterminalNode, arg0: TerminalNode) => T; - extends?: (this: NonterminalNode, arg0: TerminalNode) => T; - import?: (this: NonterminalNode, arg0: TerminalNode) => T; - with?: (this: NonterminalNode, arg0: TerminalNode) => T; - trait?: (this: NonterminalNode, arg0: TerminalNode) => T; - initOf?: (this: NonterminalNode, arg0: TerminalNode) => T; - virtual?: (this: NonterminalNode, arg0: TerminalNode) => T; - override?: (this: NonterminalNode, arg0: TerminalNode) => T; - inline?: (this: NonterminalNode, arg0: TerminalNode) => T; - const?: (this: NonterminalNode, arg0: TerminalNode) => T; - abstract?: (this: NonterminalNode, arg0: TerminalNode) => T; - nameAttribute?: (this: NonterminalNode, arg0: TerminalNode) => T; - reservedWord?: (this: NonterminalNode, arg0: NonterminalNode) => T; - space?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode) => T; - comment?: (this: NonterminalNode, arg0: NonterminalNode) => T; - lineTerminator?: (this: NonterminalNode, arg0: TerminalNode) => T; - multiLineComment?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: TerminalNode) => T; - singleLineComment?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode) => T; -} - -export interface TactSemantics extends Semantics { - addOperation(name: string, actionDict: TactActionDict): this; - extendOperation(name: string, actionDict: TactActionDict): this; - addAttribute(name: string, actionDict: TactActionDict): this; - extendAttribute(name: string, actionDict: TactActionDict): this; -} - -export interface TactGrammar extends Grammar { - createSemantics(): TactSemantics; - extendSemantics(superSemantics: TactSemantics): TactSemantics; -} - -declare const grammar: TactGrammar; -export default grammar; - diff --git a/src/grammar/grammar.ohm-bundle.js b/src/grammar/grammar.ohm-bundle.js deleted file mode 100644 index 78e908a7c..000000000 --- a/src/grammar/grammar.ohm-bundle.js +++ /dev/null @@ -1 +0,0 @@ -'use strict';const ohm=(require('ohm-js').default || require('ohm-js'));const result=ohm.makeRecipe(["grammar",{"source":"Tact {\n\n // Starting point of the program\n Program = ProgramItem*\n ProgramItem = Struct\n | Contract\n | Primitive\n | StaticFunction\n | NativeFunction\n | ProgramImport\n | Trait\n | Constant\n ProgramImport = import stringLiteral \";\"\n\n // Built-in declarations\n Primitive = \"primitive\" Type \";\"\n\n // Static function\n StaticFunction = Function\n NativeFunction = nameAttribute \"(\" funcId \")\" FunctionAttribute* native id \"(\" ListOf \",\"? \")\" \";\" --withVoid\n | nameAttribute \"(\" funcId \")\" FunctionAttribute* native id \"(\" ListOf \",\"? \")\" \":\" Type \";\" --withType\n \n // Field declarations\n Type = typeLiteral \"?\" --optional\n | typeLiteral --required\n | \"map\" \"<\" typeLiteral (as id)? \",\" typeLiteral (as id)? \">\" --map\n | \"bounced\" \"<\" typeLiteral \">\" --bounced\n Field = id \":\" Type \";\" --default\n | id \":\" Type \"=\" Expression \";\" --defaultWithInit\n | id \":\" Type as id \";\" --withSerialization\n | id \":\" Type as id \"=\" Expression \";\" --withSerializationAndInit\n \n // Constant\n ConstantAttribute = virtual --virtual\n | override --override\n | abstract --abstract\n Constant = ConstantAttribute* ~fun const id \":\" Type \"=\" Expression \";\" --withValue\n | ConstantAttribute* ~fun const id \":\" Type \";\" --withEmpty\n\n // Struct\n Struct = \"struct\" typeLiteral \"{\" StructBody* \"}\" --originary\n | \"message\" typeLiteral \"{\" StructBody* \"}\" --message\n | \"message\" \"(\" integerLiteral \")\" typeLiteral \"{\" StructBody* \"}\" --messageWithId\n StructBody = Field\n\n // Contract\n Contract = ContractAttribute* contract id \"{\" ContractBody* \"}\" --simple\n | ContractAttribute* contract id with NonemptyListOf \",\"? \"{\" ContractBody* \"}\" --withTraits\n ContractInit = \"init\" \"(\" ListOf \",\"? \")\" \"{\" Statement* \"}\"\n ContractBody = Field\n | ContractInit\n | ReceiveFunction\n | Function\n | Constant\n \n // Trait\n Trait = ContractAttribute* trait id \"{\" TraitBody* \"}\" --originary\n | ContractAttribute* trait id with NonemptyListOf \",\"? \"{\" TraitBody* \"}\" --withTraits\n TraitBody = Field\n | ReceiveFunction\n | Function\n | Constant\n\n // Contract attributes\n ContractAttribute = \"@interface\" \"(\" stringLiteral \")\" --interface\n\n // Function\n FunctionAttribute = \"get\" --getter\n | mutates --mutates\n | extends --extends\n | virtual --virtual\n | override --override\n | inline --inline\n | abstract --abstract\n Function = FunctionAttribute* fun id \"(\" ListOf \",\"? \")\" \"{\" Statement* \"}\" --withVoid\n | FunctionAttribute* fun id \"(\" ListOf \",\"? \")\" \":\" Type \"{\" Statement* \"}\" --withType\n | FunctionAttribute* fun id \"(\" ListOf \",\"? \")\" \";\" --abstractVoid\n | FunctionAttribute* fun id \"(\" ListOf \",\"? \")\" \":\" Type \";\" --abstractType\n FunctionArg = id \":\" Type\n \n ReceiveFunction = \"receive\" \"(\" FunctionArg \")\" \"{\" Statement* \"}\" --simple\n | \"receive\" \"(\" \")\" \"{\" Statement* \"}\" --empty\n | \"receive\" \"(\" stringLiteral \")\" \"{\" Statement* \"}\" --comment\n | \"bounced\" \"(\" FunctionArg \")\" \"{\" Statement* \"}\" --bounced\n | \"external\" \"(\" FunctionArg \")\" \"{\" Statement* \"}\" --externalSimple\n | \"external\" \"(\" stringLiteral \")\" \"{\" Statement* \"}\" --externalComment\n | \"external\" \"(\" \")\" \"{\" Statement* \"}\" --externalEmpty\n\n // Statements\n Statement = StatementLet\n | StatementBlock\n | StatementReturn\n | StatementExpression\n | StatementAssign\n | StatementAugmentedAssign\n | StatementCondition\n | StatementWhile\n | StatementRepeat\n | StatementUntil\n StatementBlock = \"{\" Statement* \"}\"\n StatementLet = let id \":\" Type \"=\" Expression \";\"\n StatementReturn = return Expression \";\" --withExpression\n | return \";\" --withoutExpression \n StatementExpression = Expression \";\"\n StatementAssign = LValue \"=\" Expression \";\"\n StatementAugmentedAssign = StatementAugmentedAssignAdd\n | StatementAugmentedAssignSub\n | StatementAugmentedAssignMul\n | StatementAugmentedAssignDiv\n | StatementAugmentedAssignRem\n StatementAugmentedAssignAdd = LValue \"+=\" Expression \";\"\n StatementAugmentedAssignSub = LValue \"-=\" Expression \";\"\n StatementAugmentedAssignMul = LValue \"*=\" Expression \";\"\n StatementAugmentedAssignDiv = LValue \"/=\" Expression \";\"\n StatementAugmentedAssignRem = LValue \"%=\" Expression \";\"\n StatementCondition = if Expression \"{\" Statement* \"}\" ~else --simple\n | if Expression \"{\" Statement* \"}\" else \"{\" Statement* \"}\" --withElse\n | if Expression \"{\" Statement* \"}\" else StatementCondition --withElseIf\n StatementWhile = while \"(\" Expression \")\" \"{\" Statement* \"}\"\n StatementRepeat = repeat \"(\" Expression \")\" \"{\" Statement* \"}\"\n StatementUntil = do \"{\" Statement* \"}\" until \"(\" Expression \")\" \";\"\n\n // L-value\n LValue = id \".\" LValue --more\n | id --single\n\n // Expressions\n Expression = ExpressionConditional\n ExpressionConditional = ExpressionOr \"?\" ExpressionOr \":\" ExpressionConditional --ternary\n | ExpressionOr\n ExpressionOr = ExpressionOr \"||\" ExpressionAnd --or\n | ExpressionAnd\n ExpressionAnd = ExpressionAnd \"&&\" ExpressionCompare --and\n | ExpressionCompare\n ExpressionCompare = ExpressionCompare \"!=\" ExpressionBinary --not\n | ExpressionCompare \"==\" ExpressionBinary --eq\n | ExpressionCompare \">\" ExpressionBinary --gt\n | ExpressionCompare \">=\" ExpressionBinary --gte\n | ExpressionCompare \"<\" ExpressionBinary --lt\n | ExpressionCompare \"<=\" ExpressionBinary --lte\n | ExpressionBinary\n ExpressionBinary = ExpressionBinary \">>\" ExpressionAdd --shr\n | ExpressionBinary \"<<\" ExpressionAdd --shl\n | ExpressionBinary \"&\" ExpressionAdd --bin_and\n | ExpressionBinary \"|\" ExpressionAdd --bin_or\n | ExpressionAdd\n ExpressionAdd = ExpressionAdd \"+\" ~\"+\" ExpressionMul --add\n | ExpressionAdd \"-\" ~\"-\" ExpressionMul --sub\n | ExpressionMul\n ExpressionMul = ExpressionMul \"*\" ExpressionUnary --mul\n | ExpressionMul \"/\" ExpressionUnary --div\n | ExpressionMul \"%\" ExpressionUnary --rem\n | ExpressionUnary\n ExpressionUnary = \"-\" ExpressionUnarySuffix --neg\n | \"+\" ExpressionUnarySuffix --add\n | \"!\" ExpressionUnarySuffix --not\n | ExpressionUnarySuffix\n ExpressionUnarySuffix = ExpressionValue \"!!\" --notNull\n | ExpressionValue\n ExpressionBracket = \"(\" Expression \")\"\n\n // Order is important\n ExpressionValue = ExpressionCall\n | ExpressionField\n | ExpressionStaticCall\n | ExpressionBracket\n | ExpressionNew\n | integerLiteral\n | boolLiteral\n | id\n | null\n | ExpressionInitOf\n | ExpressionString\n ExpressionString = stringLiteral\n ExpressionField = ExpressionValue \".\" id ~\"(\"\n ExpressionCall = ExpressionValue \".\" id \"(\" ListOf \",\"? \")\"\n ExpressionNew = id \"{\" ListOf \",\"? \"}\"\n NewParameter = id \":\" Expression\n ExpressionStaticCall = id \"(\" ListOf \",\"? \")\"\n ExpressionInitOf = initOf id \"(\" ListOf \",\"? \")\"\n\n // Type Literal\n typeLiteral = letterAsciiUC typeLiteralPart*\n typeLiteralPart = letterAscii | digit | \"_\"\n\n // Integer Literal\n // hexDigit defined in Ohm's built-in rules (otherwise: hexDigit = \"0\"..\"9\" | \"a\"..\"f\" | \"A\"..\"F\")\n // digit defined in Ohm's built-in rules (otherwise: digit = \"0\"..\"9\")\n integerLiteral = integerLiteralHex | integerLiteralBin | integerLiteralOct | integerLiteralDec // Order is important\n integerLiteralDec = nonZeroDigit (\"_\"? digit)* --nonZeroIntegerLiteralDec\n | \"0\" digit* --integerLiteralWithLeadingZero\n integerLiteralHex = (\"0x\" | \"0X\") hexDigit (\"_\"? hexDigit)*\n integerLiteralBin = (\"0b\" | \"0B\") binDigit (\"_\"? binDigit)*\n integerLiteralOct = (\"0o\" | \"0O\") octDigit (\"_\"? octDigit)*\n binDigit = \"0\" | \"1\"\n octDigit = \"0\"..\"7\"\n nonZeroDigit = \"1\"..\"9\"\n\n // Letters\n letterAsciiLC = \"a\"..\"z\"\n letterAsciiUC = \"A\"..\"Z\"\n letterAscii = letterAsciiLC | letterAsciiUC\n letterComment = letterAsciiLC | letterAsciiUC | digit | \"_\"\n\n // ID Literal\n idStart = letterAscii | \"_\"\n idPart = letterAscii | digit | \"_\"\n id = ~reservedWord #idStart #(idPart*)\n\n // FunC id\n funcLetter = letterAscii | \"_\" | \"'\" | \"?\" | \"!\" | \"::\" | \"&\"\n funcId = funcLetter #(funcLetter | digit)*\n\n // Bool Literal\n boolLiteral = (\"true\" | \"false\") ~idPart\n\n // String literal\n stringLiteral = \"\\\"\" (nonQuoteOrBackslashChar | escapeSequence)* \"\\\"\"\n nonQuoteOrBackslashChar = ~(\"\\\"\" | \"\\\\\") any\n escapeSequence = \"\\\\\\\\\" -- backslash\n | \"\\\\\\\"\" -- doubleQuote\n | \"\\\\n\" -- newline\n | \"\\\\r\" -- carriageReturn\n | \"\\\\t\" -- tab\n | \"\\\\v\" -- verticalTab\n | \"\\\\b\" -- backspace\n | \"\\\\f\" -- formFeed\n | \"\\\\u{\" hexDigit hexDigit? hexDigit? hexDigit? hexDigit? hexDigit? \"}\" -- unicodeCodePoint\n | \"\\\\u\" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape\n | \"\\\\x\" hexDigit hexDigit -- hexEscape\n\n // Keywords\n // NOTE Order is important\n keyword = fun \n | let\n | return \n | extend \n | native \n | public \n | null \n | if \n | else \n | while \n | repeat \n | do \n | until \n | as \n | mutates\n | extends\n | import\n | with\n | trait\n | initOf\n | override\n | abstract\n | virtual\n | inline\n | const\n contract = \"contract\" ~idPart\n let = \"let\" ~idPart\n fun = \"fun\" ~idPart\n return = \"return\" ~idPart\n extend = \"extend\" ~idPart\n native = \"native\" ~idPart\n public = \"public\" ~idPart\n null = \"null\" ~idPart\n if = \"if\" ~idPart\n else = \"else\" ~idPart\n while = \"while\" ~idPart\n repeat = \"repeat\" ~idPart\n do = \"do\" ~idPart\n until = \"until\" ~idPart\n as = \"as\" ~idPart\n mutates = \"mutates\" ~idPart\n extends = \"extends\" ~idPart\n import = \"import\" ~idPart\n with = \"with\" ~idPart\n trait = \"trait\" ~idPart\n initOf = \"initOf\" ~idPart\n virtual = \"virtual\" ~idPart\n override = \"override\" ~idPart\n inline = \"inline\" ~idPart\n const = \"const\" ~idPart\n abstract = \"abstract\" ~idPart\n\n // Attributes\n nameAttribute = \"@name\"\n\n // Reserved\n reservedWord = keyword\n\n // Comments\n space += comment | lineTerminator\n comment = multiLineComment | singleLineComment\n lineTerminator = \"\\n\" | \"\\r\" | \"\\u2028\" | \"\\u2029\"\n multiLineComment = \"/*\" (~\"*/\" any)* \"*/\"\n singleLineComment = \"//\" (~lineTerminator any)*\n}"},"Tact",null,"Program",{"Program":["define",{"sourceInterval":[49,71]},null,[],["star",{"sourceInterval":[59,71]},["app",{"sourceInterval":[59,70]},"ProgramItem",[]]]],"ProgramItem":["define",{"sourceInterval":[76,300]},null,[],["alt",{"sourceInterval":[90,300]},["app",{"sourceInterval":[90,96]},"Struct",[]],["app",{"sourceInterval":[115,123]},"Contract",[]],["app",{"sourceInterval":[142,151]},"Primitive",[]],["app",{"sourceInterval":[170,184]},"StaticFunction",[]],["app",{"sourceInterval":[203,217]},"NativeFunction",[]],["app",{"sourceInterval":[236,249]},"ProgramImport",[]],["app",{"sourceInterval":[268,273]},"Trait",[]],["app",{"sourceInterval":[292,300]},"Constant",[]]]],"ProgramImport":["define",{"sourceInterval":[305,345]},null,[],["seq",{"sourceInterval":[321,345]},["app",{"sourceInterval":[321,327]},"import",[]],["app",{"sourceInterval":[328,341]},"stringLiteral",[]],["terminal",{"sourceInterval":[342,345]},";"]]],"Primitive":["define",{"sourceInterval":[380,412]},null,[],["seq",{"sourceInterval":[392,412]},["terminal",{"sourceInterval":[392,403]},"primitive"],["app",{"sourceInterval":[404,408]},"Type",[]],["terminal",{"sourceInterval":[409,412]},";"]]],"StaticFunction":["define",{"sourceInterval":[441,466]},null,[],["app",{"sourceInterval":[458,466]},"Function",[]]],"NativeFunction_withVoid":["define",{"sourceInterval":[488,597]},null,[],["seq",{"sourceInterval":[488,586]},["app",{"sourceInterval":[488,501]},"nameAttribute",[]],["terminal",{"sourceInterval":[502,505]},"("],["app",{"sourceInterval":[506,512]},"funcId",[]],["terminal",{"sourceInterval":[513,516]},")"],["star",{"sourceInterval":[517,535]},["app",{"sourceInterval":[517,534]},"FunctionAttribute",[]]],["app",{"sourceInterval":[536,542]},"native",[]],["app",{"sourceInterval":[543,545]},"id",[]],["terminal",{"sourceInterval":[546,549]},"("],["app",{"sourceInterval":[550,573]},"ListOf",[["app",{"sourceInterval":[557,568]},"FunctionArg",[]],["terminal",{"sourceInterval":[569,572]},","]]],["opt",{"sourceInterval":[574,578]},["terminal",{"sourceInterval":[574,577]},","]],["terminal",{"sourceInterval":[579,582]},")"],["terminal",{"sourceInterval":[583,586]},";"]]],"NativeFunction_withType":["define",{"sourceInterval":[619,737]},null,[],["seq",{"sourceInterval":[619,726]},["app",{"sourceInterval":[619,632]},"nameAttribute",[]],["terminal",{"sourceInterval":[633,636]},"("],["app",{"sourceInterval":[637,643]},"funcId",[]],["terminal",{"sourceInterval":[644,647]},")"],["star",{"sourceInterval":[648,666]},["app",{"sourceInterval":[648,665]},"FunctionAttribute",[]]],["app",{"sourceInterval":[667,673]},"native",[]],["app",{"sourceInterval":[674,676]},"id",[]],["terminal",{"sourceInterval":[677,680]},"("],["app",{"sourceInterval":[681,704]},"ListOf",[["app",{"sourceInterval":[688,699]},"FunctionArg",[]],["terminal",{"sourceInterval":[700,703]},","]]],["opt",{"sourceInterval":[705,709]},["terminal",{"sourceInterval":[705,708]},","]],["terminal",{"sourceInterval":[710,713]},")"],["terminal",{"sourceInterval":[714,717]},":"],["app",{"sourceInterval":[718,722]},"Type",[]],["terminal",{"sourceInterval":[723,726]},";"]]],"NativeFunction":["define",{"sourceInterval":[471,737]},null,[],["alt",{"sourceInterval":[488,737]},["app",{"sourceInterval":[488,586]},"NativeFunction_withVoid",[]],["app",{"sourceInterval":[619,726]},"NativeFunction_withType",[]]]],"Type_optional":["define",{"sourceInterval":[780,806]},null,[],["seq",{"sourceInterval":[780,795]},["app",{"sourceInterval":[780,791]},"typeLiteral",[]],["terminal",{"sourceInterval":[792,795]},"?"]]],"Type_required":["define",{"sourceInterval":[818,840]},null,[],["app",{"sourceInterval":[818,829]},"typeLiteral",[]]],"Type_map":["define",{"sourceInterval":[852,917]},null,[],["seq",{"sourceInterval":[852,911]},["terminal",{"sourceInterval":[852,857]},"map"],["terminal",{"sourceInterval":[858,861]},"<"],["app",{"sourceInterval":[862,873]},"typeLiteral",[]],["opt",{"sourceInterval":[874,882]},["seq",{"sourceInterval":[875,880]},["app",{"sourceInterval":[875,877]},"as",[]],["app",{"sourceInterval":[878,880]},"id",[]]]],["terminal",{"sourceInterval":[883,886]},","],["app",{"sourceInterval":[887,898]},"typeLiteral",[]],["opt",{"sourceInterval":[899,907]},["seq",{"sourceInterval":[900,905]},["app",{"sourceInterval":[900,902]},"as",[]],["app",{"sourceInterval":[903,905]},"id",[]]]],["terminal",{"sourceInterval":[908,911]},">"]]],"Type_bounced":["define",{"sourceInterval":[929,968]},null,[],["seq",{"sourceInterval":[929,958]},["terminal",{"sourceInterval":[929,938]},"bounced"],["terminal",{"sourceInterval":[939,942]},"<"],["app",{"sourceInterval":[943,954]},"typeLiteral",[]],["terminal",{"sourceInterval":[955,958]},">"]]],"Type":["define",{"sourceInterval":[773,968]},null,[],["alt",{"sourceInterval":[780,968]},["app",{"sourceInterval":[780,795]},"Type_optional",[]],["app",{"sourceInterval":[818,829]},"Type_required",[]],["app",{"sourceInterval":[852,911]},"Type_map",[]],["app",{"sourceInterval":[929,958]},"Type_bounced",[]]]],"Field_default":["define",{"sourceInterval":[981,1006]},null,[],["seq",{"sourceInterval":[981,996]},["app",{"sourceInterval":[981,983]},"id",[]],["terminal",{"sourceInterval":[984,987]},":"],["app",{"sourceInterval":[988,992]},"Type",[]],["terminal",{"sourceInterval":[993,996]},";"]]],"Field_defaultWithInit":["define",{"sourceInterval":[1019,1067]},null,[],["seq",{"sourceInterval":[1019,1049]},["app",{"sourceInterval":[1019,1021]},"id",[]],["terminal",{"sourceInterval":[1022,1025]},":"],["app",{"sourceInterval":[1026,1030]},"Type",[]],["terminal",{"sourceInterval":[1031,1034]},"="],["app",{"sourceInterval":[1035,1045]},"Expression",[]],["terminal",{"sourceInterval":[1046,1049]},";"]]],"Field_withSerialization":["define",{"sourceInterval":[1080,1121]},null,[],["seq",{"sourceInterval":[1080,1101]},["app",{"sourceInterval":[1080,1082]},"id",[]],["terminal",{"sourceInterval":[1083,1086]},":"],["app",{"sourceInterval":[1087,1091]},"Type",[]],["app",{"sourceInterval":[1092,1094]},"as",[]],["app",{"sourceInterval":[1095,1097]},"id",[]],["terminal",{"sourceInterval":[1098,1101]},";"]]],"Field_withSerializationAndInit":["define",{"sourceInterval":[1134,1197]},null,[],["seq",{"sourceInterval":[1134,1170]},["app",{"sourceInterval":[1134,1136]},"id",[]],["terminal",{"sourceInterval":[1137,1140]},":"],["app",{"sourceInterval":[1141,1145]},"Type",[]],["app",{"sourceInterval":[1146,1148]},"as",[]],["app",{"sourceInterval":[1149,1151]},"id",[]],["terminal",{"sourceInterval":[1152,1155]},"="],["app",{"sourceInterval":[1156,1166]},"Expression",[]],["terminal",{"sourceInterval":[1167,1170]},";"]]],"Field":["define",{"sourceInterval":[973,1197]},null,[],["alt",{"sourceInterval":[981,1197]},["app",{"sourceInterval":[981,996]},"Field_default",[]],["app",{"sourceInterval":[1019,1049]},"Field_defaultWithInit",[]],["app",{"sourceInterval":[1080,1101]},"Field_withSerialization",[]],["app",{"sourceInterval":[1134,1170]},"Field_withSerializationAndInit",[]]]],"ConstantAttribute_virtual":["define",{"sourceInterval":[1243,1263]},null,[],["app",{"sourceInterval":[1243,1250]},"virtual",[]]],"ConstantAttribute_override":["define",{"sourceInterval":[1288,1309]},null,[],["app",{"sourceInterval":[1288,1296]},"override",[]]],"ConstantAttribute_abstract":["define",{"sourceInterval":[1334,1355]},null,[],["app",{"sourceInterval":[1334,1342]},"abstract",[]]],"ConstantAttribute":["define",{"sourceInterval":[1223,1355]},null,[],["alt",{"sourceInterval":[1243,1355]},["app",{"sourceInterval":[1243,1250]},"ConstantAttribute_virtual",[]],["app",{"sourceInterval":[1288,1296]},"ConstantAttribute_override",[]],["app",{"sourceInterval":[1334,1342]},"ConstantAttribute_abstract",[]]]],"Constant_withValue":["define",{"sourceInterval":[1371,1443]},null,[],["seq",{"sourceInterval":[1371,1431]},["star",{"sourceInterval":[1371,1389]},["app",{"sourceInterval":[1371,1388]},"ConstantAttribute",[]]],["not",{"sourceInterval":[1390,1394]},["app",{"sourceInterval":[1391,1394]},"fun",[]]],["app",{"sourceInterval":[1395,1400]},"const",[]],["app",{"sourceInterval":[1401,1403]},"id",[]],["terminal",{"sourceInterval":[1404,1407]},":"],["app",{"sourceInterval":[1408,1412]},"Type",[]],["terminal",{"sourceInterval":[1413,1416]},"="],["app",{"sourceInterval":[1417,1427]},"Expression",[]],["terminal",{"sourceInterval":[1428,1431]},";"]]],"Constant_withEmpty":["define",{"sourceInterval":[1459,1531]},null,[],["seq",{"sourceInterval":[1459,1504]},["star",{"sourceInterval":[1459,1477]},["app",{"sourceInterval":[1459,1476]},"ConstantAttribute",[]]],["not",{"sourceInterval":[1478,1482]},["app",{"sourceInterval":[1479,1482]},"fun",[]]],["app",{"sourceInterval":[1483,1488]},"const",[]],["app",{"sourceInterval":[1489,1491]},"id",[]],["terminal",{"sourceInterval":[1492,1495]},":"],["app",{"sourceInterval":[1496,1500]},"Type",[]],["terminal",{"sourceInterval":[1501,1504]},";"]]],"Constant":["define",{"sourceInterval":[1360,1531]},null,[],["alt",{"sourceInterval":[1371,1531]},["app",{"sourceInterval":[1371,1431]},"Constant_withValue",[]],["app",{"sourceInterval":[1459,1504]},"Constant_withEmpty",[]]]],"Struct_originary":["define",{"sourceInterval":[1560,1612]},null,[],["seq",{"sourceInterval":[1560,1600]},["terminal",{"sourceInterval":[1560,1568]},"struct"],["app",{"sourceInterval":[1569,1580]},"typeLiteral",[]],["terminal",{"sourceInterval":[1581,1584]},"{"],["star",{"sourceInterval":[1585,1596]},["app",{"sourceInterval":[1585,1595]},"StructBody",[]]],["terminal",{"sourceInterval":[1597,1600]},"}"]]],"Struct_message":["define",{"sourceInterval":[1626,1677]},null,[],["seq",{"sourceInterval":[1626,1667]},["terminal",{"sourceInterval":[1626,1635]},"message"],["app",{"sourceInterval":[1636,1647]},"typeLiteral",[]],["terminal",{"sourceInterval":[1648,1651]},"{"],["star",{"sourceInterval":[1652,1663]},["app",{"sourceInterval":[1652,1662]},"StructBody",[]]],["terminal",{"sourceInterval":[1664,1667]},"}"]]],"Struct_messageWithId":["define",{"sourceInterval":[1691,1771]},null,[],["seq",{"sourceInterval":[1691,1755]},["terminal",{"sourceInterval":[1691,1700]},"message"],["terminal",{"sourceInterval":[1701,1704]},"("],["app",{"sourceInterval":[1705,1719]},"integerLiteral",[]],["terminal",{"sourceInterval":[1720,1723]},")"],["app",{"sourceInterval":[1724,1735]},"typeLiteral",[]],["terminal",{"sourceInterval":[1736,1739]},"{"],["star",{"sourceInterval":[1740,1751]},["app",{"sourceInterval":[1740,1750]},"StructBody",[]]],["terminal",{"sourceInterval":[1752,1755]},"}"]]],"Struct":["define",{"sourceInterval":[1551,1771]},null,[],["alt",{"sourceInterval":[1560,1771]},["app",{"sourceInterval":[1560,1600]},"Struct_originary",[]],["app",{"sourceInterval":[1626,1667]},"Struct_message",[]],["app",{"sourceInterval":[1691,1755]},"Struct_messageWithId",[]]]],"StructBody":["define",{"sourceInterval":[1776,1794]},null,[],["app",{"sourceInterval":[1789,1794]},"Field",[]]],"Contract_simple":["define",{"sourceInterval":[1827,1888]},null,[],["seq",{"sourceInterval":[1827,1879]},["star",{"sourceInterval":[1827,1845]},["app",{"sourceInterval":[1827,1844]},"ContractAttribute",[]]],["app",{"sourceInterval":[1846,1854]},"contract",[]],["app",{"sourceInterval":[1855,1857]},"id",[]],["terminal",{"sourceInterval":[1858,1861]},"{"],["star",{"sourceInterval":[1862,1875]},["app",{"sourceInterval":[1862,1874]},"ContractBody",[]]],["terminal",{"sourceInterval":[1876,1879]},"}"]]],"Contract_withTraits":["define",{"sourceInterval":[1904,2002]},null,[],["seq",{"sourceInterval":[1904,1989]},["star",{"sourceInterval":[1904,1922]},["app",{"sourceInterval":[1904,1921]},"ContractAttribute",[]]],["app",{"sourceInterval":[1923,1931]},"contract",[]],["app",{"sourceInterval":[1932,1934]},"id",[]],["app",{"sourceInterval":[1935,1939]},"with",[]],["app",{"sourceInterval":[1940,1962]},"NonemptyListOf",[["app",{"sourceInterval":[1955,1957]},"id",[]],["terminal",{"sourceInterval":[1958,1961]},","]]],["opt",{"sourceInterval":[1963,1967]},["terminal",{"sourceInterval":[1963,1966]},","]],["terminal",{"sourceInterval":[1968,1971]},"{"],["star",{"sourceInterval":[1972,1985]},["app",{"sourceInterval":[1972,1984]},"ContractBody",[]]],["terminal",{"sourceInterval":[1986,1989]},"}"]]],"Contract":["define",{"sourceInterval":[1816,2002]},null,[],["alt",{"sourceInterval":[1827,2002]},["app",{"sourceInterval":[1827,1879]},"Contract_simple",[]],["app",{"sourceInterval":[1904,1989]},"Contract_withTraits",[]]]],"ContractInit":["define",{"sourceInterval":[2007,2084]},null,[],["seq",{"sourceInterval":[2022,2084]},["terminal",{"sourceInterval":[2022,2028]},"init"],["terminal",{"sourceInterval":[2029,2032]},"("],["app",{"sourceInterval":[2033,2056]},"ListOf",[["app",{"sourceInterval":[2040,2051]},"FunctionArg",[]],["terminal",{"sourceInterval":[2052,2055]},","]]],["opt",{"sourceInterval":[2057,2061]},["terminal",{"sourceInterval":[2057,2060]},","]],["terminal",{"sourceInterval":[2062,2065]},")"],["terminal",{"sourceInterval":[2066,2069]},"{"],["star",{"sourceInterval":[2070,2080]},["app",{"sourceInterval":[2070,2079]},"Statement",[]]],["terminal",{"sourceInterval":[2081,2084]},"}"]]],"ContractBody":["define",{"sourceInterval":[2089,2232]},null,[],["alt",{"sourceInterval":[2104,2232]},["app",{"sourceInterval":[2104,2109]},"Field",[]],["app",{"sourceInterval":[2129,2141]},"ContractInit",[]],["app",{"sourceInterval":[2161,2176]},"ReceiveFunction",[]],["app",{"sourceInterval":[2196,2204]},"Function",[]],["app",{"sourceInterval":[2224,2232]},"Constant",[]]]],"Trait_originary":["define",{"sourceInterval":[2263,2321]},null,[],["seq",{"sourceInterval":[2263,2309]},["star",{"sourceInterval":[2263,2281]},["app",{"sourceInterval":[2263,2280]},"ContractAttribute",[]]],["app",{"sourceInterval":[2282,2287]},"trait",[]],["app",{"sourceInterval":[2288,2290]},"id",[]],["terminal",{"sourceInterval":[2291,2294]},"{"],["star",{"sourceInterval":[2295,2305]},["app",{"sourceInterval":[2295,2304]},"TraitBody",[]]],["terminal",{"sourceInterval":[2306,2309]},"}"]]],"Trait_withTraits":["define",{"sourceInterval":[2334,2426]},null,[],["seq",{"sourceInterval":[2334,2413]},["star",{"sourceInterval":[2334,2352]},["app",{"sourceInterval":[2334,2351]},"ContractAttribute",[]]],["app",{"sourceInterval":[2353,2358]},"trait",[]],["app",{"sourceInterval":[2359,2361]},"id",[]],["app",{"sourceInterval":[2362,2366]},"with",[]],["app",{"sourceInterval":[2367,2389]},"NonemptyListOf",[["app",{"sourceInterval":[2382,2384]},"id",[]],["terminal",{"sourceInterval":[2385,2388]},","]]],["opt",{"sourceInterval":[2390,2394]},["terminal",{"sourceInterval":[2390,2393]},","]],["terminal",{"sourceInterval":[2395,2398]},"{"],["star",{"sourceInterval":[2399,2409]},["app",{"sourceInterval":[2399,2408]},"TraitBody",[]]],["terminal",{"sourceInterval":[2410,2413]},"}"]]],"Trait":["define",{"sourceInterval":[2255,2426]},null,[],["alt",{"sourceInterval":[2263,2426]},["app",{"sourceInterval":[2263,2309]},"Trait_originary",[]],["app",{"sourceInterval":[2334,2413]},"Trait_withTraits",[]]]],"TraitBody":["define",{"sourceInterval":[2431,2530]},null,[],["alt",{"sourceInterval":[2443,2530]},["app",{"sourceInterval":[2443,2448]},"Field",[]],["app",{"sourceInterval":[2465,2480]},"ReceiveFunction",[]],["app",{"sourceInterval":[2497,2505]},"Function",[]],["app",{"sourceInterval":[2522,2530]},"Constant",[]]]],"ContractAttribute_interface":["define",{"sourceInterval":[2583,2629]},null,[],["seq",{"sourceInterval":[2583,2617]},["terminal",{"sourceInterval":[2583,2595]},"@interface"],["terminal",{"sourceInterval":[2596,2599]},"("],["app",{"sourceInterval":[2600,2613]},"stringLiteral",[]],["terminal",{"sourceInterval":[2614,2617]},")"]]],"ContractAttribute":["define",{"sourceInterval":[2563,2629]},null,[],["app",{"sourceInterval":[2583,2629]},"ContractAttribute_interface",[]]],"FunctionAttribute_getter":["define",{"sourceInterval":[2671,2689]},null,[],["terminal",{"sourceInterval":[2671,2676]},"get"]],"FunctionAttribute_mutates":["define",{"sourceInterval":[2714,2733]},null,[],["app",{"sourceInterval":[2714,2721]},"mutates",[]]],"FunctionAttribute_extends":["define",{"sourceInterval":[2758,2777]},null,[],["app",{"sourceInterval":[2758,2765]},"extends",[]]],"FunctionAttribute_virtual":["define",{"sourceInterval":[2802,2821]},null,[],["app",{"sourceInterval":[2802,2809]},"virtual",[]]],"FunctionAttribute_override":["define",{"sourceInterval":[2846,2866]},null,[],["app",{"sourceInterval":[2846,2854]},"override",[]]],"FunctionAttribute_inline":["define",{"sourceInterval":[2891,2909]},null,[],["app",{"sourceInterval":[2891,2897]},"inline",[]]],"FunctionAttribute_abstract":["define",{"sourceInterval":[2934,2954]},null,[],["app",{"sourceInterval":[2934,2942]},"abstract",[]]],"FunctionAttribute":["define",{"sourceInterval":[2651,2954]},null,[],["alt",{"sourceInterval":[2671,2954]},["app",{"sourceInterval":[2671,2676]},"FunctionAttribute_getter",[]],["app",{"sourceInterval":[2714,2721]},"FunctionAttribute_mutates",[]],["app",{"sourceInterval":[2758,2765]},"FunctionAttribute_extends",[]],["app",{"sourceInterval":[2802,2809]},"FunctionAttribute_virtual",[]],["app",{"sourceInterval":[2846,2854]},"FunctionAttribute_override",[]],["app",{"sourceInterval":[2891,2897]},"FunctionAttribute_inline",[]],["app",{"sourceInterval":[2934,2942]},"FunctionAttribute_abstract",[]]]],"Function_withVoid":["define",{"sourceInterval":[2970,3062]},null,[],["seq",{"sourceInterval":[2970,3051]},["star",{"sourceInterval":[2970,2988]},["app",{"sourceInterval":[2970,2987]},"FunctionAttribute",[]]],["app",{"sourceInterval":[2989,2992]},"fun",[]],["app",{"sourceInterval":[2993,2995]},"id",[]],["terminal",{"sourceInterval":[2996,2999]},"("],["app",{"sourceInterval":[3000,3023]},"ListOf",[["app",{"sourceInterval":[3007,3018]},"FunctionArg",[]],["terminal",{"sourceInterval":[3019,3022]},","]]],["opt",{"sourceInterval":[3024,3028]},["terminal",{"sourceInterval":[3024,3027]},","]],["terminal",{"sourceInterval":[3029,3032]},")"],["terminal",{"sourceInterval":[3033,3036]},"{"],["star",{"sourceInterval":[3037,3047]},["app",{"sourceInterval":[3037,3046]},"Statement",[]]],["terminal",{"sourceInterval":[3048,3051]},"}"]]],"Function_withType":["define",{"sourceInterval":[3078,3179]},null,[],["seq",{"sourceInterval":[3078,3168]},["star",{"sourceInterval":[3078,3096]},["app",{"sourceInterval":[3078,3095]},"FunctionAttribute",[]]],["app",{"sourceInterval":[3097,3100]},"fun",[]],["app",{"sourceInterval":[3101,3103]},"id",[]],["terminal",{"sourceInterval":[3104,3107]},"("],["app",{"sourceInterval":[3108,3131]},"ListOf",[["app",{"sourceInterval":[3115,3126]},"FunctionArg",[]],["terminal",{"sourceInterval":[3127,3130]},","]]],["opt",{"sourceInterval":[3132,3136]},["terminal",{"sourceInterval":[3132,3135]},","]],["terminal",{"sourceInterval":[3137,3140]},")"],["terminal",{"sourceInterval":[3141,3144]},":"],["app",{"sourceInterval":[3145,3149]},"Type",[]],["terminal",{"sourceInterval":[3150,3153]},"{"],["star",{"sourceInterval":[3154,3164]},["app",{"sourceInterval":[3154,3163]},"Statement",[]]],["terminal",{"sourceInterval":[3165,3168]},"}"]]],"Function_abstractVoid":["define",{"sourceInterval":[3195,3276]},null,[],["seq",{"sourceInterval":[3195,3261]},["star",{"sourceInterval":[3195,3213]},["app",{"sourceInterval":[3195,3212]},"FunctionAttribute",[]]],["app",{"sourceInterval":[3214,3217]},"fun",[]],["app",{"sourceInterval":[3218,3220]},"id",[]],["terminal",{"sourceInterval":[3221,3224]},"("],["app",{"sourceInterval":[3225,3248]},"ListOf",[["app",{"sourceInterval":[3232,3243]},"FunctionArg",[]],["terminal",{"sourceInterval":[3244,3247]},","]]],["opt",{"sourceInterval":[3249,3253]},["terminal",{"sourceInterval":[3249,3252]},","]],["terminal",{"sourceInterval":[3254,3257]},")"],["terminal",{"sourceInterval":[3258,3261]},";"]]],"Function_abstractType":["define",{"sourceInterval":[3292,3382]},null,[],["seq",{"sourceInterval":[3292,3367]},["star",{"sourceInterval":[3292,3310]},["app",{"sourceInterval":[3292,3309]},"FunctionAttribute",[]]],["app",{"sourceInterval":[3311,3314]},"fun",[]],["app",{"sourceInterval":[3315,3317]},"id",[]],["terminal",{"sourceInterval":[3318,3321]},"("],["app",{"sourceInterval":[3322,3345]},"ListOf",[["app",{"sourceInterval":[3329,3340]},"FunctionArg",[]],["terminal",{"sourceInterval":[3341,3344]},","]]],["opt",{"sourceInterval":[3346,3350]},["terminal",{"sourceInterval":[3346,3349]},","]],["terminal",{"sourceInterval":[3351,3354]},")"],["terminal",{"sourceInterval":[3355,3358]},":"],["app",{"sourceInterval":[3359,3363]},"Type",[]],["terminal",{"sourceInterval":[3364,3367]},";"]]],"Function":["define",{"sourceInterval":[2959,3382]},null,[],["alt",{"sourceInterval":[2970,3382]},["app",{"sourceInterval":[2970,3051]},"Function_withVoid",[]],["app",{"sourceInterval":[3078,3168]},"Function_withType",[]],["app",{"sourceInterval":[3195,3261]},"Function_abstractVoid",[]],["app",{"sourceInterval":[3292,3367]},"Function_abstractType",[]]]],"FunctionArg":["define",{"sourceInterval":[3387,3412]},null,[],["seq",{"sourceInterval":[3401,3412]},["app",{"sourceInterval":[3401,3403]},"id",[]],["terminal",{"sourceInterval":[3404,3407]},":"],["app",{"sourceInterval":[3408,3412]},"Type",[]]]],"ReceiveFunction_simple":["define",{"sourceInterval":[3440,3497]},null,[],["seq",{"sourceInterval":[3440,3488]},["terminal",{"sourceInterval":[3440,3449]},"receive"],["terminal",{"sourceInterval":[3450,3453]},"("],["app",{"sourceInterval":[3454,3465]},"FunctionArg",[]],["terminal",{"sourceInterval":[3466,3469]},")"],["terminal",{"sourceInterval":[3470,3473]},"{"],["star",{"sourceInterval":[3474,3484]},["app",{"sourceInterval":[3474,3483]},"Statement",[]]],["terminal",{"sourceInterval":[3485,3488]},"}"]]],"ReceiveFunction_empty":["define",{"sourceInterval":[3520,3564]},null,[],["seq",{"sourceInterval":[3520,3556]},["terminal",{"sourceInterval":[3520,3529]},"receive"],["terminal",{"sourceInterval":[3530,3533]},"("],["terminal",{"sourceInterval":[3534,3537]},")"],["terminal",{"sourceInterval":[3538,3541]},"{"],["star",{"sourceInterval":[3542,3552]},["app",{"sourceInterval":[3542,3551]},"Statement",[]]],["terminal",{"sourceInterval":[3553,3556]},"}"]]],"ReceiveFunction_comment":["define",{"sourceInterval":[3587,3647]},null,[],["seq",{"sourceInterval":[3587,3637]},["terminal",{"sourceInterval":[3587,3596]},"receive"],["terminal",{"sourceInterval":[3597,3600]},"("],["app",{"sourceInterval":[3601,3614]},"stringLiteral",[]],["terminal",{"sourceInterval":[3615,3618]},")"],["terminal",{"sourceInterval":[3619,3622]},"{"],["star",{"sourceInterval":[3623,3633]},["app",{"sourceInterval":[3623,3632]},"Statement",[]]],["terminal",{"sourceInterval":[3634,3637]},"}"]]],"ReceiveFunction_bounced":["define",{"sourceInterval":[3670,3728]},null,[],["seq",{"sourceInterval":[3670,3718]},["terminal",{"sourceInterval":[3670,3679]},"bounced"],["terminal",{"sourceInterval":[3680,3683]},"("],["app",{"sourceInterval":[3684,3695]},"FunctionArg",[]],["terminal",{"sourceInterval":[3696,3699]},")"],["terminal",{"sourceInterval":[3700,3703]},"{"],["star",{"sourceInterval":[3704,3714]},["app",{"sourceInterval":[3704,3713]},"Statement",[]]],["terminal",{"sourceInterval":[3715,3718]},"}"]]],"ReceiveFunction_externalSimple":["define",{"sourceInterval":[3751,3817]},null,[],["seq",{"sourceInterval":[3751,3800]},["terminal",{"sourceInterval":[3751,3761]},"external"],["terminal",{"sourceInterval":[3762,3765]},"("],["app",{"sourceInterval":[3766,3777]},"FunctionArg",[]],["terminal",{"sourceInterval":[3778,3781]},")"],["terminal",{"sourceInterval":[3782,3785]},"{"],["star",{"sourceInterval":[3786,3796]},["app",{"sourceInterval":[3786,3795]},"Statement",[]]],["terminal",{"sourceInterval":[3797,3800]},"}"]]],"ReceiveFunction_externalComment":["define",{"sourceInterval":[3840,3909]},null,[],["seq",{"sourceInterval":[3840,3891]},["terminal",{"sourceInterval":[3840,3850]},"external"],["terminal",{"sourceInterval":[3851,3854]},"("],["app",{"sourceInterval":[3855,3868]},"stringLiteral",[]],["terminal",{"sourceInterval":[3869,3872]},")"],["terminal",{"sourceInterval":[3873,3876]},"{"],["star",{"sourceInterval":[3877,3887]},["app",{"sourceInterval":[3877,3886]},"Statement",[]]],["terminal",{"sourceInterval":[3888,3891]},"}"]]],"ReceiveFunction_externalEmpty":["define",{"sourceInterval":[3932,3985]},null,[],["seq",{"sourceInterval":[3932,3969]},["terminal",{"sourceInterval":[3932,3942]},"external"],["terminal",{"sourceInterval":[3943,3946]},"("],["terminal",{"sourceInterval":[3947,3950]},")"],["terminal",{"sourceInterval":[3951,3954]},"{"],["star",{"sourceInterval":[3955,3965]},["app",{"sourceInterval":[3955,3964]},"Statement",[]]],["terminal",{"sourceInterval":[3966,3969]},"}"]]],"ReceiveFunction":["define",{"sourceInterval":[3422,3985]},null,[],["alt",{"sourceInterval":[3440,3985]},["app",{"sourceInterval":[3440,3488]},"ReceiveFunction_simple",[]],["app",{"sourceInterval":[3520,3556]},"ReceiveFunction_empty",[]],["app",{"sourceInterval":[3587,3637]},"ReceiveFunction_comment",[]],["app",{"sourceInterval":[3670,3718]},"ReceiveFunction_bounced",[]],["app",{"sourceInterval":[3751,3800]},"ReceiveFunction_externalSimple",[]],["app",{"sourceInterval":[3840,3891]},"ReceiveFunction_externalComment",[]],["app",{"sourceInterval":[3932,3969]},"ReceiveFunction_externalEmpty",[]]]],"Statement":["define",{"sourceInterval":[4009,4334]},null,[],["alt",{"sourceInterval":[4021,4334]},["app",{"sourceInterval":[4021,4033]},"StatementLet",[]],["app",{"sourceInterval":[4050,4064]},"StatementBlock",[]],["app",{"sourceInterval":[4081,4096]},"StatementReturn",[]],["app",{"sourceInterval":[4113,4132]},"StatementExpression",[]],["app",{"sourceInterval":[4149,4164]},"StatementAssign",[]],["app",{"sourceInterval":[4181,4205]},"StatementAugmentedAssign",[]],["app",{"sourceInterval":[4222,4240]},"StatementCondition",[]],["app",{"sourceInterval":[4257,4271]},"StatementWhile",[]],["app",{"sourceInterval":[4288,4303]},"StatementRepeat",[]],["app",{"sourceInterval":[4320,4334]},"StatementUntil",[]]]],"StatementBlock":["define",{"sourceInterval":[4339,4374]},null,[],["seq",{"sourceInterval":[4356,4374]},["terminal",{"sourceInterval":[4356,4359]},"{"],["star",{"sourceInterval":[4360,4370]},["app",{"sourceInterval":[4360,4369]},"Statement",[]]],["terminal",{"sourceInterval":[4371,4374]},"}"]]],"StatementLet":["define",{"sourceInterval":[4379,4428]},null,[],["seq",{"sourceInterval":[4394,4428]},["app",{"sourceInterval":[4394,4397]},"let",[]],["app",{"sourceInterval":[4398,4400]},"id",[]],["terminal",{"sourceInterval":[4401,4404]},":"],["app",{"sourceInterval":[4405,4409]},"Type",[]],["terminal",{"sourceInterval":[4410,4413]},"="],["app",{"sourceInterval":[4414,4424]},"Expression",[]],["terminal",{"sourceInterval":[4425,4428]},";"]]],"StatementReturn_withExpression":["define",{"sourceInterval":[4451,4489]},null,[],["seq",{"sourceInterval":[4451,4472]},["app",{"sourceInterval":[4451,4457]},"return",[]],["app",{"sourceInterval":[4458,4468]},"Expression",[]],["terminal",{"sourceInterval":[4469,4472]},";"]]],"StatementReturn_withoutExpression":["define",{"sourceInterval":[4512,4542]},null,[],["seq",{"sourceInterval":[4512,4522]},["app",{"sourceInterval":[4512,4518]},"return",[]],["terminal",{"sourceInterval":[4519,4522]},";"]]],"StatementReturn":["define",{"sourceInterval":[4433,4542]},null,[],["alt",{"sourceInterval":[4451,4542]},["app",{"sourceInterval":[4451,4472]},"StatementReturn_withExpression",[]],["app",{"sourceInterval":[4512,4522]},"StatementReturn_withoutExpression",[]]]],"StatementExpression":["define",{"sourceInterval":[4551,4587]},null,[],["seq",{"sourceInterval":[4573,4587]},["app",{"sourceInterval":[4573,4583]},"Expression",[]],["terminal",{"sourceInterval":[4584,4587]},";"]]],"StatementAssign":["define",{"sourceInterval":[4592,4635]},null,[],["seq",{"sourceInterval":[4610,4635]},["app",{"sourceInterval":[4610,4616]},"LValue",[]],["terminal",{"sourceInterval":[4617,4620]},"="],["app",{"sourceInterval":[4621,4631]},"Expression",[]],["terminal",{"sourceInterval":[4632,4635]},";"]]],"StatementAugmentedAssign":["define",{"sourceInterval":[4640,4930]},null,[],["alt",{"sourceInterval":[4667,4930]},["app",{"sourceInterval":[4667,4694]},"StatementAugmentedAssignAdd",[]],["app",{"sourceInterval":[4726,4753]},"StatementAugmentedAssignSub",[]],["app",{"sourceInterval":[4785,4812]},"StatementAugmentedAssignMul",[]],["app",{"sourceInterval":[4844,4871]},"StatementAugmentedAssignDiv",[]],["app",{"sourceInterval":[4903,4930]},"StatementAugmentedAssignRem",[]]]],"StatementAugmentedAssignAdd":["define",{"sourceInterval":[4935,4991]},null,[],["seq",{"sourceInterval":[4965,4991]},["app",{"sourceInterval":[4965,4971]},"LValue",[]],["terminal",{"sourceInterval":[4972,4976]},"+="],["app",{"sourceInterval":[4977,4987]},"Expression",[]],["terminal",{"sourceInterval":[4988,4991]},";"]]],"StatementAugmentedAssignSub":["define",{"sourceInterval":[4996,5052]},null,[],["seq",{"sourceInterval":[5026,5052]},["app",{"sourceInterval":[5026,5032]},"LValue",[]],["terminal",{"sourceInterval":[5033,5037]},"-="],["app",{"sourceInterval":[5038,5048]},"Expression",[]],["terminal",{"sourceInterval":[5049,5052]},";"]]],"StatementAugmentedAssignMul":["define",{"sourceInterval":[5057,5113]},null,[],["seq",{"sourceInterval":[5087,5113]},["app",{"sourceInterval":[5087,5093]},"LValue",[]],["terminal",{"sourceInterval":[5094,5098]},"*="],["app",{"sourceInterval":[5099,5109]},"Expression",[]],["terminal",{"sourceInterval":[5110,5113]},";"]]],"StatementAugmentedAssignDiv":["define",{"sourceInterval":[5118,5174]},null,[],["seq",{"sourceInterval":[5148,5174]},["app",{"sourceInterval":[5148,5154]},"LValue",[]],["terminal",{"sourceInterval":[5155,5159]},"/="],["app",{"sourceInterval":[5160,5170]},"Expression",[]],["terminal",{"sourceInterval":[5171,5174]},";"]]],"StatementAugmentedAssignRem":["define",{"sourceInterval":[5179,5235]},null,[],["seq",{"sourceInterval":[5209,5235]},["app",{"sourceInterval":[5209,5215]},"LValue",[]],["terminal",{"sourceInterval":[5216,5220]},"%="],["app",{"sourceInterval":[5221,5231]},"Expression",[]],["terminal",{"sourceInterval":[5232,5235]},";"]]],"StatementCondition_simple":["define",{"sourceInterval":[5261,5308]},null,[],["seq",{"sourceInterval":[5261,5299]},["app",{"sourceInterval":[5261,5263]},"if",[]],["app",{"sourceInterval":[5264,5274]},"Expression",[]],["terminal",{"sourceInterval":[5275,5278]},"{"],["star",{"sourceInterval":[5279,5289]},["app",{"sourceInterval":[5279,5288]},"Statement",[]]],["terminal",{"sourceInterval":[5290,5293]},"}"],["not",{"sourceInterval":[5294,5299]},["app",{"sourceInterval":[5295,5299]},"else",[]]]]],"StatementCondition_withElse":["define",{"sourceInterval":[5334,5401]},null,[],["seq",{"sourceInterval":[5334,5390]},["app",{"sourceInterval":[5334,5336]},"if",[]],["app",{"sourceInterval":[5337,5347]},"Expression",[]],["terminal",{"sourceInterval":[5348,5351]},"{"],["star",{"sourceInterval":[5352,5362]},["app",{"sourceInterval":[5352,5361]},"Statement",[]]],["terminal",{"sourceInterval":[5363,5366]},"}"],["app",{"sourceInterval":[5367,5371]},"else",[]],["terminal",{"sourceInterval":[5372,5375]},"{"],["star",{"sourceInterval":[5376,5386]},["app",{"sourceInterval":[5376,5385]},"Statement",[]]],["terminal",{"sourceInterval":[5387,5390]},"}"]]],"StatementCondition_withElseIf":["define",{"sourceInterval":[5427,5496]},null,[],["seq",{"sourceInterval":[5427,5483]},["app",{"sourceInterval":[5427,5429]},"if",[]],["app",{"sourceInterval":[5430,5440]},"Expression",[]],["terminal",{"sourceInterval":[5441,5444]},"{"],["star",{"sourceInterval":[5445,5455]},["app",{"sourceInterval":[5445,5454]},"Statement",[]]],["terminal",{"sourceInterval":[5456,5459]},"}"],["app",{"sourceInterval":[5460,5464]},"else",[]],["app",{"sourceInterval":[5465,5483]},"StatementCondition",[]]]],"StatementCondition":["define",{"sourceInterval":[5240,5496]},null,[],["alt",{"sourceInterval":[5261,5496]},["app",{"sourceInterval":[5261,5299]},"StatementCondition_simple",[]],["app",{"sourceInterval":[5334,5390]},"StatementCondition_withElse",[]],["app",{"sourceInterval":[5427,5483]},"StatementCondition_withElseIf",[]]]],"StatementWhile":["define",{"sourceInterval":[5501,5561]},null,[],["seq",{"sourceInterval":[5518,5561]},["app",{"sourceInterval":[5518,5523]},"while",[]],["terminal",{"sourceInterval":[5524,5527]},"("],["app",{"sourceInterval":[5528,5538]},"Expression",[]],["terminal",{"sourceInterval":[5539,5542]},")"],["terminal",{"sourceInterval":[5543,5546]},"{"],["star",{"sourceInterval":[5547,5557]},["app",{"sourceInterval":[5547,5556]},"Statement",[]]],["terminal",{"sourceInterval":[5558,5561]},"}"]]],"StatementRepeat":["define",{"sourceInterval":[5566,5628]},null,[],["seq",{"sourceInterval":[5584,5628]},["app",{"sourceInterval":[5584,5590]},"repeat",[]],["terminal",{"sourceInterval":[5591,5594]},"("],["app",{"sourceInterval":[5595,5605]},"Expression",[]],["terminal",{"sourceInterval":[5606,5609]},")"],["terminal",{"sourceInterval":[5610,5613]},"{"],["star",{"sourceInterval":[5614,5624]},["app",{"sourceInterval":[5614,5623]},"Statement",[]]],["terminal",{"sourceInterval":[5625,5628]},"}"]]],"StatementUntil":["define",{"sourceInterval":[5633,5700]},null,[],["seq",{"sourceInterval":[5650,5700]},["app",{"sourceInterval":[5650,5652]},"do",[]],["terminal",{"sourceInterval":[5653,5656]},"{"],["star",{"sourceInterval":[5657,5667]},["app",{"sourceInterval":[5657,5666]},"Statement",[]]],["terminal",{"sourceInterval":[5668,5671]},"}"],["app",{"sourceInterval":[5672,5677]},"until",[]],["terminal",{"sourceInterval":[5678,5681]},"("],["app",{"sourceInterval":[5682,5692]},"Expression",[]],["terminal",{"sourceInterval":[5693,5696]},")"],["terminal",{"sourceInterval":[5697,5700]},";"]]],"LValue_more":["define",{"sourceInterval":[5730,5750]},null,[],["seq",{"sourceInterval":[5730,5743]},["app",{"sourceInterval":[5730,5732]},"id",[]],["terminal",{"sourceInterval":[5733,5736]},"."],["app",{"sourceInterval":[5737,5743]},"LValue",[]]]],"LValue_single":["define",{"sourceInterval":[5764,5775]},null,[],["app",{"sourceInterval":[5764,5766]},"id",[]]],"LValue":["define",{"sourceInterval":[5721,5775]},null,[],["alt",{"sourceInterval":[5730,5775]},["app",{"sourceInterval":[5730,5743]},"LValue_more",[]],["app",{"sourceInterval":[5764,5766]},"LValue_single",[]]]],"Expression":["define",{"sourceInterval":[5800,5834]},null,[],["app",{"sourceInterval":[5813,5834]},"ExpressionConditional",[]]],"ExpressionConditional_ternary":["define",{"sourceInterval":[5863,5928]},null,[],["seq",{"sourceInterval":[5863,5918]},["app",{"sourceInterval":[5863,5875]},"ExpressionOr",[]],["terminal",{"sourceInterval":[5876,5879]},"?"],["app",{"sourceInterval":[5880,5892]},"ExpressionOr",[]],["terminal",{"sourceInterval":[5893,5896]},":"],["app",{"sourceInterval":[5897,5918]},"ExpressionConditional",[]]]],"ExpressionConditional":["define",{"sourceInterval":[5839,5969]},null,[],["alt",{"sourceInterval":[5863,5969]},["app",{"sourceInterval":[5863,5918]},"ExpressionConditional_ternary",[]],["app",{"sourceInterval":[5957,5969]},"ExpressionOr",[]]]],"ExpressionOr_or":["define",{"sourceInterval":[5989,6025]},null,[],["seq",{"sourceInterval":[5989,6020]},["app",{"sourceInterval":[5989,6001]},"ExpressionOr",[]],["terminal",{"sourceInterval":[6002,6006]},"||"],["app",{"sourceInterval":[6007,6020]},"ExpressionAnd",[]]]],"ExpressionOr":["define",{"sourceInterval":[5974,6058]},null,[],["alt",{"sourceInterval":[5989,6058]},["app",{"sourceInterval":[5989,6020]},"ExpressionOr_or",[]],["app",{"sourceInterval":[6045,6058]},"ExpressionAnd",[]]]],"ExpressionAnd_and":["define",{"sourceInterval":[6079,6121]},null,[],["seq",{"sourceInterval":[6079,6115]},["app",{"sourceInterval":[6079,6092]},"ExpressionAnd",[]],["terminal",{"sourceInterval":[6093,6097]},"&&"],["app",{"sourceInterval":[6098,6115]},"ExpressionCompare",[]]]],"ExpressionAnd":["define",{"sourceInterval":[6063,6159]},null,[],["alt",{"sourceInterval":[6079,6159]},["app",{"sourceInterval":[6079,6115]},"ExpressionAnd_and",[]],["app",{"sourceInterval":[6142,6159]},"ExpressionCompare",[]]]],"ExpressionCompare_not":["define",{"sourceInterval":[6184,6229]},null,[],["seq",{"sourceInterval":[6184,6223]},["app",{"sourceInterval":[6184,6201]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[6202,6206]},"!="],["app",{"sourceInterval":[6207,6223]},"ExpressionBinary",[]]]],"ExpressionCompare_eq":["define",{"sourceInterval":[6254,6298]},null,[],["seq",{"sourceInterval":[6254,6293]},["app",{"sourceInterval":[6254,6271]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[6272,6276]},"=="],["app",{"sourceInterval":[6277,6293]},"ExpressionBinary",[]]]],"ExpressionCompare_gt":["define",{"sourceInterval":[6323,6366]},null,[],["seq",{"sourceInterval":[6323,6361]},["app",{"sourceInterval":[6323,6340]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[6341,6344]},">"],["app",{"sourceInterval":[6345,6361]},"ExpressionBinary",[]]]],"ExpressionCompare_gte":["define",{"sourceInterval":[6391,6436]},null,[],["seq",{"sourceInterval":[6391,6430]},["app",{"sourceInterval":[6391,6408]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[6409,6413]},">="],["app",{"sourceInterval":[6414,6430]},"ExpressionBinary",[]]]],"ExpressionCompare_lt":["define",{"sourceInterval":[6461,6504]},null,[],["seq",{"sourceInterval":[6461,6499]},["app",{"sourceInterval":[6461,6478]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[6479,6482]},"<"],["app",{"sourceInterval":[6483,6499]},"ExpressionBinary",[]]]],"ExpressionCompare_lte":["define",{"sourceInterval":[6529,6574]},null,[],["seq",{"sourceInterval":[6529,6568]},["app",{"sourceInterval":[6529,6546]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[6547,6551]},"<="],["app",{"sourceInterval":[6552,6568]},"ExpressionBinary",[]]]],"ExpressionCompare":["define",{"sourceInterval":[6164,6615]},null,[],["alt",{"sourceInterval":[6184,6615]},["app",{"sourceInterval":[6184,6223]},"ExpressionCompare_not",[]],["app",{"sourceInterval":[6254,6293]},"ExpressionCompare_eq",[]],["app",{"sourceInterval":[6323,6361]},"ExpressionCompare_gt",[]],["app",{"sourceInterval":[6391,6430]},"ExpressionCompare_gte",[]],["app",{"sourceInterval":[6461,6499]},"ExpressionCompare_lt",[]],["app",{"sourceInterval":[6529,6568]},"ExpressionCompare_lte",[]],["app",{"sourceInterval":[6599,6615]},"ExpressionBinary",[]]]],"ExpressionBinary_shr":["define",{"sourceInterval":[6639,6680]},null,[],["seq",{"sourceInterval":[6639,6674]},["app",{"sourceInterval":[6639,6655]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[6656,6660]},">>"],["app",{"sourceInterval":[6661,6674]},"ExpressionAdd",[]]]],"ExpressionBinary_shl":["define",{"sourceInterval":[6703,6744]},null,[],["seq",{"sourceInterval":[6703,6738]},["app",{"sourceInterval":[6703,6719]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[6720,6724]},"<<"],["app",{"sourceInterval":[6725,6738]},"ExpressionAdd",[]]]],"ExpressionBinary_bin_and":["define",{"sourceInterval":[6767,6811]},null,[],["seq",{"sourceInterval":[6767,6801]},["app",{"sourceInterval":[6767,6783]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[6784,6787]},"&"],["app",{"sourceInterval":[6788,6801]},"ExpressionAdd",[]]]],"ExpressionBinary_bin_or":["define",{"sourceInterval":[6834,6877]},null,[],["seq",{"sourceInterval":[6834,6868]},["app",{"sourceInterval":[6834,6850]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[6851,6854]},"|"],["app",{"sourceInterval":[6855,6868]},"ExpressionAdd",[]]]],"ExpressionBinary":["define",{"sourceInterval":[6620,6913]},null,[],["alt",{"sourceInterval":[6639,6913]},["app",{"sourceInterval":[6639,6674]},"ExpressionBinary_shr",[]],["app",{"sourceInterval":[6703,6738]},"ExpressionBinary_shl",[]],["app",{"sourceInterval":[6767,6801]},"ExpressionBinary_bin_and",[]],["app",{"sourceInterval":[6834,6868]},"ExpressionBinary_bin_or",[]],["app",{"sourceInterval":[6900,6913]},"ExpressionAdd",[]]]],"ExpressionAdd_add":["define",{"sourceInterval":[6934,6976]},null,[],["seq",{"sourceInterval":[6934,6970]},["app",{"sourceInterval":[6934,6947]},"ExpressionAdd",[]],["terminal",{"sourceInterval":[6948,6951]},"+"],["not",{"sourceInterval":[6952,6956]},["terminal",{"sourceInterval":[6953,6956]},"+"]],["app",{"sourceInterval":[6957,6970]},"ExpressionMul",[]]]],"ExpressionAdd_sub":["define",{"sourceInterval":[6997,7039]},null,[],["seq",{"sourceInterval":[6997,7033]},["app",{"sourceInterval":[6997,7010]},"ExpressionAdd",[]],["terminal",{"sourceInterval":[7011,7014]},"-"],["not",{"sourceInterval":[7015,7019]},["terminal",{"sourceInterval":[7016,7019]},"-"]],["app",{"sourceInterval":[7020,7033]},"ExpressionMul",[]]]],"ExpressionAdd":["define",{"sourceInterval":[6918,7073]},null,[],["alt",{"sourceInterval":[6934,7073]},["app",{"sourceInterval":[6934,6970]},"ExpressionAdd_add",[]],["app",{"sourceInterval":[6997,7033]},"ExpressionAdd_sub",[]],["app",{"sourceInterval":[7060,7073]},"ExpressionMul",[]]]],"ExpressionMul_mul":["define",{"sourceInterval":[7094,7133]},null,[],["seq",{"sourceInterval":[7094,7127]},["app",{"sourceInterval":[7094,7107]},"ExpressionMul",[]],["terminal",{"sourceInterval":[7108,7111]},"*"],["app",{"sourceInterval":[7112,7127]},"ExpressionUnary",[]]]],"ExpressionMul_div":["define",{"sourceInterval":[7154,7193]},null,[],["seq",{"sourceInterval":[7154,7187]},["app",{"sourceInterval":[7154,7167]},"ExpressionMul",[]],["terminal",{"sourceInterval":[7168,7171]},"/"],["app",{"sourceInterval":[7172,7187]},"ExpressionUnary",[]]]],"ExpressionMul_rem":["define",{"sourceInterval":[7214,7253]},null,[],["seq",{"sourceInterval":[7214,7247]},["app",{"sourceInterval":[7214,7227]},"ExpressionMul",[]],["terminal",{"sourceInterval":[7228,7231]},"%"],["app",{"sourceInterval":[7232,7247]},"ExpressionUnary",[]]]],"ExpressionMul":["define",{"sourceInterval":[7078,7289]},null,[],["alt",{"sourceInterval":[7094,7289]},["app",{"sourceInterval":[7094,7127]},"ExpressionMul_mul",[]],["app",{"sourceInterval":[7154,7187]},"ExpressionMul_div",[]],["app",{"sourceInterval":[7214,7247]},"ExpressionMul_rem",[]],["app",{"sourceInterval":[7274,7289]},"ExpressionUnary",[]]]],"ExpressionUnary_neg":["define",{"sourceInterval":[7312,7343]},null,[],["seq",{"sourceInterval":[7312,7337]},["terminal",{"sourceInterval":[7312,7315]},"-"],["app",{"sourceInterval":[7316,7337]},"ExpressionUnarySuffix",[]]]],"ExpressionUnary_add":["define",{"sourceInterval":[7366,7397]},null,[],["seq",{"sourceInterval":[7366,7391]},["terminal",{"sourceInterval":[7366,7369]},"+"],["app",{"sourceInterval":[7370,7391]},"ExpressionUnarySuffix",[]]]],"ExpressionUnary_not":["define",{"sourceInterval":[7420,7451]},null,[],["seq",{"sourceInterval":[7420,7445]},["terminal",{"sourceInterval":[7420,7423]},"!"],["app",{"sourceInterval":[7424,7445]},"ExpressionUnarySuffix",[]]]],"ExpressionUnary":["define",{"sourceInterval":[7294,7495]},null,[],["alt",{"sourceInterval":[7312,7495]},["app",{"sourceInterval":[7312,7337]},"ExpressionUnary_neg",[]],["app",{"sourceInterval":[7366,7391]},"ExpressionUnary_add",[]],["app",{"sourceInterval":[7420,7445]},"ExpressionUnary_not",[]],["app",{"sourceInterval":[7474,7495]},"ExpressionUnarySuffix",[]]]],"ExpressionUnarySuffix_notNull":["define",{"sourceInterval":[7524,7554]},null,[],["seq",{"sourceInterval":[7524,7544]},["app",{"sourceInterval":[7524,7539]},"ExpressionValue",[]],["terminal",{"sourceInterval":[7540,7544]},"!!"]]],"ExpressionUnarySuffix":["define",{"sourceInterval":[7500,7598]},null,[],["alt",{"sourceInterval":[7524,7598]},["app",{"sourceInterval":[7524,7544]},"ExpressionUnarySuffix_notNull",[]],["app",{"sourceInterval":[7583,7598]},"ExpressionValue",[]]]],"ExpressionBracket":["define",{"sourceInterval":[7603,7641]},null,[],["seq",{"sourceInterval":[7623,7641]},["terminal",{"sourceInterval":[7623,7626]},"("],["app",{"sourceInterval":[7627,7637]},"Expression",[]],["terminal",{"sourceInterval":[7638,7641]},")"]]],"ExpressionValue":["define",{"sourceInterval":[7673,8063]},null,[],["alt",{"sourceInterval":[7691,8063]},["app",{"sourceInterval":[7691,7705]},"ExpressionCall",[]],["app",{"sourceInterval":[7728,7743]},"ExpressionField",[]],["app",{"sourceInterval":[7766,7786]},"ExpressionStaticCall",[]],["app",{"sourceInterval":[7809,7826]},"ExpressionBracket",[]],["app",{"sourceInterval":[7849,7862]},"ExpressionNew",[]],["app",{"sourceInterval":[7885,7899]},"integerLiteral",[]],["app",{"sourceInterval":[7922,7933]},"boolLiteral",[]],["app",{"sourceInterval":[7956,7958]},"id",[]],["app",{"sourceInterval":[7981,7985]},"null",[]],["app",{"sourceInterval":[8008,8024]},"ExpressionInitOf",[]],["app",{"sourceInterval":[8047,8063]},"ExpressionString",[]]]],"ExpressionString":["define",{"sourceInterval":[8068,8100]},null,[],["app",{"sourceInterval":[8087,8100]},"stringLiteral",[]]],"ExpressionField":["define",{"sourceInterval":[8105,8150]},null,[],["seq",{"sourceInterval":[8123,8150]},["app",{"sourceInterval":[8123,8138]},"ExpressionValue",[]],["terminal",{"sourceInterval":[8139,8142]},"."],["app",{"sourceInterval":[8143,8145]},"id",[]],["not",{"sourceInterval":[8146,8150]},["terminal",{"sourceInterval":[8147,8150]},"("]]]],"ExpressionCall":["define",{"sourceInterval":[8155,8231]},null,[],["seq",{"sourceInterval":[8172,8231]},["app",{"sourceInterval":[8172,8187]},"ExpressionValue",[]],["terminal",{"sourceInterval":[8188,8191]},"."],["app",{"sourceInterval":[8192,8194]},"id",[]],["terminal",{"sourceInterval":[8195,8198]},"("],["app",{"sourceInterval":[8199,8222]},"ListOf",[["app",{"sourceInterval":[8206,8216]},"Expression",[]],["terminal",{"sourceInterval":[8218,8221]},","]]],["opt",{"sourceInterval":[8223,8227]},["terminal",{"sourceInterval":[8223,8226]},","]],["terminal",{"sourceInterval":[8228,8231]},")"]]],"ExpressionNew":["define",{"sourceInterval":[8236,8293]},null,[],["seq",{"sourceInterval":[8252,8293]},["app",{"sourceInterval":[8252,8254]},"id",[]],["terminal",{"sourceInterval":[8255,8258]},"{"],["app",{"sourceInterval":[8259,8284]},"ListOf",[["app",{"sourceInterval":[8266,8278]},"NewParameter",[]],["terminal",{"sourceInterval":[8280,8283]},","]]],["opt",{"sourceInterval":[8285,8289]},["terminal",{"sourceInterval":[8285,8288]},","]],["terminal",{"sourceInterval":[8290,8293]},"}"]]],"NewParameter":["define",{"sourceInterval":[8298,8330]},null,[],["seq",{"sourceInterval":[8313,8330]},["app",{"sourceInterval":[8313,8315]},"id",[]],["terminal",{"sourceInterval":[8316,8319]},":"],["app",{"sourceInterval":[8320,8330]},"Expression",[]]]],"ExpressionStaticCall":["define",{"sourceInterval":[8335,8397]},null,[],["seq",{"sourceInterval":[8358,8397]},["app",{"sourceInterval":[8358,8360]},"id",[]],["terminal",{"sourceInterval":[8361,8364]},"("],["app",{"sourceInterval":[8365,8388]},"ListOf",[["app",{"sourceInterval":[8372,8382]},"Expression",[]],["terminal",{"sourceInterval":[8384,8387]},","]]],["opt",{"sourceInterval":[8389,8393]},["terminal",{"sourceInterval":[8389,8392]},","]],["terminal",{"sourceInterval":[8394,8397]},")"]]],"ExpressionInitOf":["define",{"sourceInterval":[8402,8467]},null,[],["seq",{"sourceInterval":[8421,8467]},["app",{"sourceInterval":[8421,8427]},"initOf",[]],["app",{"sourceInterval":[8428,8430]},"id",[]],["terminal",{"sourceInterval":[8431,8434]},"("],["app",{"sourceInterval":[8435,8458]},"ListOf",[["app",{"sourceInterval":[8442,8452]},"Expression",[]],["terminal",{"sourceInterval":[8454,8457]},","]]],["opt",{"sourceInterval":[8459,8463]},["terminal",{"sourceInterval":[8459,8462]},","]],["terminal",{"sourceInterval":[8464,8467]},")"]]],"typeLiteral":["define",{"sourceInterval":[8493,8537]},null,[],["seq",{"sourceInterval":[8507,8537]},["app",{"sourceInterval":[8507,8520]},"letterAsciiUC",[]],["star",{"sourceInterval":[8521,8537]},["app",{"sourceInterval":[8521,8536]},"typeLiteralPart",[]]]]],"typeLiteralPart":["define",{"sourceInterval":[8542,8585]},null,[],["alt",{"sourceInterval":[8560,8585]},["app",{"sourceInterval":[8560,8571]},"letterAscii",[]],["app",{"sourceInterval":[8574,8579]},"digit",[]],["terminal",{"sourceInterval":[8582,8585]},"_"]]],"integerLiteral":["define",{"sourceInterval":[8792,8886]},null,[],["alt",{"sourceInterval":[8809,8886]},["app",{"sourceInterval":[8809,8826]},"integerLiteralHex",[]],["app",{"sourceInterval":[8829,8846]},"integerLiteralBin",[]],["app",{"sourceInterval":[8849,8866]},"integerLiteralOct",[]],["app",{"sourceInterval":[8869,8886]},"integerLiteralDec",[]]]],"integerLiteralDec_nonZeroIntegerLiteralDec":["define",{"sourceInterval":[8933,8987]},null,[],["seq",{"sourceInterval":[8933,8959]},["app",{"sourceInterval":[8933,8945]},"nonZeroDigit",[]],["star",{"sourceInterval":[8946,8959]},["seq",{"sourceInterval":[8947,8957]},["opt",{"sourceInterval":[8947,8951]},["terminal",{"sourceInterval":[8947,8950]},"_"]],["app",{"sourceInterval":[8952,8957]},"digit",[]]]]]],"integerLiteralDec_integerLiteralWithLeadingZero":["define",{"sourceInterval":[9012,9071]},null,[],["seq",{"sourceInterval":[9012,9022]},["terminal",{"sourceInterval":[9012,9015]},"0"],["star",{"sourceInterval":[9016,9022]},["app",{"sourceInterval":[9016,9021]},"digit",[]]]]],"integerLiteralDec":["define",{"sourceInterval":[8913,9071]},null,[],["alt",{"sourceInterval":[8933,9071]},["app",{"sourceInterval":[8933,8959]},"integerLiteralDec_nonZeroIntegerLiteralDec",[]],["app",{"sourceInterval":[9012,9022]},"integerLiteralDec_integerLiteralWithLeadingZero",[]]]],"integerLiteralHex":["define",{"sourceInterval":[9076,9135]},null,[],["seq",{"sourceInterval":[9096,9135]},["alt",{"sourceInterval":[9097,9108]},["terminal",{"sourceInterval":[9097,9101]},"0x"],["terminal",{"sourceInterval":[9104,9108]},"0X"]],["app",{"sourceInterval":[9110,9118]},"hexDigit",[]],["star",{"sourceInterval":[9119,9135]},["seq",{"sourceInterval":[9120,9133]},["opt",{"sourceInterval":[9120,9124]},["terminal",{"sourceInterval":[9120,9123]},"_"]],["app",{"sourceInterval":[9125,9133]},"hexDigit",[]]]]]],"integerLiteralBin":["define",{"sourceInterval":[9140,9199]},null,[],["seq",{"sourceInterval":[9160,9199]},["alt",{"sourceInterval":[9161,9172]},["terminal",{"sourceInterval":[9161,9165]},"0b"],["terminal",{"sourceInterval":[9168,9172]},"0B"]],["app",{"sourceInterval":[9174,9182]},"binDigit",[]],["star",{"sourceInterval":[9183,9199]},["seq",{"sourceInterval":[9184,9197]},["opt",{"sourceInterval":[9184,9188]},["terminal",{"sourceInterval":[9184,9187]},"_"]],["app",{"sourceInterval":[9189,9197]},"binDigit",[]]]]]],"integerLiteralOct":["define",{"sourceInterval":[9204,9263]},null,[],["seq",{"sourceInterval":[9224,9263]},["alt",{"sourceInterval":[9225,9236]},["terminal",{"sourceInterval":[9225,9229]},"0o"],["terminal",{"sourceInterval":[9232,9236]},"0O"]],["app",{"sourceInterval":[9238,9246]},"octDigit",[]],["star",{"sourceInterval":[9247,9263]},["seq",{"sourceInterval":[9248,9261]},["opt",{"sourceInterval":[9248,9252]},["terminal",{"sourceInterval":[9248,9251]},"_"]],["app",{"sourceInterval":[9253,9261]},"octDigit",[]]]]]],"binDigit":["define",{"sourceInterval":[9268,9288]},null,[],["alt",{"sourceInterval":[9279,9288]},["terminal",{"sourceInterval":[9279,9282]},"0"],["terminal",{"sourceInterval":[9285,9288]},"1"]]],"octDigit":["define",{"sourceInterval":[9293,9312]},null,[],["range",{"sourceInterval":[9304,9312]},"0","7"]],"nonZeroDigit":["define",{"sourceInterval":[9317,9340]},null,[],["range",{"sourceInterval":[9332,9340]},"1","9"]],"letterAsciiLC":["define",{"sourceInterval":[9361,9385]},null,[],["range",{"sourceInterval":[9377,9385]},"a","z"]],"letterAsciiUC":["define",{"sourceInterval":[9390,9414]},null,[],["range",{"sourceInterval":[9406,9414]},"A","Z"]],"letterAscii":["define",{"sourceInterval":[9419,9462]},null,[],["alt",{"sourceInterval":[9433,9462]},["app",{"sourceInterval":[9433,9446]},"letterAsciiLC",[]],["app",{"sourceInterval":[9449,9462]},"letterAsciiUC",[]]]],"letterComment":["define",{"sourceInterval":[9467,9526]},null,[],["alt",{"sourceInterval":[9483,9526]},["app",{"sourceInterval":[9483,9496]},"letterAsciiLC",[]],["app",{"sourceInterval":[9499,9512]},"letterAsciiUC",[]],["app",{"sourceInterval":[9515,9520]},"digit",[]],["terminal",{"sourceInterval":[9523,9526]},"_"]]],"idStart":["define",{"sourceInterval":[9550,9577]},null,[],["alt",{"sourceInterval":[9560,9577]},["app",{"sourceInterval":[9560,9571]},"letterAscii",[]],["terminal",{"sourceInterval":[9574,9577]},"_"]]],"idPart":["define",{"sourceInterval":[9582,9616]},null,[],["alt",{"sourceInterval":[9591,9616]},["app",{"sourceInterval":[9591,9602]},"letterAscii",[]],["app",{"sourceInterval":[9605,9610]},"digit",[]],["terminal",{"sourceInterval":[9613,9616]},"_"]]],"id":["define",{"sourceInterval":[9621,9659]},null,[],["seq",{"sourceInterval":[9626,9659]},["not",{"sourceInterval":[9626,9639]},["app",{"sourceInterval":[9627,9639]},"reservedWord",[]]],["lex",{"sourceInterval":[9640,9648]},["app",{"sourceInterval":[9641,9648]},"idStart",[]]],["lex",{"sourceInterval":[9649,9659]},["star",{"sourceInterval":[9651,9658]},["app",{"sourceInterval":[9651,9657]},"idPart",[]]]]]],"funcLetter":["define",{"sourceInterval":[9680,9741]},null,[],["alt",{"sourceInterval":[9693,9741]},["app",{"sourceInterval":[9693,9704]},"letterAscii",[]],["terminal",{"sourceInterval":[9707,9710]},"_"],["terminal",{"sourceInterval":[9713,9716]},"'"],["terminal",{"sourceInterval":[9719,9722]},"?"],["terminal",{"sourceInterval":[9725,9728]},"!"],["terminal",{"sourceInterval":[9731,9735]},"::"],["terminal",{"sourceInterval":[9738,9741]},"&"]]],"funcId":["define",{"sourceInterval":[9746,9788]},null,[],["seq",{"sourceInterval":[9755,9788]},["app",{"sourceInterval":[9755,9765]},"funcLetter",[]],["star",{"sourceInterval":[9766,9788]},["lex",{"sourceInterval":[9766,9787]},["alt",{"sourceInterval":[9768,9786]},["app",{"sourceInterval":[9768,9778]},"funcLetter",[]],["app",{"sourceInterval":[9781,9786]},"digit",[]]]]]]],"boolLiteral":["define",{"sourceInterval":[9814,9854]},null,[],["seq",{"sourceInterval":[9828,9854]},["alt",{"sourceInterval":[9829,9845]},["terminal",{"sourceInterval":[9829,9835]},"true"],["terminal",{"sourceInterval":[9838,9845]},"false"]],["not",{"sourceInterval":[9847,9854]},["app",{"sourceInterval":[9848,9854]},"idPart",[]]]]],"stringLiteral":["define",{"sourceInterval":[9882,9951]},null,[],["seq",{"sourceInterval":[9898,9951]},["terminal",{"sourceInterval":[9898,9902]},"\""],["star",{"sourceInterval":[9903,9946]},["alt",{"sourceInterval":[9904,9944]},["app",{"sourceInterval":[9904,9927]},"nonQuoteOrBackslashChar",[]],["app",{"sourceInterval":[9930,9944]},"escapeSequence",[]]]],["terminal",{"sourceInterval":[9947,9951]},"\""]]],"nonQuoteOrBackslashChar":["define",{"sourceInterval":[9956,10000]},null,[],["seq",{"sourceInterval":[9982,10000]},["not",{"sourceInterval":[9982,9996]},["alt",{"sourceInterval":[9984,9995]},["terminal",{"sourceInterval":[9984,9988]},"\""],["terminal",{"sourceInterval":[9991,9995]},"\\"]]],["app",{"sourceInterval":[9997,10000]},"any",[]]]],"escapeSequence_backslash":["define",{"sourceInterval":[10022,10041]},null,[],["terminal",{"sourceInterval":[10022,10028]},"\\\\"]],"escapeSequence_doubleQuote":["define",{"sourceInterval":[10063,10084]},null,[],["terminal",{"sourceInterval":[10063,10069]},"\\\""]],"escapeSequence_newline":["define",{"sourceInterval":[10106,10122]},null,[],["terminal",{"sourceInterval":[10106,10111]},"\\n"]],"escapeSequence_carriageReturn":["define",{"sourceInterval":[10144,10167]},null,[],["terminal",{"sourceInterval":[10144,10149]},"\\r"]],"escapeSequence_tab":["define",{"sourceInterval":[10189,10201]},null,[],["terminal",{"sourceInterval":[10189,10194]},"\\t"]],"escapeSequence_verticalTab":["define",{"sourceInterval":[10223,10243]},null,[],["terminal",{"sourceInterval":[10223,10228]},"\\v"]],"escapeSequence_backspace":["define",{"sourceInterval":[10265,10283]},null,[],["terminal",{"sourceInterval":[10265,10270]},"\\b"]],"escapeSequence_formFeed":["define",{"sourceInterval":[10305,10322]},null,[],["terminal",{"sourceInterval":[10305,10310]},"\\f"]],"escapeSequence_unicodeCodePoint":["define",{"sourceInterval":[10344,10433]},null,[],["seq",{"sourceInterval":[10344,10413]},["terminal",{"sourceInterval":[10344,10350]},"\\u{"],["app",{"sourceInterval":[10351,10359]},"hexDigit",[]],["opt",{"sourceInterval":[10360,10369]},["app",{"sourceInterval":[10360,10368]},"hexDigit",[]]],["opt",{"sourceInterval":[10370,10379]},["app",{"sourceInterval":[10370,10378]},"hexDigit",[]]],["opt",{"sourceInterval":[10380,10389]},["app",{"sourceInterval":[10380,10388]},"hexDigit",[]]],["opt",{"sourceInterval":[10390,10399]},["app",{"sourceInterval":[10390,10398]},"hexDigit",[]]],["opt",{"sourceInterval":[10400,10409]},["app",{"sourceInterval":[10400,10408]},"hexDigit",[]]],["terminal",{"sourceInterval":[10410,10413]},"}"]]],"escapeSequence_unicodeEscape":["define",{"sourceInterval":[10455,10513]},null,[],["seq",{"sourceInterval":[10455,10496]},["terminal",{"sourceInterval":[10455,10460]},"\\u"],["app",{"sourceInterval":[10461,10469]},"hexDigit",[]],["app",{"sourceInterval":[10470,10478]},"hexDigit",[]],["app",{"sourceInterval":[10479,10487]},"hexDigit",[]],["app",{"sourceInterval":[10488,10496]},"hexDigit",[]]]],"escapeSequence_hexEscape":["define",{"sourceInterval":[10535,10571]},null,[],["seq",{"sourceInterval":[10535,10558]},["terminal",{"sourceInterval":[10535,10540]},"\\x"],["app",{"sourceInterval":[10541,10549]},"hexDigit",[]],["app",{"sourceInterval":[10550,10558]},"hexDigit",[]]]],"escapeSequence":["define",{"sourceInterval":[10005,10571]},null,[],["alt",{"sourceInterval":[10022,10571]},["app",{"sourceInterval":[10022,10028]},"escapeSequence_backslash",[]],["app",{"sourceInterval":[10063,10069]},"escapeSequence_doubleQuote",[]],["app",{"sourceInterval":[10106,10111]},"escapeSequence_newline",[]],["app",{"sourceInterval":[10144,10149]},"escapeSequence_carriageReturn",[]],["app",{"sourceInterval":[10189,10194]},"escapeSequence_tab",[]],["app",{"sourceInterval":[10223,10228]},"escapeSequence_verticalTab",[]],["app",{"sourceInterval":[10265,10270]},"escapeSequence_backspace",[]],["app",{"sourceInterval":[10305,10310]},"escapeSequence_formFeed",[]],["app",{"sourceInterval":[10344,10413]},"escapeSequence_unicodeCodePoint",[]],["app",{"sourceInterval":[10455,10496]},"escapeSequence_unicodeEscape",[]],["app",{"sourceInterval":[10535,10558]},"escapeSequence_hexEscape",[]]]],"keyword":["define",{"sourceInterval":[10624,11137]},null,[],["alt",{"sourceInterval":[10634,11137]},["app",{"sourceInterval":[10634,10637]},"fun",[]],["app",{"sourceInterval":[10653,10656]},"let",[]],["app",{"sourceInterval":[10671,10677]},"return",[]],["app",{"sourceInterval":[10693,10699]},"extend",[]],["app",{"sourceInterval":[10715,10721]},"native",[]],["app",{"sourceInterval":[10737,10743]},"public",[]],["app",{"sourceInterval":[10759,10763]},"null",[]],["app",{"sourceInterval":[10779,10781]},"if",[]],["app",{"sourceInterval":[10797,10801]},"else",[]],["app",{"sourceInterval":[10817,10822]},"while",[]],["app",{"sourceInterval":[10838,10844]},"repeat",[]],["app",{"sourceInterval":[10860,10862]},"do",[]],["app",{"sourceInterval":[10878,10883]},"until",[]],["app",{"sourceInterval":[10899,10901]},"as",[]],["app",{"sourceInterval":[10918,10925]},"mutates",[]],["app",{"sourceInterval":[10940,10947]},"extends",[]],["app",{"sourceInterval":[10962,10968]},"import",[]],["app",{"sourceInterval":[10983,10987]},"with",[]],["app",{"sourceInterval":[11002,11007]},"trait",[]],["app",{"sourceInterval":[11022,11028]},"initOf",[]],["app",{"sourceInterval":[11043,11051]},"override",[]],["app",{"sourceInterval":[11066,11074]},"abstract",[]],["app",{"sourceInterval":[11089,11096]},"virtual",[]],["app",{"sourceInterval":[11111,11117]},"inline",[]],["app",{"sourceInterval":[11132,11137]},"const",[]]]],"contract":["define",{"sourceInterval":[11142,11171]},null,[],["seq",{"sourceInterval":[11153,11171]},["terminal",{"sourceInterval":[11153,11163]},"contract"],["not",{"sourceInterval":[11164,11171]},["app",{"sourceInterval":[11165,11171]},"idPart",[]]]]],"let":["define",{"sourceInterval":[11176,11195]},null,[],["seq",{"sourceInterval":[11182,11195]},["terminal",{"sourceInterval":[11182,11187]},"let"],["not",{"sourceInterval":[11188,11195]},["app",{"sourceInterval":[11189,11195]},"idPart",[]]]]],"fun":["define",{"sourceInterval":[11200,11219]},null,[],["seq",{"sourceInterval":[11206,11219]},["terminal",{"sourceInterval":[11206,11211]},"fun"],["not",{"sourceInterval":[11212,11219]},["app",{"sourceInterval":[11213,11219]},"idPart",[]]]]],"return":["define",{"sourceInterval":[11224,11249]},null,[],["seq",{"sourceInterval":[11233,11249]},["terminal",{"sourceInterval":[11233,11241]},"return"],["not",{"sourceInterval":[11242,11249]},["app",{"sourceInterval":[11243,11249]},"idPart",[]]]]],"extend":["define",{"sourceInterval":[11254,11279]},null,[],["seq",{"sourceInterval":[11263,11279]},["terminal",{"sourceInterval":[11263,11271]},"extend"],["not",{"sourceInterval":[11272,11279]},["app",{"sourceInterval":[11273,11279]},"idPart",[]]]]],"native":["define",{"sourceInterval":[11284,11309]},null,[],["seq",{"sourceInterval":[11293,11309]},["terminal",{"sourceInterval":[11293,11301]},"native"],["not",{"sourceInterval":[11302,11309]},["app",{"sourceInterval":[11303,11309]},"idPart",[]]]]],"public":["define",{"sourceInterval":[11314,11339]},null,[],["seq",{"sourceInterval":[11323,11339]},["terminal",{"sourceInterval":[11323,11331]},"public"],["not",{"sourceInterval":[11332,11339]},["app",{"sourceInterval":[11333,11339]},"idPart",[]]]]],"null":["define",{"sourceInterval":[11344,11365]},null,[],["seq",{"sourceInterval":[11351,11365]},["terminal",{"sourceInterval":[11351,11357]},"null"],["not",{"sourceInterval":[11358,11365]},["app",{"sourceInterval":[11359,11365]},"idPart",[]]]]],"if":["define",{"sourceInterval":[11370,11387]},null,[],["seq",{"sourceInterval":[11375,11387]},["terminal",{"sourceInterval":[11375,11379]},"if"],["not",{"sourceInterval":[11380,11387]},["app",{"sourceInterval":[11381,11387]},"idPart",[]]]]],"else":["define",{"sourceInterval":[11392,11413]},null,[],["seq",{"sourceInterval":[11399,11413]},["terminal",{"sourceInterval":[11399,11405]},"else"],["not",{"sourceInterval":[11406,11413]},["app",{"sourceInterval":[11407,11413]},"idPart",[]]]]],"while":["define",{"sourceInterval":[11418,11441]},null,[],["seq",{"sourceInterval":[11426,11441]},["terminal",{"sourceInterval":[11426,11433]},"while"],["not",{"sourceInterval":[11434,11441]},["app",{"sourceInterval":[11435,11441]},"idPart",[]]]]],"repeat":["define",{"sourceInterval":[11446,11471]},null,[],["seq",{"sourceInterval":[11455,11471]},["terminal",{"sourceInterval":[11455,11463]},"repeat"],["not",{"sourceInterval":[11464,11471]},["app",{"sourceInterval":[11465,11471]},"idPart",[]]]]],"do":["define",{"sourceInterval":[11476,11493]},null,[],["seq",{"sourceInterval":[11481,11493]},["terminal",{"sourceInterval":[11481,11485]},"do"],["not",{"sourceInterval":[11486,11493]},["app",{"sourceInterval":[11487,11493]},"idPart",[]]]]],"until":["define",{"sourceInterval":[11498,11521]},null,[],["seq",{"sourceInterval":[11506,11521]},["terminal",{"sourceInterval":[11506,11513]},"until"],["not",{"sourceInterval":[11514,11521]},["app",{"sourceInterval":[11515,11521]},"idPart",[]]]]],"as":["define",{"sourceInterval":[11526,11543]},null,[],["seq",{"sourceInterval":[11531,11543]},["terminal",{"sourceInterval":[11531,11535]},"as"],["not",{"sourceInterval":[11536,11543]},["app",{"sourceInterval":[11537,11543]},"idPart",[]]]]],"mutates":["define",{"sourceInterval":[11548,11575]},null,[],["seq",{"sourceInterval":[11558,11575]},["terminal",{"sourceInterval":[11558,11567]},"mutates"],["not",{"sourceInterval":[11568,11575]},["app",{"sourceInterval":[11569,11575]},"idPart",[]]]]],"extends":["define",{"sourceInterval":[11580,11607]},null,[],["seq",{"sourceInterval":[11590,11607]},["terminal",{"sourceInterval":[11590,11599]},"extends"],["not",{"sourceInterval":[11600,11607]},["app",{"sourceInterval":[11601,11607]},"idPart",[]]]]],"import":["define",{"sourceInterval":[11612,11637]},null,[],["seq",{"sourceInterval":[11621,11637]},["terminal",{"sourceInterval":[11621,11629]},"import"],["not",{"sourceInterval":[11630,11637]},["app",{"sourceInterval":[11631,11637]},"idPart",[]]]]],"with":["define",{"sourceInterval":[11642,11663]},null,[],["seq",{"sourceInterval":[11649,11663]},["terminal",{"sourceInterval":[11649,11655]},"with"],["not",{"sourceInterval":[11656,11663]},["app",{"sourceInterval":[11657,11663]},"idPart",[]]]]],"trait":["define",{"sourceInterval":[11668,11691]},null,[],["seq",{"sourceInterval":[11676,11691]},["terminal",{"sourceInterval":[11676,11683]},"trait"],["not",{"sourceInterval":[11684,11691]},["app",{"sourceInterval":[11685,11691]},"idPart",[]]]]],"initOf":["define",{"sourceInterval":[11696,11721]},null,[],["seq",{"sourceInterval":[11705,11721]},["terminal",{"sourceInterval":[11705,11713]},"initOf"],["not",{"sourceInterval":[11714,11721]},["app",{"sourceInterval":[11715,11721]},"idPart",[]]]]],"virtual":["define",{"sourceInterval":[11726,11753]},null,[],["seq",{"sourceInterval":[11736,11753]},["terminal",{"sourceInterval":[11736,11745]},"virtual"],["not",{"sourceInterval":[11746,11753]},["app",{"sourceInterval":[11747,11753]},"idPart",[]]]]],"override":["define",{"sourceInterval":[11758,11787]},null,[],["seq",{"sourceInterval":[11769,11787]},["terminal",{"sourceInterval":[11769,11779]},"override"],["not",{"sourceInterval":[11780,11787]},["app",{"sourceInterval":[11781,11787]},"idPart",[]]]]],"inline":["define",{"sourceInterval":[11792,11817]},null,[],["seq",{"sourceInterval":[11801,11817]},["terminal",{"sourceInterval":[11801,11809]},"inline"],["not",{"sourceInterval":[11810,11817]},["app",{"sourceInterval":[11811,11817]},"idPart",[]]]]],"const":["define",{"sourceInterval":[11822,11845]},null,[],["seq",{"sourceInterval":[11830,11845]},["terminal",{"sourceInterval":[11830,11837]},"const"],["not",{"sourceInterval":[11838,11845]},["app",{"sourceInterval":[11839,11845]},"idPart",[]]]]],"abstract":["define",{"sourceInterval":[11850,11879]},null,[],["seq",{"sourceInterval":[11861,11879]},["terminal",{"sourceInterval":[11861,11871]},"abstract"],["not",{"sourceInterval":[11872,11879]},["app",{"sourceInterval":[11873,11879]},"idPart",[]]]]],"nameAttribute":["define",{"sourceInterval":[11903,11926]},null,[],["terminal",{"sourceInterval":[11919,11926]},"@name"]],"reservedWord":["define",{"sourceInterval":[11948,11970]},null,[],["app",{"sourceInterval":[11963,11970]},"keyword",[]]],"space":["extend",{"sourceInterval":[11992,12025]},null,[],["alt",{"sourceInterval":[12001,12025]},["app",{"sourceInterval":[12001,12008]},"comment",[]],["app",{"sourceInterval":[12011,12025]},"lineTerminator",[]]]],"comment":["define",{"sourceInterval":[12030,12076]},null,[],["alt",{"sourceInterval":[12040,12076]},["app",{"sourceInterval":[12040,12056]},"multiLineComment",[]],["app",{"sourceInterval":[12059,12076]},"singleLineComment",[]]]],"lineTerminator":["define",{"sourceInterval":[12081,12131]},null,[],["alt",{"sourceInterval":[12098,12131]},["terminal",{"sourceInterval":[12098,12102]},"\n"],["terminal",{"sourceInterval":[12105,12109]},"\r"],["terminal",{"sourceInterval":[12112,12120]},"\u2028"],["terminal",{"sourceInterval":[12123,12131]},"\u2029"]]],"multiLineComment":["define",{"sourceInterval":[12136,12177]},null,[],["seq",{"sourceInterval":[12155,12177]},["terminal",{"sourceInterval":[12155,12159]},"/*"],["star",{"sourceInterval":[12160,12172]},["seq",{"sourceInterval":[12161,12170]},["not",{"sourceInterval":[12161,12166]},["terminal",{"sourceInterval":[12162,12166]},"*/"]],["app",{"sourceInterval":[12167,12170]},"any",[]]]],["terminal",{"sourceInterval":[12173,12177]},"*/"]]],"singleLineComment":["define",{"sourceInterval":[12182,12229]},null,[],["seq",{"sourceInterval":[12202,12229]},["terminal",{"sourceInterval":[12202,12206]},"//"],["star",{"sourceInterval":[12207,12229]},["seq",{"sourceInterval":[12208,12227]},["not",{"sourceInterval":[12208,12223]},["app",{"sourceInterval":[12209,12223]},"lineTerminator",[]]],["app",{"sourceInterval":[12224,12227]},"any",[]]]]]]}]);module.exports=result; \ No newline at end of file diff --git a/src/grammar/grammar.ts b/src/grammar/grammar.ts index c71650a1f..40ce407b5 100644 --- a/src/grammar/grammar.ts +++ b/src/grammar/grammar.ts @@ -1110,7 +1110,7 @@ semantics.addOperation("resolve_expression", { ExpressionBracket(_arg0, arg1, _arg2) { return arg1.resolve_expression(); }, - ExpressionUnarySuffix_notNull(arg0, _arg1) { + ExpressionUnboxNotNull(arg0, _arg1) { return createNode({ kind: "op_unary", op: "!!", diff --git a/src/grammar/test/case-33.tact b/src/grammar/test/case-33.tact new file mode 100644 index 000000000..886b43860 --- /dev/null +++ b/src/grammar/test/case-33.tact @@ -0,0 +1,3 @@ +fun testFunc(m: map): Int { + return m.asCell()!!.hash(); +} \ No newline at end of file