diff --git a/src/grammar/grammar.ohm b/src/grammar/grammar.ohm index ee7f81c77..d304fc06a 100644 --- a/src/grammar/grammar.ohm +++ b/src/grammar/grammar.ohm @@ -173,10 +173,13 @@ Tact { // Integer Literal // hexDigit defined in Ohm's built-in rules (otherwise: hexDigit = "0".."9" | "a".."f" | "A".."F") // digit defined in Ohm's built-in rules (otherwise: digit = "0".."9") - integerLiteral = integerLiteralHex | integerLiteralDec // Order is important + integerLiteral = integerLiteralHex | integerLiteralBin | integerLiteralDec // Order is important integerLiteralDec = digit+ integerLiteralHex = "0x" hexDigit+ | "0X" hexDigit+ + integerLiteralBin = "0b" binDigit+ + | "0B" binDigit+ + binDigit = "0" | "1" // Letters letterAsciiLC = "a".."z" diff --git a/src/grammar/grammar.ohm-bundle.d.ts b/src/grammar/grammar.ohm-bundle.d.ts index 019ab38b5..8458c4351 100644 --- a/src/grammar/grammar.ohm-bundle.d.ts +++ b/src/grammar/grammar.ohm-bundle.d.ts @@ -137,6 +137,8 @@ export interface TactActionDict extends ActionDict { integerLiteral?: (this: NonterminalNode, arg0: NonterminalNode) => T; integerLiteralDec?: (this: NonterminalNode, arg0: IterationNode) => T; integerLiteralHex?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode) => T; + integerLiteralBin?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode) => T; + binDigit?: (this: NonterminalNode, arg0: TerminalNode) => T; letterAsciiLC?: (this: NonterminalNode, arg0: TerminalNode) => T; letterAsciiUC?: (this: NonterminalNode, arg0: TerminalNode) => T; letterAscii?: (this: NonterminalNode, arg0: NonterminalNode) => T; diff --git a/src/grammar/grammar.ohm-bundle.js b/src/grammar/grammar.ohm-bundle.js index 7d6b0ab94..be83f37c3 100644 --- a/src/grammar/grammar.ohm-bundle.js +++ b/src/grammar/grammar.ohm-bundle.js @@ -1 +1 @@ -'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 ListOf \"{\" 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 ListOf \"{\" 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 | 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 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 = 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 | integerLiteralDec // Order is important\n integerLiteralDec = digit+\n integerLiteralHex = \"0x\" hexDigit+\n | \"0X\" hexDigit+\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 stringLiteralCharacter = ~(\"\\\"\" | \"\\\\\" | lineTerminator) any\n stringLiteral = \"\\\"\" stringLiteralCharacter* \"\\\"\"\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,592]},null,[],["seq",{"sourceInterval":[488,581]},["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]},","]]],["terminal",{"sourceInterval":[574,577]},")"],["terminal",{"sourceInterval":[578,581]},";"]]],"NativeFunction_withType":["define",{"sourceInterval":[614,727]},null,[],["seq",{"sourceInterval":[614,716]},["app",{"sourceInterval":[614,627]},"nameAttribute",[]],["terminal",{"sourceInterval":[628,631]},"("],["app",{"sourceInterval":[632,638]},"funcId",[]],["terminal",{"sourceInterval":[639,642]},")"],["star",{"sourceInterval":[643,661]},["app",{"sourceInterval":[643,660]},"FunctionAttribute",[]]],["app",{"sourceInterval":[662,668]},"native",[]],["app",{"sourceInterval":[669,671]},"id",[]],["terminal",{"sourceInterval":[672,675]},"("],["app",{"sourceInterval":[676,699]},"ListOf",[["app",{"sourceInterval":[683,694]},"FunctionArg",[]],["terminal",{"sourceInterval":[695,698]},","]]],["terminal",{"sourceInterval":[700,703]},")"],["terminal",{"sourceInterval":[704,707]},":"],["app",{"sourceInterval":[708,712]},"Type",[]],["terminal",{"sourceInterval":[713,716]},";"]]],"NativeFunction":["define",{"sourceInterval":[471,727]},null,[],["alt",{"sourceInterval":[488,727]},["app",{"sourceInterval":[488,581]},"NativeFunction_withVoid",[]],["app",{"sourceInterval":[614,716]},"NativeFunction_withType",[]]]],"Type_optional":["define",{"sourceInterval":[770,796]},null,[],["seq",{"sourceInterval":[770,785]},["app",{"sourceInterval":[770,781]},"typeLiteral",[]],["terminal",{"sourceInterval":[782,785]},"?"]]],"Type_required":["define",{"sourceInterval":[808,830]},null,[],["app",{"sourceInterval":[808,819]},"typeLiteral",[]]],"Type_map":["define",{"sourceInterval":[842,907]},null,[],["seq",{"sourceInterval":[842,901]},["terminal",{"sourceInterval":[842,847]},"map"],["terminal",{"sourceInterval":[848,851]},"<"],["app",{"sourceInterval":[852,863]},"typeLiteral",[]],["opt",{"sourceInterval":[864,872]},["seq",{"sourceInterval":[865,870]},["app",{"sourceInterval":[865,867]},"as",[]],["app",{"sourceInterval":[868,870]},"id",[]]]],["terminal",{"sourceInterval":[873,876]},","],["app",{"sourceInterval":[877,888]},"typeLiteral",[]],["opt",{"sourceInterval":[889,897]},["seq",{"sourceInterval":[890,895]},["app",{"sourceInterval":[890,892]},"as",[]],["app",{"sourceInterval":[893,895]},"id",[]]]],["terminal",{"sourceInterval":[898,901]},">"]]],"Type_bounced":["define",{"sourceInterval":[919,958]},null,[],["seq",{"sourceInterval":[919,948]},["terminal",{"sourceInterval":[919,928]},"bounced"],["terminal",{"sourceInterval":[929,932]},"<"],["app",{"sourceInterval":[933,944]},"typeLiteral",[]],["terminal",{"sourceInterval":[945,948]},">"]]],"Type":["define",{"sourceInterval":[763,958]},null,[],["alt",{"sourceInterval":[770,958]},["app",{"sourceInterval":[770,785]},"Type_optional",[]],["app",{"sourceInterval":[808,819]},"Type_required",[]],["app",{"sourceInterval":[842,901]},"Type_map",[]],["app",{"sourceInterval":[919,948]},"Type_bounced",[]]]],"Field_default":["define",{"sourceInterval":[971,996]},null,[],["seq",{"sourceInterval":[971,986]},["app",{"sourceInterval":[971,973]},"id",[]],["terminal",{"sourceInterval":[974,977]},":"],["app",{"sourceInterval":[978,982]},"Type",[]],["terminal",{"sourceInterval":[983,986]},";"]]],"Field_defaultWithInit":["define",{"sourceInterval":[1009,1057]},null,[],["seq",{"sourceInterval":[1009,1039]},["app",{"sourceInterval":[1009,1011]},"id",[]],["terminal",{"sourceInterval":[1012,1015]},":"],["app",{"sourceInterval":[1016,1020]},"Type",[]],["terminal",{"sourceInterval":[1021,1024]},"="],["app",{"sourceInterval":[1025,1035]},"Expression",[]],["terminal",{"sourceInterval":[1036,1039]},";"]]],"Field_withSerialization":["define",{"sourceInterval":[1070,1111]},null,[],["seq",{"sourceInterval":[1070,1091]},["app",{"sourceInterval":[1070,1072]},"id",[]],["terminal",{"sourceInterval":[1073,1076]},":"],["app",{"sourceInterval":[1077,1081]},"Type",[]],["app",{"sourceInterval":[1082,1084]},"as",[]],["app",{"sourceInterval":[1085,1087]},"id",[]],["terminal",{"sourceInterval":[1088,1091]},";"]]],"Field_withSerializationAndInit":["define",{"sourceInterval":[1124,1187]},null,[],["seq",{"sourceInterval":[1124,1160]},["app",{"sourceInterval":[1124,1126]},"id",[]],["terminal",{"sourceInterval":[1127,1130]},":"],["app",{"sourceInterval":[1131,1135]},"Type",[]],["app",{"sourceInterval":[1136,1138]},"as",[]],["app",{"sourceInterval":[1139,1141]},"id",[]],["terminal",{"sourceInterval":[1142,1145]},"="],["app",{"sourceInterval":[1146,1156]},"Expression",[]],["terminal",{"sourceInterval":[1157,1160]},";"]]],"Field":["define",{"sourceInterval":[963,1187]},null,[],["alt",{"sourceInterval":[971,1187]},["app",{"sourceInterval":[971,986]},"Field_default",[]],["app",{"sourceInterval":[1009,1039]},"Field_defaultWithInit",[]],["app",{"sourceInterval":[1070,1091]},"Field_withSerialization",[]],["app",{"sourceInterval":[1124,1160]},"Field_withSerializationAndInit",[]]]],"ConstantAttribute_virtual":["define",{"sourceInterval":[1233,1253]},null,[],["app",{"sourceInterval":[1233,1240]},"virtual",[]]],"ConstantAttribute_override":["define",{"sourceInterval":[1278,1299]},null,[],["app",{"sourceInterval":[1278,1286]},"override",[]]],"ConstantAttribute_abstract":["define",{"sourceInterval":[1324,1345]},null,[],["app",{"sourceInterval":[1324,1332]},"abstract",[]]],"ConstantAttribute":["define",{"sourceInterval":[1213,1345]},null,[],["alt",{"sourceInterval":[1233,1345]},["app",{"sourceInterval":[1233,1240]},"ConstantAttribute_virtual",[]],["app",{"sourceInterval":[1278,1286]},"ConstantAttribute_override",[]],["app",{"sourceInterval":[1324,1332]},"ConstantAttribute_abstract",[]]]],"Constant_withValue":["define",{"sourceInterval":[1361,1433]},null,[],["seq",{"sourceInterval":[1361,1421]},["star",{"sourceInterval":[1361,1379]},["app",{"sourceInterval":[1361,1378]},"ConstantAttribute",[]]],["not",{"sourceInterval":[1380,1384]},["app",{"sourceInterval":[1381,1384]},"fun",[]]],["app",{"sourceInterval":[1385,1390]},"const",[]],["app",{"sourceInterval":[1391,1393]},"id",[]],["terminal",{"sourceInterval":[1394,1397]},":"],["app",{"sourceInterval":[1398,1402]},"Type",[]],["terminal",{"sourceInterval":[1403,1406]},"="],["app",{"sourceInterval":[1407,1417]},"Expression",[]],["terminal",{"sourceInterval":[1418,1421]},";"]]],"Constant_withEmpty":["define",{"sourceInterval":[1449,1521]},null,[],["seq",{"sourceInterval":[1449,1494]},["star",{"sourceInterval":[1449,1467]},["app",{"sourceInterval":[1449,1466]},"ConstantAttribute",[]]],["not",{"sourceInterval":[1468,1472]},["app",{"sourceInterval":[1469,1472]},"fun",[]]],["app",{"sourceInterval":[1473,1478]},"const",[]],["app",{"sourceInterval":[1479,1481]},"id",[]],["terminal",{"sourceInterval":[1482,1485]},":"],["app",{"sourceInterval":[1486,1490]},"Type",[]],["terminal",{"sourceInterval":[1491,1494]},";"]]],"Constant":["define",{"sourceInterval":[1350,1521]},null,[],["alt",{"sourceInterval":[1361,1521]},["app",{"sourceInterval":[1361,1421]},"Constant_withValue",[]],["app",{"sourceInterval":[1449,1494]},"Constant_withEmpty",[]]]],"Struct_originary":["define",{"sourceInterval":[1550,1602]},null,[],["seq",{"sourceInterval":[1550,1590]},["terminal",{"sourceInterval":[1550,1558]},"struct"],["app",{"sourceInterval":[1559,1570]},"typeLiteral",[]],["terminal",{"sourceInterval":[1571,1574]},"{"],["star",{"sourceInterval":[1575,1586]},["app",{"sourceInterval":[1575,1585]},"StructBody",[]]],["terminal",{"sourceInterval":[1587,1590]},"}"]]],"Struct_message":["define",{"sourceInterval":[1616,1667]},null,[],["seq",{"sourceInterval":[1616,1657]},["terminal",{"sourceInterval":[1616,1625]},"message"],["app",{"sourceInterval":[1626,1637]},"typeLiteral",[]],["terminal",{"sourceInterval":[1638,1641]},"{"],["star",{"sourceInterval":[1642,1653]},["app",{"sourceInterval":[1642,1652]},"StructBody",[]]],["terminal",{"sourceInterval":[1654,1657]},"}"]]],"Struct_messageWithId":["define",{"sourceInterval":[1681,1761]},null,[],["seq",{"sourceInterval":[1681,1745]},["terminal",{"sourceInterval":[1681,1690]},"message"],["terminal",{"sourceInterval":[1691,1694]},"("],["app",{"sourceInterval":[1695,1709]},"integerLiteral",[]],["terminal",{"sourceInterval":[1710,1713]},")"],["app",{"sourceInterval":[1714,1725]},"typeLiteral",[]],["terminal",{"sourceInterval":[1726,1729]},"{"],["star",{"sourceInterval":[1730,1741]},["app",{"sourceInterval":[1730,1740]},"StructBody",[]]],["terminal",{"sourceInterval":[1742,1745]},"}"]]],"Struct":["define",{"sourceInterval":[1541,1761]},null,[],["alt",{"sourceInterval":[1550,1761]},["app",{"sourceInterval":[1550,1590]},"Struct_originary",[]],["app",{"sourceInterval":[1616,1657]},"Struct_message",[]],["app",{"sourceInterval":[1681,1745]},"Struct_messageWithId",[]]]],"StructBody":["define",{"sourceInterval":[1766,1784]},null,[],["app",{"sourceInterval":[1779,1784]},"Field",[]]],"Contract_simple":["define",{"sourceInterval":[1817,1878]},null,[],["seq",{"sourceInterval":[1817,1869]},["star",{"sourceInterval":[1817,1835]},["app",{"sourceInterval":[1817,1834]},"ContractAttribute",[]]],["app",{"sourceInterval":[1836,1844]},"contract",[]],["app",{"sourceInterval":[1845,1847]},"id",[]],["terminal",{"sourceInterval":[1848,1851]},"{"],["star",{"sourceInterval":[1852,1865]},["app",{"sourceInterval":[1852,1864]},"ContractBody",[]]],["terminal",{"sourceInterval":[1866,1869]},"}"]]],"Contract_withTraits":["define",{"sourceInterval":[1894,1979]},null,[],["seq",{"sourceInterval":[1894,1966]},["star",{"sourceInterval":[1894,1912]},["app",{"sourceInterval":[1894,1911]},"ContractAttribute",[]]],["app",{"sourceInterval":[1913,1921]},"contract",[]],["app",{"sourceInterval":[1922,1924]},"id",[]],["app",{"sourceInterval":[1925,1929]},"with",[]],["app",{"sourceInterval":[1930,1944]},"ListOf",[["app",{"sourceInterval":[1937,1939]},"id",[]],["terminal",{"sourceInterval":[1940,1943]},","]]],["terminal",{"sourceInterval":[1945,1948]},"{"],["star",{"sourceInterval":[1949,1962]},["app",{"sourceInterval":[1949,1961]},"ContractBody",[]]],["terminal",{"sourceInterval":[1963,1966]},"}"]]],"Contract":["define",{"sourceInterval":[1806,1979]},null,[],["alt",{"sourceInterval":[1817,1979]},["app",{"sourceInterval":[1817,1869]},"Contract_simple",[]],["app",{"sourceInterval":[1894,1966]},"Contract_withTraits",[]]]],"ContractInit":["define",{"sourceInterval":[1984,2056]},null,[],["seq",{"sourceInterval":[1999,2056]},["terminal",{"sourceInterval":[1999,2005]},"init"],["terminal",{"sourceInterval":[2006,2009]},"("],["app",{"sourceInterval":[2010,2033]},"ListOf",[["app",{"sourceInterval":[2017,2028]},"FunctionArg",[]],["terminal",{"sourceInterval":[2029,2032]},","]]],["terminal",{"sourceInterval":[2034,2037]},")"],["terminal",{"sourceInterval":[2038,2041]},"{"],["star",{"sourceInterval":[2042,2052]},["app",{"sourceInterval":[2042,2051]},"Statement",[]]],["terminal",{"sourceInterval":[2053,2056]},"}"]]],"ContractBody":["define",{"sourceInterval":[2061,2204]},null,[],["alt",{"sourceInterval":[2076,2204]},["app",{"sourceInterval":[2076,2081]},"Field",[]],["app",{"sourceInterval":[2101,2113]},"ContractInit",[]],["app",{"sourceInterval":[2133,2148]},"ReceiveFunction",[]],["app",{"sourceInterval":[2168,2176]},"Function",[]],["app",{"sourceInterval":[2196,2204]},"Constant",[]]]],"Trait_originary":["define",{"sourceInterval":[2235,2293]},null,[],["seq",{"sourceInterval":[2235,2281]},["star",{"sourceInterval":[2235,2253]},["app",{"sourceInterval":[2235,2252]},"ContractAttribute",[]]],["app",{"sourceInterval":[2254,2259]},"trait",[]],["app",{"sourceInterval":[2260,2262]},"id",[]],["terminal",{"sourceInterval":[2263,2266]},"{"],["star",{"sourceInterval":[2267,2277]},["app",{"sourceInterval":[2267,2276]},"TraitBody",[]]],["terminal",{"sourceInterval":[2278,2281]},"}"]]],"Trait_withTraits":["define",{"sourceInterval":[2306,2385]},null,[],["seq",{"sourceInterval":[2306,2372]},["star",{"sourceInterval":[2306,2324]},["app",{"sourceInterval":[2306,2323]},"ContractAttribute",[]]],["app",{"sourceInterval":[2325,2330]},"trait",[]],["app",{"sourceInterval":[2331,2333]},"id",[]],["app",{"sourceInterval":[2334,2338]},"with",[]],["app",{"sourceInterval":[2339,2353]},"ListOf",[["app",{"sourceInterval":[2346,2348]},"id",[]],["terminal",{"sourceInterval":[2349,2352]},","]]],["terminal",{"sourceInterval":[2354,2357]},"{"],["star",{"sourceInterval":[2358,2368]},["app",{"sourceInterval":[2358,2367]},"TraitBody",[]]],["terminal",{"sourceInterval":[2369,2372]},"}"]]],"Trait":["define",{"sourceInterval":[2227,2385]},null,[],["alt",{"sourceInterval":[2235,2385]},["app",{"sourceInterval":[2235,2281]},"Trait_originary",[]],["app",{"sourceInterval":[2306,2372]},"Trait_withTraits",[]]]],"TraitBody":["define",{"sourceInterval":[2390,2489]},null,[],["alt",{"sourceInterval":[2402,2489]},["app",{"sourceInterval":[2402,2407]},"Field",[]],["app",{"sourceInterval":[2424,2439]},"ReceiveFunction",[]],["app",{"sourceInterval":[2456,2464]},"Function",[]],["app",{"sourceInterval":[2481,2489]},"Constant",[]]]],"ContractAttribute_interface":["define",{"sourceInterval":[2542,2588]},null,[],["seq",{"sourceInterval":[2542,2576]},["terminal",{"sourceInterval":[2542,2554]},"@interface"],["terminal",{"sourceInterval":[2555,2558]},"("],["app",{"sourceInterval":[2559,2572]},"stringLiteral",[]],["terminal",{"sourceInterval":[2573,2576]},")"]]],"ContractAttribute":["define",{"sourceInterval":[2522,2588]},null,[],["app",{"sourceInterval":[2542,2588]},"ContractAttribute_interface",[]]],"FunctionAttribute_getter":["define",{"sourceInterval":[2630,2648]},null,[],["terminal",{"sourceInterval":[2630,2635]},"get"]],"FunctionAttribute_mutates":["define",{"sourceInterval":[2673,2692]},null,[],["app",{"sourceInterval":[2673,2680]},"mutates",[]]],"FunctionAttribute_extends":["define",{"sourceInterval":[2717,2736]},null,[],["app",{"sourceInterval":[2717,2724]},"extends",[]]],"FunctionAttribute_virtual":["define",{"sourceInterval":[2761,2780]},null,[],["app",{"sourceInterval":[2761,2768]},"virtual",[]]],"FunctionAttribute_override":["define",{"sourceInterval":[2805,2825]},null,[],["app",{"sourceInterval":[2805,2813]},"override",[]]],"FunctionAttribute_inline":["define",{"sourceInterval":[2850,2868]},null,[],["app",{"sourceInterval":[2850,2856]},"inline",[]]],"FunctionAttribute_abstract":["define",{"sourceInterval":[2893,2913]},null,[],["app",{"sourceInterval":[2893,2901]},"abstract",[]]],"FunctionAttribute":["define",{"sourceInterval":[2610,2913]},null,[],["alt",{"sourceInterval":[2630,2913]},["app",{"sourceInterval":[2630,2635]},"FunctionAttribute_getter",[]],["app",{"sourceInterval":[2673,2680]},"FunctionAttribute_mutates",[]],["app",{"sourceInterval":[2717,2724]},"FunctionAttribute_extends",[]],["app",{"sourceInterval":[2761,2768]},"FunctionAttribute_virtual",[]],["app",{"sourceInterval":[2805,2813]},"FunctionAttribute_override",[]],["app",{"sourceInterval":[2850,2856]},"FunctionAttribute_inline",[]],["app",{"sourceInterval":[2893,2901]},"FunctionAttribute_abstract",[]]]],"Function_withVoid":["define",{"sourceInterval":[2929,3016]},null,[],["seq",{"sourceInterval":[2929,3005]},["star",{"sourceInterval":[2929,2947]},["app",{"sourceInterval":[2929,2946]},"FunctionAttribute",[]]],["app",{"sourceInterval":[2948,2951]},"fun",[]],["app",{"sourceInterval":[2952,2954]},"id",[]],["terminal",{"sourceInterval":[2955,2958]},"("],["app",{"sourceInterval":[2959,2982]},"ListOf",[["app",{"sourceInterval":[2966,2977]},"FunctionArg",[]],["terminal",{"sourceInterval":[2978,2981]},","]]],["terminal",{"sourceInterval":[2983,2986]},")"],["terminal",{"sourceInterval":[2987,2990]},"{"],["star",{"sourceInterval":[2991,3001]},["app",{"sourceInterval":[2991,3000]},"Statement",[]]],["terminal",{"sourceInterval":[3002,3005]},"}"]]],"Function_withType":["define",{"sourceInterval":[3032,3128]},null,[],["seq",{"sourceInterval":[3032,3117]},["star",{"sourceInterval":[3032,3050]},["app",{"sourceInterval":[3032,3049]},"FunctionAttribute",[]]],["app",{"sourceInterval":[3051,3054]},"fun",[]],["app",{"sourceInterval":[3055,3057]},"id",[]],["terminal",{"sourceInterval":[3058,3061]},"("],["app",{"sourceInterval":[3062,3085]},"ListOf",[["app",{"sourceInterval":[3069,3080]},"FunctionArg",[]],["terminal",{"sourceInterval":[3081,3084]},","]]],["terminal",{"sourceInterval":[3086,3089]},")"],["terminal",{"sourceInterval":[3090,3093]},":"],["app",{"sourceInterval":[3094,3098]},"Type",[]],["terminal",{"sourceInterval":[3099,3102]},"{"],["star",{"sourceInterval":[3103,3113]},["app",{"sourceInterval":[3103,3112]},"Statement",[]]],["terminal",{"sourceInterval":[3114,3117]},"}"]]],"Function_abstractVoid":["define",{"sourceInterval":[3144,3220]},null,[],["seq",{"sourceInterval":[3144,3205]},["star",{"sourceInterval":[3144,3162]},["app",{"sourceInterval":[3144,3161]},"FunctionAttribute",[]]],["app",{"sourceInterval":[3163,3166]},"fun",[]],["app",{"sourceInterval":[3167,3169]},"id",[]],["terminal",{"sourceInterval":[3170,3173]},"("],["app",{"sourceInterval":[3174,3197]},"ListOf",[["app",{"sourceInterval":[3181,3192]},"FunctionArg",[]],["terminal",{"sourceInterval":[3193,3196]},","]]],["terminal",{"sourceInterval":[3198,3201]},")"],["terminal",{"sourceInterval":[3202,3205]},";"]]],"Function_abstractType":["define",{"sourceInterval":[3236,3321]},null,[],["seq",{"sourceInterval":[3236,3306]},["star",{"sourceInterval":[3236,3254]},["app",{"sourceInterval":[3236,3253]},"FunctionAttribute",[]]],["app",{"sourceInterval":[3255,3258]},"fun",[]],["app",{"sourceInterval":[3259,3261]},"id",[]],["terminal",{"sourceInterval":[3262,3265]},"("],["app",{"sourceInterval":[3266,3289]},"ListOf",[["app",{"sourceInterval":[3273,3284]},"FunctionArg",[]],["terminal",{"sourceInterval":[3285,3288]},","]]],["terminal",{"sourceInterval":[3290,3293]},")"],["terminal",{"sourceInterval":[3294,3297]},":"],["app",{"sourceInterval":[3298,3302]},"Type",[]],["terminal",{"sourceInterval":[3303,3306]},";"]]],"Function":["define",{"sourceInterval":[2918,3321]},null,[],["alt",{"sourceInterval":[2929,3321]},["app",{"sourceInterval":[2929,3005]},"Function_withVoid",[]],["app",{"sourceInterval":[3032,3117]},"Function_withType",[]],["app",{"sourceInterval":[3144,3205]},"Function_abstractVoid",[]],["app",{"sourceInterval":[3236,3306]},"Function_abstractType",[]]]],"FunctionArg":["define",{"sourceInterval":[3326,3351]},null,[],["seq",{"sourceInterval":[3340,3351]},["app",{"sourceInterval":[3340,3342]},"id",[]],["terminal",{"sourceInterval":[3343,3346]},":"],["app",{"sourceInterval":[3347,3351]},"Type",[]]]],"ReceiveFunction_simple":["define",{"sourceInterval":[3379,3436]},null,[],["seq",{"sourceInterval":[3379,3427]},["terminal",{"sourceInterval":[3379,3388]},"receive"],["terminal",{"sourceInterval":[3389,3392]},"("],["app",{"sourceInterval":[3393,3404]},"FunctionArg",[]],["terminal",{"sourceInterval":[3405,3408]},")"],["terminal",{"sourceInterval":[3409,3412]},"{"],["star",{"sourceInterval":[3413,3423]},["app",{"sourceInterval":[3413,3422]},"Statement",[]]],["terminal",{"sourceInterval":[3424,3427]},"}"]]],"ReceiveFunction_empty":["define",{"sourceInterval":[3459,3503]},null,[],["seq",{"sourceInterval":[3459,3495]},["terminal",{"sourceInterval":[3459,3468]},"receive"],["terminal",{"sourceInterval":[3469,3472]},"("],["terminal",{"sourceInterval":[3473,3476]},")"],["terminal",{"sourceInterval":[3477,3480]},"{"],["star",{"sourceInterval":[3481,3491]},["app",{"sourceInterval":[3481,3490]},"Statement",[]]],["terminal",{"sourceInterval":[3492,3495]},"}"]]],"ReceiveFunction_comment":["define",{"sourceInterval":[3526,3586]},null,[],["seq",{"sourceInterval":[3526,3576]},["terminal",{"sourceInterval":[3526,3535]},"receive"],["terminal",{"sourceInterval":[3536,3539]},"("],["app",{"sourceInterval":[3540,3553]},"stringLiteral",[]],["terminal",{"sourceInterval":[3554,3557]},")"],["terminal",{"sourceInterval":[3558,3561]},"{"],["star",{"sourceInterval":[3562,3572]},["app",{"sourceInterval":[3562,3571]},"Statement",[]]],["terminal",{"sourceInterval":[3573,3576]},"}"]]],"ReceiveFunction_bounced":["define",{"sourceInterval":[3609,3667]},null,[],["seq",{"sourceInterval":[3609,3657]},["terminal",{"sourceInterval":[3609,3618]},"bounced"],["terminal",{"sourceInterval":[3619,3622]},"("],["app",{"sourceInterval":[3623,3634]},"FunctionArg",[]],["terminal",{"sourceInterval":[3635,3638]},")"],["terminal",{"sourceInterval":[3639,3642]},"{"],["star",{"sourceInterval":[3643,3653]},["app",{"sourceInterval":[3643,3652]},"Statement",[]]],["terminal",{"sourceInterval":[3654,3657]},"}"]]],"ReceiveFunction_externalSimple":["define",{"sourceInterval":[3690,3756]},null,[],["seq",{"sourceInterval":[3690,3739]},["terminal",{"sourceInterval":[3690,3700]},"external"],["terminal",{"sourceInterval":[3701,3704]},"("],["app",{"sourceInterval":[3705,3716]},"FunctionArg",[]],["terminal",{"sourceInterval":[3717,3720]},")"],["terminal",{"sourceInterval":[3721,3724]},"{"],["star",{"sourceInterval":[3725,3735]},["app",{"sourceInterval":[3725,3734]},"Statement",[]]],["terminal",{"sourceInterval":[3736,3739]},"}"]]],"ReceiveFunction_externalComment":["define",{"sourceInterval":[3779,3848]},null,[],["seq",{"sourceInterval":[3779,3830]},["terminal",{"sourceInterval":[3779,3789]},"external"],["terminal",{"sourceInterval":[3790,3793]},"("],["app",{"sourceInterval":[3794,3807]},"stringLiteral",[]],["terminal",{"sourceInterval":[3808,3811]},")"],["terminal",{"sourceInterval":[3812,3815]},"{"],["star",{"sourceInterval":[3816,3826]},["app",{"sourceInterval":[3816,3825]},"Statement",[]]],["terminal",{"sourceInterval":[3827,3830]},"}"]]],"ReceiveFunction_externalEmpty":["define",{"sourceInterval":[3871,3924]},null,[],["seq",{"sourceInterval":[3871,3908]},["terminal",{"sourceInterval":[3871,3881]},"external"],["terminal",{"sourceInterval":[3882,3885]},"("],["terminal",{"sourceInterval":[3886,3889]},")"],["terminal",{"sourceInterval":[3890,3893]},"{"],["star",{"sourceInterval":[3894,3904]},["app",{"sourceInterval":[3894,3903]},"Statement",[]]],["terminal",{"sourceInterval":[3905,3908]},"}"]]],"ReceiveFunction":["define",{"sourceInterval":[3361,3924]},null,[],["alt",{"sourceInterval":[3379,3924]},["app",{"sourceInterval":[3379,3427]},"ReceiveFunction_simple",[]],["app",{"sourceInterval":[3459,3495]},"ReceiveFunction_empty",[]],["app",{"sourceInterval":[3526,3576]},"ReceiveFunction_comment",[]],["app",{"sourceInterval":[3609,3657]},"ReceiveFunction_bounced",[]],["app",{"sourceInterval":[3690,3739]},"ReceiveFunction_externalSimple",[]],["app",{"sourceInterval":[3779,3830]},"ReceiveFunction_externalComment",[]],["app",{"sourceInterval":[3871,3908]},"ReceiveFunction_externalEmpty",[]]]],"Statement":["define",{"sourceInterval":[3948,4232]},null,[],["alt",{"sourceInterval":[3960,4232]},["app",{"sourceInterval":[3960,3972]},"StatementLet",[]],["app",{"sourceInterval":[3989,4003]},"StatementBlock",[]],["app",{"sourceInterval":[4020,4035]},"StatementReturn",[]],["app",{"sourceInterval":[4052,4071]},"StatementExpression",[]],["app",{"sourceInterval":[4088,4103]},"StatementAssign",[]],["app",{"sourceInterval":[4120,4138]},"StatementCondition",[]],["app",{"sourceInterval":[4155,4169]},"StatementWhile",[]],["app",{"sourceInterval":[4186,4201]},"StatementRepeat",[]],["app",{"sourceInterval":[4218,4232]},"StatementUntil",[]]]],"StatementBlock":["define",{"sourceInterval":[4237,4272]},null,[],["seq",{"sourceInterval":[4254,4272]},["terminal",{"sourceInterval":[4254,4257]},"{"],["star",{"sourceInterval":[4258,4268]},["app",{"sourceInterval":[4258,4267]},"Statement",[]]],["terminal",{"sourceInterval":[4269,4272]},"}"]]],"StatementLet":["define",{"sourceInterval":[4277,4326]},null,[],["seq",{"sourceInterval":[4292,4326]},["app",{"sourceInterval":[4292,4295]},"let",[]],["app",{"sourceInterval":[4296,4298]},"id",[]],["terminal",{"sourceInterval":[4299,4302]},":"],["app",{"sourceInterval":[4303,4307]},"Type",[]],["terminal",{"sourceInterval":[4308,4311]},"="],["app",{"sourceInterval":[4312,4322]},"Expression",[]],["terminal",{"sourceInterval":[4323,4326]},";"]]],"StatementReturn_withExpression":["define",{"sourceInterval":[4349,4387]},null,[],["seq",{"sourceInterval":[4349,4370]},["app",{"sourceInterval":[4349,4355]},"return",[]],["app",{"sourceInterval":[4356,4366]},"Expression",[]],["terminal",{"sourceInterval":[4367,4370]},";"]]],"StatementReturn_withoutExpression":["define",{"sourceInterval":[4410,4440]},null,[],["seq",{"sourceInterval":[4410,4420]},["app",{"sourceInterval":[4410,4416]},"return",[]],["terminal",{"sourceInterval":[4417,4420]},";"]]],"StatementReturn":["define",{"sourceInterval":[4331,4440]},null,[],["alt",{"sourceInterval":[4349,4440]},["app",{"sourceInterval":[4349,4370]},"StatementReturn_withExpression",[]],["app",{"sourceInterval":[4410,4420]},"StatementReturn_withoutExpression",[]]]],"StatementExpression":["define",{"sourceInterval":[4449,4485]},null,[],["seq",{"sourceInterval":[4471,4485]},["app",{"sourceInterval":[4471,4481]},"Expression",[]],["terminal",{"sourceInterval":[4482,4485]},";"]]],"StatementAssign":["define",{"sourceInterval":[4490,4533]},null,[],["seq",{"sourceInterval":[4508,4533]},["app",{"sourceInterval":[4508,4514]},"LValue",[]],["terminal",{"sourceInterval":[4515,4518]},"="],["app",{"sourceInterval":[4519,4529]},"Expression",[]],["terminal",{"sourceInterval":[4530,4533]},";"]]],"StatementCondition_simple":["define",{"sourceInterval":[4559,4606]},null,[],["seq",{"sourceInterval":[4559,4597]},["app",{"sourceInterval":[4559,4561]},"if",[]],["app",{"sourceInterval":[4562,4572]},"Expression",[]],["terminal",{"sourceInterval":[4573,4576]},"{"],["star",{"sourceInterval":[4577,4587]},["app",{"sourceInterval":[4577,4586]},"Statement",[]]],["terminal",{"sourceInterval":[4588,4591]},"}"],["not",{"sourceInterval":[4592,4597]},["app",{"sourceInterval":[4593,4597]},"else",[]]]]],"StatementCondition_withElse":["define",{"sourceInterval":[4632,4699]},null,[],["seq",{"sourceInterval":[4632,4688]},["app",{"sourceInterval":[4632,4634]},"if",[]],["app",{"sourceInterval":[4635,4645]},"Expression",[]],["terminal",{"sourceInterval":[4646,4649]},"{"],["star",{"sourceInterval":[4650,4660]},["app",{"sourceInterval":[4650,4659]},"Statement",[]]],["terminal",{"sourceInterval":[4661,4664]},"}"],["app",{"sourceInterval":[4665,4669]},"else",[]],["terminal",{"sourceInterval":[4670,4673]},"{"],["star",{"sourceInterval":[4674,4684]},["app",{"sourceInterval":[4674,4683]},"Statement",[]]],["terminal",{"sourceInterval":[4685,4688]},"}"]]],"StatementCondition_withElseIf":["define",{"sourceInterval":[4725,4794]},null,[],["seq",{"sourceInterval":[4725,4781]},["app",{"sourceInterval":[4725,4727]},"if",[]],["app",{"sourceInterval":[4728,4738]},"Expression",[]],["terminal",{"sourceInterval":[4739,4742]},"{"],["star",{"sourceInterval":[4743,4753]},["app",{"sourceInterval":[4743,4752]},"Statement",[]]],["terminal",{"sourceInterval":[4754,4757]},"}"],["app",{"sourceInterval":[4758,4762]},"else",[]],["app",{"sourceInterval":[4763,4781]},"StatementCondition",[]]]],"StatementCondition":["define",{"sourceInterval":[4538,4794]},null,[],["alt",{"sourceInterval":[4559,4794]},["app",{"sourceInterval":[4559,4597]},"StatementCondition_simple",[]],["app",{"sourceInterval":[4632,4688]},"StatementCondition_withElse",[]],["app",{"sourceInterval":[4725,4781]},"StatementCondition_withElseIf",[]]]],"StatementWhile":["define",{"sourceInterval":[4799,4859]},null,[],["seq",{"sourceInterval":[4816,4859]},["app",{"sourceInterval":[4816,4821]},"while",[]],["terminal",{"sourceInterval":[4822,4825]},"("],["app",{"sourceInterval":[4826,4836]},"Expression",[]],["terminal",{"sourceInterval":[4837,4840]},")"],["terminal",{"sourceInterval":[4841,4844]},"{"],["star",{"sourceInterval":[4845,4855]},["app",{"sourceInterval":[4845,4854]},"Statement",[]]],["terminal",{"sourceInterval":[4856,4859]},"}"]]],"StatementRepeat":["define",{"sourceInterval":[4864,4926]},null,[],["seq",{"sourceInterval":[4882,4926]},["app",{"sourceInterval":[4882,4888]},"repeat",[]],["terminal",{"sourceInterval":[4889,4892]},"("],["app",{"sourceInterval":[4893,4903]},"Expression",[]],["terminal",{"sourceInterval":[4904,4907]},")"],["terminal",{"sourceInterval":[4908,4911]},"{"],["star",{"sourceInterval":[4912,4922]},["app",{"sourceInterval":[4912,4921]},"Statement",[]]],["terminal",{"sourceInterval":[4923,4926]},"}"]]],"StatementUntil":["define",{"sourceInterval":[4931,4998]},null,[],["seq",{"sourceInterval":[4948,4998]},["app",{"sourceInterval":[4948,4950]},"do",[]],["terminal",{"sourceInterval":[4951,4954]},"{"],["star",{"sourceInterval":[4955,4965]},["app",{"sourceInterval":[4955,4964]},"Statement",[]]],["terminal",{"sourceInterval":[4966,4969]},"}"],["app",{"sourceInterval":[4970,4975]},"until",[]],["terminal",{"sourceInterval":[4976,4979]},"("],["app",{"sourceInterval":[4980,4990]},"Expression",[]],["terminal",{"sourceInterval":[4991,4994]},")"],["terminal",{"sourceInterval":[4995,4998]},";"]]],"LValue_more":["define",{"sourceInterval":[5028,5048]},null,[],["seq",{"sourceInterval":[5028,5041]},["app",{"sourceInterval":[5028,5030]},"id",[]],["terminal",{"sourceInterval":[5031,5034]},"."],["app",{"sourceInterval":[5035,5041]},"LValue",[]]]],"LValue_single":["define",{"sourceInterval":[5062,5073]},null,[],["app",{"sourceInterval":[5062,5064]},"id",[]]],"LValue":["define",{"sourceInterval":[5019,5073]},null,[],["alt",{"sourceInterval":[5028,5073]},["app",{"sourceInterval":[5028,5041]},"LValue_more",[]],["app",{"sourceInterval":[5062,5064]},"LValue_single",[]]]],"Expression":["define",{"sourceInterval":[5098,5123]},null,[],["app",{"sourceInterval":[5111,5123]},"ExpressionOr",[]]],"ExpressionOr_or":["define",{"sourceInterval":[5143,5179]},null,[],["seq",{"sourceInterval":[5143,5174]},["app",{"sourceInterval":[5143,5155]},"ExpressionOr",[]],["terminal",{"sourceInterval":[5156,5160]},"||"],["app",{"sourceInterval":[5161,5174]},"ExpressionAnd",[]]]],"ExpressionOr":["define",{"sourceInterval":[5128,5212]},null,[],["alt",{"sourceInterval":[5143,5212]},["app",{"sourceInterval":[5143,5174]},"ExpressionOr_or",[]],["app",{"sourceInterval":[5199,5212]},"ExpressionAnd",[]]]],"ExpressionAnd_and":["define",{"sourceInterval":[5233,5275]},null,[],["seq",{"sourceInterval":[5233,5269]},["app",{"sourceInterval":[5233,5246]},"ExpressionAnd",[]],["terminal",{"sourceInterval":[5247,5251]},"&&"],["app",{"sourceInterval":[5252,5269]},"ExpressionCompare",[]]]],"ExpressionAnd":["define",{"sourceInterval":[5217,5313]},null,[],["alt",{"sourceInterval":[5233,5313]},["app",{"sourceInterval":[5233,5269]},"ExpressionAnd_and",[]],["app",{"sourceInterval":[5296,5313]},"ExpressionCompare",[]]]],"ExpressionCompare_not":["define",{"sourceInterval":[5338,5383]},null,[],["seq",{"sourceInterval":[5338,5377]},["app",{"sourceInterval":[5338,5355]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5356,5360]},"!="],["app",{"sourceInterval":[5361,5377]},"ExpressionBinary",[]]]],"ExpressionCompare_eq":["define",{"sourceInterval":[5408,5452]},null,[],["seq",{"sourceInterval":[5408,5447]},["app",{"sourceInterval":[5408,5425]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5426,5430]},"=="],["app",{"sourceInterval":[5431,5447]},"ExpressionBinary",[]]]],"ExpressionCompare_gt":["define",{"sourceInterval":[5477,5520]},null,[],["seq",{"sourceInterval":[5477,5515]},["app",{"sourceInterval":[5477,5494]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5495,5498]},">"],["app",{"sourceInterval":[5499,5515]},"ExpressionBinary",[]]]],"ExpressionCompare_gte":["define",{"sourceInterval":[5545,5590]},null,[],["seq",{"sourceInterval":[5545,5584]},["app",{"sourceInterval":[5545,5562]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5563,5567]},">="],["app",{"sourceInterval":[5568,5584]},"ExpressionBinary",[]]]],"ExpressionCompare_lt":["define",{"sourceInterval":[5615,5658]},null,[],["seq",{"sourceInterval":[5615,5653]},["app",{"sourceInterval":[5615,5632]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5633,5636]},"<"],["app",{"sourceInterval":[5637,5653]},"ExpressionBinary",[]]]],"ExpressionCompare_lte":["define",{"sourceInterval":[5683,5728]},null,[],["seq",{"sourceInterval":[5683,5722]},["app",{"sourceInterval":[5683,5700]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5701,5705]},"<="],["app",{"sourceInterval":[5706,5722]},"ExpressionBinary",[]]]],"ExpressionCompare":["define",{"sourceInterval":[5318,5769]},null,[],["alt",{"sourceInterval":[5338,5769]},["app",{"sourceInterval":[5338,5377]},"ExpressionCompare_not",[]],["app",{"sourceInterval":[5408,5447]},"ExpressionCompare_eq",[]],["app",{"sourceInterval":[5477,5515]},"ExpressionCompare_gt",[]],["app",{"sourceInterval":[5545,5584]},"ExpressionCompare_gte",[]],["app",{"sourceInterval":[5615,5653]},"ExpressionCompare_lt",[]],["app",{"sourceInterval":[5683,5722]},"ExpressionCompare_lte",[]],["app",{"sourceInterval":[5753,5769]},"ExpressionBinary",[]]]],"ExpressionBinary_shr":["define",{"sourceInterval":[5793,5834]},null,[],["seq",{"sourceInterval":[5793,5828]},["app",{"sourceInterval":[5793,5809]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[5810,5814]},">>"],["app",{"sourceInterval":[5815,5828]},"ExpressionAdd",[]]]],"ExpressionBinary_shl":["define",{"sourceInterval":[5857,5898]},null,[],["seq",{"sourceInterval":[5857,5892]},["app",{"sourceInterval":[5857,5873]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[5874,5878]},"<<"],["app",{"sourceInterval":[5879,5892]},"ExpressionAdd",[]]]],"ExpressionBinary_bin_and":["define",{"sourceInterval":[5921,5965]},null,[],["seq",{"sourceInterval":[5921,5955]},["app",{"sourceInterval":[5921,5937]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[5938,5941]},"&"],["app",{"sourceInterval":[5942,5955]},"ExpressionAdd",[]]]],"ExpressionBinary_bin_or":["define",{"sourceInterval":[5988,6031]},null,[],["seq",{"sourceInterval":[5988,6022]},["app",{"sourceInterval":[5988,6004]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[6005,6008]},"|"],["app",{"sourceInterval":[6009,6022]},"ExpressionAdd",[]]]],"ExpressionBinary":["define",{"sourceInterval":[5774,6067]},null,[],["alt",{"sourceInterval":[5793,6067]},["app",{"sourceInterval":[5793,5828]},"ExpressionBinary_shr",[]],["app",{"sourceInterval":[5857,5892]},"ExpressionBinary_shl",[]],["app",{"sourceInterval":[5921,5955]},"ExpressionBinary_bin_and",[]],["app",{"sourceInterval":[5988,6022]},"ExpressionBinary_bin_or",[]],["app",{"sourceInterval":[6054,6067]},"ExpressionAdd",[]]]],"ExpressionAdd_add":["define",{"sourceInterval":[6088,6130]},null,[],["seq",{"sourceInterval":[6088,6124]},["app",{"sourceInterval":[6088,6101]},"ExpressionAdd",[]],["terminal",{"sourceInterval":[6102,6105]},"+"],["not",{"sourceInterval":[6106,6110]},["terminal",{"sourceInterval":[6107,6110]},"+"]],["app",{"sourceInterval":[6111,6124]},"ExpressionMul",[]]]],"ExpressionAdd_sub":["define",{"sourceInterval":[6151,6193]},null,[],["seq",{"sourceInterval":[6151,6187]},["app",{"sourceInterval":[6151,6164]},"ExpressionAdd",[]],["terminal",{"sourceInterval":[6165,6168]},"-"],["not",{"sourceInterval":[6169,6173]},["terminal",{"sourceInterval":[6170,6173]},"-"]],["app",{"sourceInterval":[6174,6187]},"ExpressionMul",[]]]],"ExpressionAdd":["define",{"sourceInterval":[6072,6227]},null,[],["alt",{"sourceInterval":[6088,6227]},["app",{"sourceInterval":[6088,6124]},"ExpressionAdd_add",[]],["app",{"sourceInterval":[6151,6187]},"ExpressionAdd_sub",[]],["app",{"sourceInterval":[6214,6227]},"ExpressionMul",[]]]],"ExpressionMul_mul":["define",{"sourceInterval":[6248,6287]},null,[],["seq",{"sourceInterval":[6248,6281]},["app",{"sourceInterval":[6248,6261]},"ExpressionMul",[]],["terminal",{"sourceInterval":[6262,6265]},"*"],["app",{"sourceInterval":[6266,6281]},"ExpressionUnary",[]]]],"ExpressionMul_div":["define",{"sourceInterval":[6308,6347]},null,[],["seq",{"sourceInterval":[6308,6341]},["app",{"sourceInterval":[6308,6321]},"ExpressionMul",[]],["terminal",{"sourceInterval":[6322,6325]},"/"],["app",{"sourceInterval":[6326,6341]},"ExpressionUnary",[]]]],"ExpressionMul_rem":["define",{"sourceInterval":[6368,6407]},null,[],["seq",{"sourceInterval":[6368,6401]},["app",{"sourceInterval":[6368,6381]},"ExpressionMul",[]],["terminal",{"sourceInterval":[6382,6385]},"%"],["app",{"sourceInterval":[6386,6401]},"ExpressionUnary",[]]]],"ExpressionMul":["define",{"sourceInterval":[6232,6443]},null,[],["alt",{"sourceInterval":[6248,6443]},["app",{"sourceInterval":[6248,6281]},"ExpressionMul_mul",[]],["app",{"sourceInterval":[6308,6341]},"ExpressionMul_div",[]],["app",{"sourceInterval":[6368,6401]},"ExpressionMul_rem",[]],["app",{"sourceInterval":[6428,6443]},"ExpressionUnary",[]]]],"ExpressionUnary_neg":["define",{"sourceInterval":[6466,6497]},null,[],["seq",{"sourceInterval":[6466,6491]},["terminal",{"sourceInterval":[6466,6469]},"-"],["app",{"sourceInterval":[6470,6491]},"ExpressionUnarySuffix",[]]]],"ExpressionUnary_add":["define",{"sourceInterval":[6520,6551]},null,[],["seq",{"sourceInterval":[6520,6545]},["terminal",{"sourceInterval":[6520,6523]},"+"],["app",{"sourceInterval":[6524,6545]},"ExpressionUnarySuffix",[]]]],"ExpressionUnary_not":["define",{"sourceInterval":[6574,6605]},null,[],["seq",{"sourceInterval":[6574,6599]},["terminal",{"sourceInterval":[6574,6577]},"!"],["app",{"sourceInterval":[6578,6599]},"ExpressionUnarySuffix",[]]]],"ExpressionUnary":["define",{"sourceInterval":[6448,6649]},null,[],["alt",{"sourceInterval":[6466,6649]},["app",{"sourceInterval":[6466,6491]},"ExpressionUnary_neg",[]],["app",{"sourceInterval":[6520,6545]},"ExpressionUnary_add",[]],["app",{"sourceInterval":[6574,6599]},"ExpressionUnary_not",[]],["app",{"sourceInterval":[6628,6649]},"ExpressionUnarySuffix",[]]]],"ExpressionUnarySuffix_notNull":["define",{"sourceInterval":[6678,6708]},null,[],["seq",{"sourceInterval":[6678,6698]},["app",{"sourceInterval":[6678,6693]},"ExpressionValue",[]],["terminal",{"sourceInterval":[6694,6698]},"!!"]]],"ExpressionUnarySuffix":["define",{"sourceInterval":[6654,6752]},null,[],["alt",{"sourceInterval":[6678,6752]},["app",{"sourceInterval":[6678,6698]},"ExpressionUnarySuffix_notNull",[]],["app",{"sourceInterval":[6737,6752]},"ExpressionValue",[]]]],"ExpressionBracket":["define",{"sourceInterval":[6757,6795]},null,[],["seq",{"sourceInterval":[6777,6795]},["terminal",{"sourceInterval":[6777,6780]},"("],["app",{"sourceInterval":[6781,6791]},"Expression",[]],["terminal",{"sourceInterval":[6792,6795]},")"]]],"ExpressionValue":["define",{"sourceInterval":[6827,7217]},null,[],["alt",{"sourceInterval":[6845,7217]},["app",{"sourceInterval":[6845,6859]},"ExpressionCall",[]],["app",{"sourceInterval":[6882,6897]},"ExpressionField",[]],["app",{"sourceInterval":[6920,6940]},"ExpressionStaticCall",[]],["app",{"sourceInterval":[6963,6980]},"ExpressionBracket",[]],["app",{"sourceInterval":[7003,7016]},"ExpressionNew",[]],["app",{"sourceInterval":[7039,7053]},"integerLiteral",[]],["app",{"sourceInterval":[7076,7087]},"boolLiteral",[]],["app",{"sourceInterval":[7110,7112]},"id",[]],["app",{"sourceInterval":[7135,7139]},"null",[]],["app",{"sourceInterval":[7162,7178]},"ExpressionInitOf",[]],["app",{"sourceInterval":[7201,7217]},"ExpressionString",[]]]],"ExpressionString":["define",{"sourceInterval":[7222,7254]},null,[],["app",{"sourceInterval":[7241,7254]},"stringLiteral",[]]],"ExpressionField":["define",{"sourceInterval":[7259,7304]},null,[],["seq",{"sourceInterval":[7277,7304]},["app",{"sourceInterval":[7277,7292]},"ExpressionValue",[]],["terminal",{"sourceInterval":[7293,7296]},"."],["app",{"sourceInterval":[7297,7299]},"id",[]],["not",{"sourceInterval":[7300,7304]},["terminal",{"sourceInterval":[7301,7304]},"("]]]],"ExpressionCall":["define",{"sourceInterval":[7309,7380]},null,[],["seq",{"sourceInterval":[7326,7380]},["app",{"sourceInterval":[7326,7341]},"ExpressionValue",[]],["terminal",{"sourceInterval":[7342,7345]},"."],["app",{"sourceInterval":[7346,7348]},"id",[]],["terminal",{"sourceInterval":[7349,7352]},"("],["app",{"sourceInterval":[7353,7376]},"ListOf",[["app",{"sourceInterval":[7360,7370]},"Expression",[]],["terminal",{"sourceInterval":[7372,7375]},","]]],["terminal",{"sourceInterval":[7377,7380]},")"]]],"ExpressionNew":["define",{"sourceInterval":[7385,7437]},null,[],["seq",{"sourceInterval":[7401,7437]},["app",{"sourceInterval":[7401,7403]},"id",[]],["terminal",{"sourceInterval":[7404,7407]},"{"],["app",{"sourceInterval":[7408,7433]},"ListOf",[["app",{"sourceInterval":[7415,7427]},"NewParameter",[]],["terminal",{"sourceInterval":[7429,7432]},","]]],["terminal",{"sourceInterval":[7434,7437]},"}"]]],"NewParameter":["define",{"sourceInterval":[7442,7474]},null,[],["seq",{"sourceInterval":[7457,7474]},["app",{"sourceInterval":[7457,7459]},"id",[]],["terminal",{"sourceInterval":[7460,7463]},":"],["app",{"sourceInterval":[7464,7474]},"Expression",[]]]],"ExpressionStaticCall":["define",{"sourceInterval":[7479,7536]},null,[],["seq",{"sourceInterval":[7502,7536]},["app",{"sourceInterval":[7502,7504]},"id",[]],["terminal",{"sourceInterval":[7505,7508]},"("],["app",{"sourceInterval":[7509,7532]},"ListOf",[["app",{"sourceInterval":[7516,7526]},"Expression",[]],["terminal",{"sourceInterval":[7528,7531]},","]]],["terminal",{"sourceInterval":[7533,7536]},")"]]],"ExpressionInitOf":["define",{"sourceInterval":[7541,7601]},null,[],["seq",{"sourceInterval":[7560,7601]},["app",{"sourceInterval":[7560,7566]},"initOf",[]],["app",{"sourceInterval":[7567,7569]},"id",[]],["terminal",{"sourceInterval":[7570,7573]},"("],["app",{"sourceInterval":[7574,7597]},"ListOf",[["app",{"sourceInterval":[7581,7591]},"Expression",[]],["terminal",{"sourceInterval":[7593,7596]},","]]],["terminal",{"sourceInterval":[7598,7601]},")"]]],"typeLiteral":["define",{"sourceInterval":[7627,7671]},null,[],["seq",{"sourceInterval":[7641,7671]},["app",{"sourceInterval":[7641,7654]},"letterAsciiUC",[]],["star",{"sourceInterval":[7655,7671]},["app",{"sourceInterval":[7655,7670]},"typeLiteralPart",[]]]]],"typeLiteralPart":["define",{"sourceInterval":[7676,7719]},null,[],["alt",{"sourceInterval":[7694,7719]},["app",{"sourceInterval":[7694,7705]},"letterAscii",[]],["app",{"sourceInterval":[7708,7713]},"digit",[]],["terminal",{"sourceInterval":[7716,7719]},"_"]]],"integerLiteral":["define",{"sourceInterval":[7926,7980]},null,[],["alt",{"sourceInterval":[7943,7980]},["app",{"sourceInterval":[7943,7960]},"integerLiteralHex",[]],["app",{"sourceInterval":[7963,7980]},"integerLiteralDec",[]]]],"integerLiteralDec":["define",{"sourceInterval":[8007,8033]},null,[],["plus",{"sourceInterval":[8027,8033]},["app",{"sourceInterval":[8027,8032]},"digit",[]]]],"integerLiteralHex":["define",{"sourceInterval":[8038,8111]},null,[],["alt",{"sourceInterval":[8058,8111]},["seq",{"sourceInterval":[8058,8072]},["terminal",{"sourceInterval":[8058,8062]},"0x"],["plus",{"sourceInterval":[8063,8072]},["app",{"sourceInterval":[8063,8071]},"hexDigit",[]]]],["seq",{"sourceInterval":[8097,8111]},["terminal",{"sourceInterval":[8097,8101]},"0X"],["plus",{"sourceInterval":[8102,8111]},["app",{"sourceInterval":[8102,8110]},"hexDigit",[]]]]]],"letterAsciiLC":["define",{"sourceInterval":[8132,8156]},null,[],["range",{"sourceInterval":[8148,8156]},"a","z"]],"letterAsciiUC":["define",{"sourceInterval":[8161,8185]},null,[],["range",{"sourceInterval":[8177,8185]},"A","Z"]],"letterAscii":["define",{"sourceInterval":[8190,8233]},null,[],["alt",{"sourceInterval":[8204,8233]},["app",{"sourceInterval":[8204,8217]},"letterAsciiLC",[]],["app",{"sourceInterval":[8220,8233]},"letterAsciiUC",[]]]],"letterComment":["define",{"sourceInterval":[8238,8297]},null,[],["alt",{"sourceInterval":[8254,8297]},["app",{"sourceInterval":[8254,8267]},"letterAsciiLC",[]],["app",{"sourceInterval":[8270,8283]},"letterAsciiUC",[]],["app",{"sourceInterval":[8286,8291]},"digit",[]],["terminal",{"sourceInterval":[8294,8297]},"_"]]],"idStart":["define",{"sourceInterval":[8321,8348]},null,[],["alt",{"sourceInterval":[8331,8348]},["app",{"sourceInterval":[8331,8342]},"letterAscii",[]],["terminal",{"sourceInterval":[8345,8348]},"_"]]],"idPart":["define",{"sourceInterval":[8353,8387]},null,[],["alt",{"sourceInterval":[8362,8387]},["app",{"sourceInterval":[8362,8373]},"letterAscii",[]],["app",{"sourceInterval":[8376,8381]},"digit",[]],["terminal",{"sourceInterval":[8384,8387]},"_"]]],"id":["define",{"sourceInterval":[8392,8430]},null,[],["seq",{"sourceInterval":[8397,8430]},["not",{"sourceInterval":[8397,8410]},["app",{"sourceInterval":[8398,8410]},"reservedWord",[]]],["lex",{"sourceInterval":[8411,8419]},["app",{"sourceInterval":[8412,8419]},"idStart",[]]],["lex",{"sourceInterval":[8420,8430]},["star",{"sourceInterval":[8422,8429]},["app",{"sourceInterval":[8422,8428]},"idPart",[]]]]]],"funcLetter":["define",{"sourceInterval":[8451,8512]},null,[],["alt",{"sourceInterval":[8464,8512]},["app",{"sourceInterval":[8464,8475]},"letterAscii",[]],["terminal",{"sourceInterval":[8478,8481]},"_"],["terminal",{"sourceInterval":[8484,8487]},"'"],["terminal",{"sourceInterval":[8490,8493]},"?"],["terminal",{"sourceInterval":[8496,8499]},"!"],["terminal",{"sourceInterval":[8502,8506]},"::"],["terminal",{"sourceInterval":[8509,8512]},"&"]]],"funcId":["define",{"sourceInterval":[8517,8559]},null,[],["seq",{"sourceInterval":[8526,8559]},["app",{"sourceInterval":[8526,8536]},"funcLetter",[]],["star",{"sourceInterval":[8537,8559]},["lex",{"sourceInterval":[8537,8558]},["alt",{"sourceInterval":[8539,8557]},["app",{"sourceInterval":[8539,8549]},"funcLetter",[]],["app",{"sourceInterval":[8552,8557]},"digit",[]]]]]]],"boolLiteral":["define",{"sourceInterval":[8585,8625]},null,[],["seq",{"sourceInterval":[8599,8625]},["alt",{"sourceInterval":[8600,8616]},["terminal",{"sourceInterval":[8600,8606]},"true"],["terminal",{"sourceInterval":[8609,8616]},"false"]],["not",{"sourceInterval":[8618,8625]},["app",{"sourceInterval":[8619,8625]},"idPart",[]]]]],"stringLiteralCharacter":["define",{"sourceInterval":[8653,8713]},null,[],["seq",{"sourceInterval":[8678,8713]},["not",{"sourceInterval":[8678,8709]},["alt",{"sourceInterval":[8680,8708]},["terminal",{"sourceInterval":[8680,8684]},"\""],["terminal",{"sourceInterval":[8687,8691]},"\\"],["app",{"sourceInterval":[8694,8708]},"lineTerminator",[]]]],["app",{"sourceInterval":[8710,8713]},"any",[]]]],"stringLiteral":["define",{"sourceInterval":[8718,8767]},null,[],["seq",{"sourceInterval":[8734,8767]},["terminal",{"sourceInterval":[8734,8738]},"\""],["star",{"sourceInterval":[8739,8762]},["app",{"sourceInterval":[8739,8761]},"stringLiteralCharacter",[]]],["terminal",{"sourceInterval":[8763,8767]},"\""]]],"keyword":["define",{"sourceInterval":[8820,9333]},null,[],["alt",{"sourceInterval":[8830,9333]},["app",{"sourceInterval":[8830,8833]},"fun",[]],["app",{"sourceInterval":[8849,8852]},"let",[]],["app",{"sourceInterval":[8867,8873]},"return",[]],["app",{"sourceInterval":[8889,8895]},"extend",[]],["app",{"sourceInterval":[8911,8917]},"native",[]],["app",{"sourceInterval":[8933,8939]},"public",[]],["app",{"sourceInterval":[8955,8959]},"null",[]],["app",{"sourceInterval":[8975,8977]},"if",[]],["app",{"sourceInterval":[8993,8997]},"else",[]],["app",{"sourceInterval":[9013,9018]},"while",[]],["app",{"sourceInterval":[9034,9040]},"repeat",[]],["app",{"sourceInterval":[9056,9058]},"do",[]],["app",{"sourceInterval":[9074,9079]},"until",[]],["app",{"sourceInterval":[9095,9097]},"as",[]],["app",{"sourceInterval":[9114,9121]},"mutates",[]],["app",{"sourceInterval":[9136,9143]},"extends",[]],["app",{"sourceInterval":[9158,9164]},"import",[]],["app",{"sourceInterval":[9179,9183]},"with",[]],["app",{"sourceInterval":[9198,9203]},"trait",[]],["app",{"sourceInterval":[9218,9224]},"initOf",[]],["app",{"sourceInterval":[9239,9247]},"override",[]],["app",{"sourceInterval":[9262,9270]},"abstract",[]],["app",{"sourceInterval":[9285,9292]},"virtual",[]],["app",{"sourceInterval":[9307,9313]},"inline",[]],["app",{"sourceInterval":[9328,9333]},"const",[]]]],"contract":["define",{"sourceInterval":[9338,9367]},null,[],["seq",{"sourceInterval":[9349,9367]},["terminal",{"sourceInterval":[9349,9359]},"contract"],["not",{"sourceInterval":[9360,9367]},["app",{"sourceInterval":[9361,9367]},"idPart",[]]]]],"let":["define",{"sourceInterval":[9372,9391]},null,[],["seq",{"sourceInterval":[9378,9391]},["terminal",{"sourceInterval":[9378,9383]},"let"],["not",{"sourceInterval":[9384,9391]},["app",{"sourceInterval":[9385,9391]},"idPart",[]]]]],"fun":["define",{"sourceInterval":[9396,9415]},null,[],["seq",{"sourceInterval":[9402,9415]},["terminal",{"sourceInterval":[9402,9407]},"fun"],["not",{"sourceInterval":[9408,9415]},["app",{"sourceInterval":[9409,9415]},"idPart",[]]]]],"return":["define",{"sourceInterval":[9420,9445]},null,[],["seq",{"sourceInterval":[9429,9445]},["terminal",{"sourceInterval":[9429,9437]},"return"],["not",{"sourceInterval":[9438,9445]},["app",{"sourceInterval":[9439,9445]},"idPart",[]]]]],"extend":["define",{"sourceInterval":[9450,9475]},null,[],["seq",{"sourceInterval":[9459,9475]},["terminal",{"sourceInterval":[9459,9467]},"extend"],["not",{"sourceInterval":[9468,9475]},["app",{"sourceInterval":[9469,9475]},"idPart",[]]]]],"native":["define",{"sourceInterval":[9480,9505]},null,[],["seq",{"sourceInterval":[9489,9505]},["terminal",{"sourceInterval":[9489,9497]},"native"],["not",{"sourceInterval":[9498,9505]},["app",{"sourceInterval":[9499,9505]},"idPart",[]]]]],"public":["define",{"sourceInterval":[9510,9535]},null,[],["seq",{"sourceInterval":[9519,9535]},["terminal",{"sourceInterval":[9519,9527]},"public"],["not",{"sourceInterval":[9528,9535]},["app",{"sourceInterval":[9529,9535]},"idPart",[]]]]],"null":["define",{"sourceInterval":[9540,9561]},null,[],["seq",{"sourceInterval":[9547,9561]},["terminal",{"sourceInterval":[9547,9553]},"null"],["not",{"sourceInterval":[9554,9561]},["app",{"sourceInterval":[9555,9561]},"idPart",[]]]]],"if":["define",{"sourceInterval":[9566,9583]},null,[],["seq",{"sourceInterval":[9571,9583]},["terminal",{"sourceInterval":[9571,9575]},"if"],["not",{"sourceInterval":[9576,9583]},["app",{"sourceInterval":[9577,9583]},"idPart",[]]]]],"else":["define",{"sourceInterval":[9588,9609]},null,[],["seq",{"sourceInterval":[9595,9609]},["terminal",{"sourceInterval":[9595,9601]},"else"],["not",{"sourceInterval":[9602,9609]},["app",{"sourceInterval":[9603,9609]},"idPart",[]]]]],"while":["define",{"sourceInterval":[9614,9637]},null,[],["seq",{"sourceInterval":[9622,9637]},["terminal",{"sourceInterval":[9622,9629]},"while"],["not",{"sourceInterval":[9630,9637]},["app",{"sourceInterval":[9631,9637]},"idPart",[]]]]],"repeat":["define",{"sourceInterval":[9642,9667]},null,[],["seq",{"sourceInterval":[9651,9667]},["terminal",{"sourceInterval":[9651,9659]},"repeat"],["not",{"sourceInterval":[9660,9667]},["app",{"sourceInterval":[9661,9667]},"idPart",[]]]]],"do":["define",{"sourceInterval":[9672,9689]},null,[],["seq",{"sourceInterval":[9677,9689]},["terminal",{"sourceInterval":[9677,9681]},"do"],["not",{"sourceInterval":[9682,9689]},["app",{"sourceInterval":[9683,9689]},"idPart",[]]]]],"until":["define",{"sourceInterval":[9694,9717]},null,[],["seq",{"sourceInterval":[9702,9717]},["terminal",{"sourceInterval":[9702,9709]},"until"],["not",{"sourceInterval":[9710,9717]},["app",{"sourceInterval":[9711,9717]},"idPart",[]]]]],"as":["define",{"sourceInterval":[9722,9739]},null,[],["seq",{"sourceInterval":[9727,9739]},["terminal",{"sourceInterval":[9727,9731]},"as"],["not",{"sourceInterval":[9732,9739]},["app",{"sourceInterval":[9733,9739]},"idPart",[]]]]],"mutates":["define",{"sourceInterval":[9744,9771]},null,[],["seq",{"sourceInterval":[9754,9771]},["terminal",{"sourceInterval":[9754,9763]},"mutates"],["not",{"sourceInterval":[9764,9771]},["app",{"sourceInterval":[9765,9771]},"idPart",[]]]]],"extends":["define",{"sourceInterval":[9776,9803]},null,[],["seq",{"sourceInterval":[9786,9803]},["terminal",{"sourceInterval":[9786,9795]},"extends"],["not",{"sourceInterval":[9796,9803]},["app",{"sourceInterval":[9797,9803]},"idPart",[]]]]],"import":["define",{"sourceInterval":[9808,9833]},null,[],["seq",{"sourceInterval":[9817,9833]},["terminal",{"sourceInterval":[9817,9825]},"import"],["not",{"sourceInterval":[9826,9833]},["app",{"sourceInterval":[9827,9833]},"idPart",[]]]]],"with":["define",{"sourceInterval":[9838,9859]},null,[],["seq",{"sourceInterval":[9845,9859]},["terminal",{"sourceInterval":[9845,9851]},"with"],["not",{"sourceInterval":[9852,9859]},["app",{"sourceInterval":[9853,9859]},"idPart",[]]]]],"trait":["define",{"sourceInterval":[9864,9887]},null,[],["seq",{"sourceInterval":[9872,9887]},["terminal",{"sourceInterval":[9872,9879]},"trait"],["not",{"sourceInterval":[9880,9887]},["app",{"sourceInterval":[9881,9887]},"idPart",[]]]]],"initOf":["define",{"sourceInterval":[9892,9917]},null,[],["seq",{"sourceInterval":[9901,9917]},["terminal",{"sourceInterval":[9901,9909]},"initOf"],["not",{"sourceInterval":[9910,9917]},["app",{"sourceInterval":[9911,9917]},"idPart",[]]]]],"virtual":["define",{"sourceInterval":[9922,9949]},null,[],["seq",{"sourceInterval":[9932,9949]},["terminal",{"sourceInterval":[9932,9941]},"virtual"],["not",{"sourceInterval":[9942,9949]},["app",{"sourceInterval":[9943,9949]},"idPart",[]]]]],"override":["define",{"sourceInterval":[9954,9983]},null,[],["seq",{"sourceInterval":[9965,9983]},["terminal",{"sourceInterval":[9965,9975]},"override"],["not",{"sourceInterval":[9976,9983]},["app",{"sourceInterval":[9977,9983]},"idPart",[]]]]],"inline":["define",{"sourceInterval":[9988,10013]},null,[],["seq",{"sourceInterval":[9997,10013]},["terminal",{"sourceInterval":[9997,10005]},"inline"],["not",{"sourceInterval":[10006,10013]},["app",{"sourceInterval":[10007,10013]},"idPart",[]]]]],"const":["define",{"sourceInterval":[10018,10041]},null,[],["seq",{"sourceInterval":[10026,10041]},["terminal",{"sourceInterval":[10026,10033]},"const"],["not",{"sourceInterval":[10034,10041]},["app",{"sourceInterval":[10035,10041]},"idPart",[]]]]],"abstract":["define",{"sourceInterval":[10046,10075]},null,[],["seq",{"sourceInterval":[10057,10075]},["terminal",{"sourceInterval":[10057,10067]},"abstract"],["not",{"sourceInterval":[10068,10075]},["app",{"sourceInterval":[10069,10075]},"idPart",[]]]]],"nameAttribute":["define",{"sourceInterval":[10099,10122]},null,[],["terminal",{"sourceInterval":[10115,10122]},"@name"]],"reservedWord":["define",{"sourceInterval":[10144,10166]},null,[],["app",{"sourceInterval":[10159,10166]},"keyword",[]]],"space":["extend",{"sourceInterval":[10188,10221]},null,[],["alt",{"sourceInterval":[10197,10221]},["app",{"sourceInterval":[10197,10204]},"comment",[]],["app",{"sourceInterval":[10207,10221]},"lineTerminator",[]]]],"comment":["define",{"sourceInterval":[10226,10272]},null,[],["alt",{"sourceInterval":[10236,10272]},["app",{"sourceInterval":[10236,10252]},"multiLineComment",[]],["app",{"sourceInterval":[10255,10272]},"singleLineComment",[]]]],"lineTerminator":["define",{"sourceInterval":[10277,10327]},null,[],["alt",{"sourceInterval":[10294,10327]},["terminal",{"sourceInterval":[10294,10298]},"\n"],["terminal",{"sourceInterval":[10301,10305]},"\r"],["terminal",{"sourceInterval":[10308,10316]},"\u2028"],["terminal",{"sourceInterval":[10319,10327]},"\u2029"]]],"multiLineComment":["define",{"sourceInterval":[10332,10373]},null,[],["seq",{"sourceInterval":[10351,10373]},["terminal",{"sourceInterval":[10351,10355]},"/*"],["star",{"sourceInterval":[10356,10368]},["seq",{"sourceInterval":[10357,10366]},["not",{"sourceInterval":[10357,10362]},["terminal",{"sourceInterval":[10358,10362]},"*/"]],["app",{"sourceInterval":[10363,10366]},"any",[]]]],["terminal",{"sourceInterval":[10369,10373]},"*/"]]],"singleLineComment":["define",{"sourceInterval":[10378,10425]},null,[],["seq",{"sourceInterval":[10398,10425]},["terminal",{"sourceInterval":[10398,10402]},"//"],["star",{"sourceInterval":[10403,10425]},["seq",{"sourceInterval":[10404,10423]},["not",{"sourceInterval":[10404,10419]},["app",{"sourceInterval":[10405,10419]},"lineTerminator",[]]],["app",{"sourceInterval":[10420,10423]},"any",[]]]]]]}]);module.exports=result; \ No newline at end of file +'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 ListOf \"{\" 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 ListOf \"{\" 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 | 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 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 = 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 | integerLiteralDec // Order is important\n integerLiteralDec = digit+\n integerLiteralHex = \"0x\" hexDigit+\n | \"0X\" hexDigit+\n integerLiteralBin = \"0b\" binDigit+\n | \"0B\" binDigit+\n binDigit = \"0\" | \"1\"\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 stringLiteralCharacter = ~(\"\\\"\" | \"\\\\\" | lineTerminator) any\n stringLiteral = \"\\\"\" stringLiteralCharacter* \"\\\"\"\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,592]},null,[],["seq",{"sourceInterval":[488,581]},["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]},","]]],["terminal",{"sourceInterval":[574,577]},")"],["terminal",{"sourceInterval":[578,581]},";"]]],"NativeFunction_withType":["define",{"sourceInterval":[614,727]},null,[],["seq",{"sourceInterval":[614,716]},["app",{"sourceInterval":[614,627]},"nameAttribute",[]],["terminal",{"sourceInterval":[628,631]},"("],["app",{"sourceInterval":[632,638]},"funcId",[]],["terminal",{"sourceInterval":[639,642]},")"],["star",{"sourceInterval":[643,661]},["app",{"sourceInterval":[643,660]},"FunctionAttribute",[]]],["app",{"sourceInterval":[662,668]},"native",[]],["app",{"sourceInterval":[669,671]},"id",[]],["terminal",{"sourceInterval":[672,675]},"("],["app",{"sourceInterval":[676,699]},"ListOf",[["app",{"sourceInterval":[683,694]},"FunctionArg",[]],["terminal",{"sourceInterval":[695,698]},","]]],["terminal",{"sourceInterval":[700,703]},")"],["terminal",{"sourceInterval":[704,707]},":"],["app",{"sourceInterval":[708,712]},"Type",[]],["terminal",{"sourceInterval":[713,716]},";"]]],"NativeFunction":["define",{"sourceInterval":[471,727]},null,[],["alt",{"sourceInterval":[488,727]},["app",{"sourceInterval":[488,581]},"NativeFunction_withVoid",[]],["app",{"sourceInterval":[614,716]},"NativeFunction_withType",[]]]],"Type_optional":["define",{"sourceInterval":[770,796]},null,[],["seq",{"sourceInterval":[770,785]},["app",{"sourceInterval":[770,781]},"typeLiteral",[]],["terminal",{"sourceInterval":[782,785]},"?"]]],"Type_required":["define",{"sourceInterval":[808,830]},null,[],["app",{"sourceInterval":[808,819]},"typeLiteral",[]]],"Type_map":["define",{"sourceInterval":[842,907]},null,[],["seq",{"sourceInterval":[842,901]},["terminal",{"sourceInterval":[842,847]},"map"],["terminal",{"sourceInterval":[848,851]},"<"],["app",{"sourceInterval":[852,863]},"typeLiteral",[]],["opt",{"sourceInterval":[864,872]},["seq",{"sourceInterval":[865,870]},["app",{"sourceInterval":[865,867]},"as",[]],["app",{"sourceInterval":[868,870]},"id",[]]]],["terminal",{"sourceInterval":[873,876]},","],["app",{"sourceInterval":[877,888]},"typeLiteral",[]],["opt",{"sourceInterval":[889,897]},["seq",{"sourceInterval":[890,895]},["app",{"sourceInterval":[890,892]},"as",[]],["app",{"sourceInterval":[893,895]},"id",[]]]],["terminal",{"sourceInterval":[898,901]},">"]]],"Type_bounced":["define",{"sourceInterval":[919,958]},null,[],["seq",{"sourceInterval":[919,948]},["terminal",{"sourceInterval":[919,928]},"bounced"],["terminal",{"sourceInterval":[929,932]},"<"],["app",{"sourceInterval":[933,944]},"typeLiteral",[]],["terminal",{"sourceInterval":[945,948]},">"]]],"Type":["define",{"sourceInterval":[763,958]},null,[],["alt",{"sourceInterval":[770,958]},["app",{"sourceInterval":[770,785]},"Type_optional",[]],["app",{"sourceInterval":[808,819]},"Type_required",[]],["app",{"sourceInterval":[842,901]},"Type_map",[]],["app",{"sourceInterval":[919,948]},"Type_bounced",[]]]],"Field_default":["define",{"sourceInterval":[971,996]},null,[],["seq",{"sourceInterval":[971,986]},["app",{"sourceInterval":[971,973]},"id",[]],["terminal",{"sourceInterval":[974,977]},":"],["app",{"sourceInterval":[978,982]},"Type",[]],["terminal",{"sourceInterval":[983,986]},";"]]],"Field_defaultWithInit":["define",{"sourceInterval":[1009,1057]},null,[],["seq",{"sourceInterval":[1009,1039]},["app",{"sourceInterval":[1009,1011]},"id",[]],["terminal",{"sourceInterval":[1012,1015]},":"],["app",{"sourceInterval":[1016,1020]},"Type",[]],["terminal",{"sourceInterval":[1021,1024]},"="],["app",{"sourceInterval":[1025,1035]},"Expression",[]],["terminal",{"sourceInterval":[1036,1039]},";"]]],"Field_withSerialization":["define",{"sourceInterval":[1070,1111]},null,[],["seq",{"sourceInterval":[1070,1091]},["app",{"sourceInterval":[1070,1072]},"id",[]],["terminal",{"sourceInterval":[1073,1076]},":"],["app",{"sourceInterval":[1077,1081]},"Type",[]],["app",{"sourceInterval":[1082,1084]},"as",[]],["app",{"sourceInterval":[1085,1087]},"id",[]],["terminal",{"sourceInterval":[1088,1091]},";"]]],"Field_withSerializationAndInit":["define",{"sourceInterval":[1124,1187]},null,[],["seq",{"sourceInterval":[1124,1160]},["app",{"sourceInterval":[1124,1126]},"id",[]],["terminal",{"sourceInterval":[1127,1130]},":"],["app",{"sourceInterval":[1131,1135]},"Type",[]],["app",{"sourceInterval":[1136,1138]},"as",[]],["app",{"sourceInterval":[1139,1141]},"id",[]],["terminal",{"sourceInterval":[1142,1145]},"="],["app",{"sourceInterval":[1146,1156]},"Expression",[]],["terminal",{"sourceInterval":[1157,1160]},";"]]],"Field":["define",{"sourceInterval":[963,1187]},null,[],["alt",{"sourceInterval":[971,1187]},["app",{"sourceInterval":[971,986]},"Field_default",[]],["app",{"sourceInterval":[1009,1039]},"Field_defaultWithInit",[]],["app",{"sourceInterval":[1070,1091]},"Field_withSerialization",[]],["app",{"sourceInterval":[1124,1160]},"Field_withSerializationAndInit",[]]]],"ConstantAttribute_virtual":["define",{"sourceInterval":[1233,1253]},null,[],["app",{"sourceInterval":[1233,1240]},"virtual",[]]],"ConstantAttribute_override":["define",{"sourceInterval":[1278,1299]},null,[],["app",{"sourceInterval":[1278,1286]},"override",[]]],"ConstantAttribute_abstract":["define",{"sourceInterval":[1324,1345]},null,[],["app",{"sourceInterval":[1324,1332]},"abstract",[]]],"ConstantAttribute":["define",{"sourceInterval":[1213,1345]},null,[],["alt",{"sourceInterval":[1233,1345]},["app",{"sourceInterval":[1233,1240]},"ConstantAttribute_virtual",[]],["app",{"sourceInterval":[1278,1286]},"ConstantAttribute_override",[]],["app",{"sourceInterval":[1324,1332]},"ConstantAttribute_abstract",[]]]],"Constant_withValue":["define",{"sourceInterval":[1361,1433]},null,[],["seq",{"sourceInterval":[1361,1421]},["star",{"sourceInterval":[1361,1379]},["app",{"sourceInterval":[1361,1378]},"ConstantAttribute",[]]],["not",{"sourceInterval":[1380,1384]},["app",{"sourceInterval":[1381,1384]},"fun",[]]],["app",{"sourceInterval":[1385,1390]},"const",[]],["app",{"sourceInterval":[1391,1393]},"id",[]],["terminal",{"sourceInterval":[1394,1397]},":"],["app",{"sourceInterval":[1398,1402]},"Type",[]],["terminal",{"sourceInterval":[1403,1406]},"="],["app",{"sourceInterval":[1407,1417]},"Expression",[]],["terminal",{"sourceInterval":[1418,1421]},";"]]],"Constant_withEmpty":["define",{"sourceInterval":[1449,1521]},null,[],["seq",{"sourceInterval":[1449,1494]},["star",{"sourceInterval":[1449,1467]},["app",{"sourceInterval":[1449,1466]},"ConstantAttribute",[]]],["not",{"sourceInterval":[1468,1472]},["app",{"sourceInterval":[1469,1472]},"fun",[]]],["app",{"sourceInterval":[1473,1478]},"const",[]],["app",{"sourceInterval":[1479,1481]},"id",[]],["terminal",{"sourceInterval":[1482,1485]},":"],["app",{"sourceInterval":[1486,1490]},"Type",[]],["terminal",{"sourceInterval":[1491,1494]},";"]]],"Constant":["define",{"sourceInterval":[1350,1521]},null,[],["alt",{"sourceInterval":[1361,1521]},["app",{"sourceInterval":[1361,1421]},"Constant_withValue",[]],["app",{"sourceInterval":[1449,1494]},"Constant_withEmpty",[]]]],"Struct_originary":["define",{"sourceInterval":[1550,1602]},null,[],["seq",{"sourceInterval":[1550,1590]},["terminal",{"sourceInterval":[1550,1558]},"struct"],["app",{"sourceInterval":[1559,1570]},"typeLiteral",[]],["terminal",{"sourceInterval":[1571,1574]},"{"],["star",{"sourceInterval":[1575,1586]},["app",{"sourceInterval":[1575,1585]},"StructBody",[]]],["terminal",{"sourceInterval":[1587,1590]},"}"]]],"Struct_message":["define",{"sourceInterval":[1616,1667]},null,[],["seq",{"sourceInterval":[1616,1657]},["terminal",{"sourceInterval":[1616,1625]},"message"],["app",{"sourceInterval":[1626,1637]},"typeLiteral",[]],["terminal",{"sourceInterval":[1638,1641]},"{"],["star",{"sourceInterval":[1642,1653]},["app",{"sourceInterval":[1642,1652]},"StructBody",[]]],["terminal",{"sourceInterval":[1654,1657]},"}"]]],"Struct_messageWithId":["define",{"sourceInterval":[1681,1761]},null,[],["seq",{"sourceInterval":[1681,1745]},["terminal",{"sourceInterval":[1681,1690]},"message"],["terminal",{"sourceInterval":[1691,1694]},"("],["app",{"sourceInterval":[1695,1709]},"integerLiteral",[]],["terminal",{"sourceInterval":[1710,1713]},")"],["app",{"sourceInterval":[1714,1725]},"typeLiteral",[]],["terminal",{"sourceInterval":[1726,1729]},"{"],["star",{"sourceInterval":[1730,1741]},["app",{"sourceInterval":[1730,1740]},"StructBody",[]]],["terminal",{"sourceInterval":[1742,1745]},"}"]]],"Struct":["define",{"sourceInterval":[1541,1761]},null,[],["alt",{"sourceInterval":[1550,1761]},["app",{"sourceInterval":[1550,1590]},"Struct_originary",[]],["app",{"sourceInterval":[1616,1657]},"Struct_message",[]],["app",{"sourceInterval":[1681,1745]},"Struct_messageWithId",[]]]],"StructBody":["define",{"sourceInterval":[1766,1784]},null,[],["app",{"sourceInterval":[1779,1784]},"Field",[]]],"Contract_simple":["define",{"sourceInterval":[1817,1878]},null,[],["seq",{"sourceInterval":[1817,1869]},["star",{"sourceInterval":[1817,1835]},["app",{"sourceInterval":[1817,1834]},"ContractAttribute",[]]],["app",{"sourceInterval":[1836,1844]},"contract",[]],["app",{"sourceInterval":[1845,1847]},"id",[]],["terminal",{"sourceInterval":[1848,1851]},"{"],["star",{"sourceInterval":[1852,1865]},["app",{"sourceInterval":[1852,1864]},"ContractBody",[]]],["terminal",{"sourceInterval":[1866,1869]},"}"]]],"Contract_withTraits":["define",{"sourceInterval":[1894,1979]},null,[],["seq",{"sourceInterval":[1894,1966]},["star",{"sourceInterval":[1894,1912]},["app",{"sourceInterval":[1894,1911]},"ContractAttribute",[]]],["app",{"sourceInterval":[1913,1921]},"contract",[]],["app",{"sourceInterval":[1922,1924]},"id",[]],["app",{"sourceInterval":[1925,1929]},"with",[]],["app",{"sourceInterval":[1930,1944]},"ListOf",[["app",{"sourceInterval":[1937,1939]},"id",[]],["terminal",{"sourceInterval":[1940,1943]},","]]],["terminal",{"sourceInterval":[1945,1948]},"{"],["star",{"sourceInterval":[1949,1962]},["app",{"sourceInterval":[1949,1961]},"ContractBody",[]]],["terminal",{"sourceInterval":[1963,1966]},"}"]]],"Contract":["define",{"sourceInterval":[1806,1979]},null,[],["alt",{"sourceInterval":[1817,1979]},["app",{"sourceInterval":[1817,1869]},"Contract_simple",[]],["app",{"sourceInterval":[1894,1966]},"Contract_withTraits",[]]]],"ContractInit":["define",{"sourceInterval":[1984,2056]},null,[],["seq",{"sourceInterval":[1999,2056]},["terminal",{"sourceInterval":[1999,2005]},"init"],["terminal",{"sourceInterval":[2006,2009]},"("],["app",{"sourceInterval":[2010,2033]},"ListOf",[["app",{"sourceInterval":[2017,2028]},"FunctionArg",[]],["terminal",{"sourceInterval":[2029,2032]},","]]],["terminal",{"sourceInterval":[2034,2037]},")"],["terminal",{"sourceInterval":[2038,2041]},"{"],["star",{"sourceInterval":[2042,2052]},["app",{"sourceInterval":[2042,2051]},"Statement",[]]],["terminal",{"sourceInterval":[2053,2056]},"}"]]],"ContractBody":["define",{"sourceInterval":[2061,2204]},null,[],["alt",{"sourceInterval":[2076,2204]},["app",{"sourceInterval":[2076,2081]},"Field",[]],["app",{"sourceInterval":[2101,2113]},"ContractInit",[]],["app",{"sourceInterval":[2133,2148]},"ReceiveFunction",[]],["app",{"sourceInterval":[2168,2176]},"Function",[]],["app",{"sourceInterval":[2196,2204]},"Constant",[]]]],"Trait_originary":["define",{"sourceInterval":[2235,2293]},null,[],["seq",{"sourceInterval":[2235,2281]},["star",{"sourceInterval":[2235,2253]},["app",{"sourceInterval":[2235,2252]},"ContractAttribute",[]]],["app",{"sourceInterval":[2254,2259]},"trait",[]],["app",{"sourceInterval":[2260,2262]},"id",[]],["terminal",{"sourceInterval":[2263,2266]},"{"],["star",{"sourceInterval":[2267,2277]},["app",{"sourceInterval":[2267,2276]},"TraitBody",[]]],["terminal",{"sourceInterval":[2278,2281]},"}"]]],"Trait_withTraits":["define",{"sourceInterval":[2306,2385]},null,[],["seq",{"sourceInterval":[2306,2372]},["star",{"sourceInterval":[2306,2324]},["app",{"sourceInterval":[2306,2323]},"ContractAttribute",[]]],["app",{"sourceInterval":[2325,2330]},"trait",[]],["app",{"sourceInterval":[2331,2333]},"id",[]],["app",{"sourceInterval":[2334,2338]},"with",[]],["app",{"sourceInterval":[2339,2353]},"ListOf",[["app",{"sourceInterval":[2346,2348]},"id",[]],["terminal",{"sourceInterval":[2349,2352]},","]]],["terminal",{"sourceInterval":[2354,2357]},"{"],["star",{"sourceInterval":[2358,2368]},["app",{"sourceInterval":[2358,2367]},"TraitBody",[]]],["terminal",{"sourceInterval":[2369,2372]},"}"]]],"Trait":["define",{"sourceInterval":[2227,2385]},null,[],["alt",{"sourceInterval":[2235,2385]},["app",{"sourceInterval":[2235,2281]},"Trait_originary",[]],["app",{"sourceInterval":[2306,2372]},"Trait_withTraits",[]]]],"TraitBody":["define",{"sourceInterval":[2390,2489]},null,[],["alt",{"sourceInterval":[2402,2489]},["app",{"sourceInterval":[2402,2407]},"Field",[]],["app",{"sourceInterval":[2424,2439]},"ReceiveFunction",[]],["app",{"sourceInterval":[2456,2464]},"Function",[]],["app",{"sourceInterval":[2481,2489]},"Constant",[]]]],"ContractAttribute_interface":["define",{"sourceInterval":[2542,2588]},null,[],["seq",{"sourceInterval":[2542,2576]},["terminal",{"sourceInterval":[2542,2554]},"@interface"],["terminal",{"sourceInterval":[2555,2558]},"("],["app",{"sourceInterval":[2559,2572]},"stringLiteral",[]],["terminal",{"sourceInterval":[2573,2576]},")"]]],"ContractAttribute":["define",{"sourceInterval":[2522,2588]},null,[],["app",{"sourceInterval":[2542,2588]},"ContractAttribute_interface",[]]],"FunctionAttribute_getter":["define",{"sourceInterval":[2630,2648]},null,[],["terminal",{"sourceInterval":[2630,2635]},"get"]],"FunctionAttribute_mutates":["define",{"sourceInterval":[2673,2692]},null,[],["app",{"sourceInterval":[2673,2680]},"mutates",[]]],"FunctionAttribute_extends":["define",{"sourceInterval":[2717,2736]},null,[],["app",{"sourceInterval":[2717,2724]},"extends",[]]],"FunctionAttribute_virtual":["define",{"sourceInterval":[2761,2780]},null,[],["app",{"sourceInterval":[2761,2768]},"virtual",[]]],"FunctionAttribute_override":["define",{"sourceInterval":[2805,2825]},null,[],["app",{"sourceInterval":[2805,2813]},"override",[]]],"FunctionAttribute_inline":["define",{"sourceInterval":[2850,2868]},null,[],["app",{"sourceInterval":[2850,2856]},"inline",[]]],"FunctionAttribute_abstract":["define",{"sourceInterval":[2893,2913]},null,[],["app",{"sourceInterval":[2893,2901]},"abstract",[]]],"FunctionAttribute":["define",{"sourceInterval":[2610,2913]},null,[],["alt",{"sourceInterval":[2630,2913]},["app",{"sourceInterval":[2630,2635]},"FunctionAttribute_getter",[]],["app",{"sourceInterval":[2673,2680]},"FunctionAttribute_mutates",[]],["app",{"sourceInterval":[2717,2724]},"FunctionAttribute_extends",[]],["app",{"sourceInterval":[2761,2768]},"FunctionAttribute_virtual",[]],["app",{"sourceInterval":[2805,2813]},"FunctionAttribute_override",[]],["app",{"sourceInterval":[2850,2856]},"FunctionAttribute_inline",[]],["app",{"sourceInterval":[2893,2901]},"FunctionAttribute_abstract",[]]]],"Function_withVoid":["define",{"sourceInterval":[2929,3016]},null,[],["seq",{"sourceInterval":[2929,3005]},["star",{"sourceInterval":[2929,2947]},["app",{"sourceInterval":[2929,2946]},"FunctionAttribute",[]]],["app",{"sourceInterval":[2948,2951]},"fun",[]],["app",{"sourceInterval":[2952,2954]},"id",[]],["terminal",{"sourceInterval":[2955,2958]},"("],["app",{"sourceInterval":[2959,2982]},"ListOf",[["app",{"sourceInterval":[2966,2977]},"FunctionArg",[]],["terminal",{"sourceInterval":[2978,2981]},","]]],["terminal",{"sourceInterval":[2983,2986]},")"],["terminal",{"sourceInterval":[2987,2990]},"{"],["star",{"sourceInterval":[2991,3001]},["app",{"sourceInterval":[2991,3000]},"Statement",[]]],["terminal",{"sourceInterval":[3002,3005]},"}"]]],"Function_withType":["define",{"sourceInterval":[3032,3128]},null,[],["seq",{"sourceInterval":[3032,3117]},["star",{"sourceInterval":[3032,3050]},["app",{"sourceInterval":[3032,3049]},"FunctionAttribute",[]]],["app",{"sourceInterval":[3051,3054]},"fun",[]],["app",{"sourceInterval":[3055,3057]},"id",[]],["terminal",{"sourceInterval":[3058,3061]},"("],["app",{"sourceInterval":[3062,3085]},"ListOf",[["app",{"sourceInterval":[3069,3080]},"FunctionArg",[]],["terminal",{"sourceInterval":[3081,3084]},","]]],["terminal",{"sourceInterval":[3086,3089]},")"],["terminal",{"sourceInterval":[3090,3093]},":"],["app",{"sourceInterval":[3094,3098]},"Type",[]],["terminal",{"sourceInterval":[3099,3102]},"{"],["star",{"sourceInterval":[3103,3113]},["app",{"sourceInterval":[3103,3112]},"Statement",[]]],["terminal",{"sourceInterval":[3114,3117]},"}"]]],"Function_abstractVoid":["define",{"sourceInterval":[3144,3220]},null,[],["seq",{"sourceInterval":[3144,3205]},["star",{"sourceInterval":[3144,3162]},["app",{"sourceInterval":[3144,3161]},"FunctionAttribute",[]]],["app",{"sourceInterval":[3163,3166]},"fun",[]],["app",{"sourceInterval":[3167,3169]},"id",[]],["terminal",{"sourceInterval":[3170,3173]},"("],["app",{"sourceInterval":[3174,3197]},"ListOf",[["app",{"sourceInterval":[3181,3192]},"FunctionArg",[]],["terminal",{"sourceInterval":[3193,3196]},","]]],["terminal",{"sourceInterval":[3198,3201]},")"],["terminal",{"sourceInterval":[3202,3205]},";"]]],"Function_abstractType":["define",{"sourceInterval":[3236,3321]},null,[],["seq",{"sourceInterval":[3236,3306]},["star",{"sourceInterval":[3236,3254]},["app",{"sourceInterval":[3236,3253]},"FunctionAttribute",[]]],["app",{"sourceInterval":[3255,3258]},"fun",[]],["app",{"sourceInterval":[3259,3261]},"id",[]],["terminal",{"sourceInterval":[3262,3265]},"("],["app",{"sourceInterval":[3266,3289]},"ListOf",[["app",{"sourceInterval":[3273,3284]},"FunctionArg",[]],["terminal",{"sourceInterval":[3285,3288]},","]]],["terminal",{"sourceInterval":[3290,3293]},")"],["terminal",{"sourceInterval":[3294,3297]},":"],["app",{"sourceInterval":[3298,3302]},"Type",[]],["terminal",{"sourceInterval":[3303,3306]},";"]]],"Function":["define",{"sourceInterval":[2918,3321]},null,[],["alt",{"sourceInterval":[2929,3321]},["app",{"sourceInterval":[2929,3005]},"Function_withVoid",[]],["app",{"sourceInterval":[3032,3117]},"Function_withType",[]],["app",{"sourceInterval":[3144,3205]},"Function_abstractVoid",[]],["app",{"sourceInterval":[3236,3306]},"Function_abstractType",[]]]],"FunctionArg":["define",{"sourceInterval":[3326,3351]},null,[],["seq",{"sourceInterval":[3340,3351]},["app",{"sourceInterval":[3340,3342]},"id",[]],["terminal",{"sourceInterval":[3343,3346]},":"],["app",{"sourceInterval":[3347,3351]},"Type",[]]]],"ReceiveFunction_simple":["define",{"sourceInterval":[3379,3436]},null,[],["seq",{"sourceInterval":[3379,3427]},["terminal",{"sourceInterval":[3379,3388]},"receive"],["terminal",{"sourceInterval":[3389,3392]},"("],["app",{"sourceInterval":[3393,3404]},"FunctionArg",[]],["terminal",{"sourceInterval":[3405,3408]},")"],["terminal",{"sourceInterval":[3409,3412]},"{"],["star",{"sourceInterval":[3413,3423]},["app",{"sourceInterval":[3413,3422]},"Statement",[]]],["terminal",{"sourceInterval":[3424,3427]},"}"]]],"ReceiveFunction_empty":["define",{"sourceInterval":[3459,3503]},null,[],["seq",{"sourceInterval":[3459,3495]},["terminal",{"sourceInterval":[3459,3468]},"receive"],["terminal",{"sourceInterval":[3469,3472]},"("],["terminal",{"sourceInterval":[3473,3476]},")"],["terminal",{"sourceInterval":[3477,3480]},"{"],["star",{"sourceInterval":[3481,3491]},["app",{"sourceInterval":[3481,3490]},"Statement",[]]],["terminal",{"sourceInterval":[3492,3495]},"}"]]],"ReceiveFunction_comment":["define",{"sourceInterval":[3526,3586]},null,[],["seq",{"sourceInterval":[3526,3576]},["terminal",{"sourceInterval":[3526,3535]},"receive"],["terminal",{"sourceInterval":[3536,3539]},"("],["app",{"sourceInterval":[3540,3553]},"stringLiteral",[]],["terminal",{"sourceInterval":[3554,3557]},")"],["terminal",{"sourceInterval":[3558,3561]},"{"],["star",{"sourceInterval":[3562,3572]},["app",{"sourceInterval":[3562,3571]},"Statement",[]]],["terminal",{"sourceInterval":[3573,3576]},"}"]]],"ReceiveFunction_bounced":["define",{"sourceInterval":[3609,3667]},null,[],["seq",{"sourceInterval":[3609,3657]},["terminal",{"sourceInterval":[3609,3618]},"bounced"],["terminal",{"sourceInterval":[3619,3622]},"("],["app",{"sourceInterval":[3623,3634]},"FunctionArg",[]],["terminal",{"sourceInterval":[3635,3638]},")"],["terminal",{"sourceInterval":[3639,3642]},"{"],["star",{"sourceInterval":[3643,3653]},["app",{"sourceInterval":[3643,3652]},"Statement",[]]],["terminal",{"sourceInterval":[3654,3657]},"}"]]],"ReceiveFunction_externalSimple":["define",{"sourceInterval":[3690,3756]},null,[],["seq",{"sourceInterval":[3690,3739]},["terminal",{"sourceInterval":[3690,3700]},"external"],["terminal",{"sourceInterval":[3701,3704]},"("],["app",{"sourceInterval":[3705,3716]},"FunctionArg",[]],["terminal",{"sourceInterval":[3717,3720]},")"],["terminal",{"sourceInterval":[3721,3724]},"{"],["star",{"sourceInterval":[3725,3735]},["app",{"sourceInterval":[3725,3734]},"Statement",[]]],["terminal",{"sourceInterval":[3736,3739]},"}"]]],"ReceiveFunction_externalComment":["define",{"sourceInterval":[3779,3848]},null,[],["seq",{"sourceInterval":[3779,3830]},["terminal",{"sourceInterval":[3779,3789]},"external"],["terminal",{"sourceInterval":[3790,3793]},"("],["app",{"sourceInterval":[3794,3807]},"stringLiteral",[]],["terminal",{"sourceInterval":[3808,3811]},")"],["terminal",{"sourceInterval":[3812,3815]},"{"],["star",{"sourceInterval":[3816,3826]},["app",{"sourceInterval":[3816,3825]},"Statement",[]]],["terminal",{"sourceInterval":[3827,3830]},"}"]]],"ReceiveFunction_externalEmpty":["define",{"sourceInterval":[3871,3924]},null,[],["seq",{"sourceInterval":[3871,3908]},["terminal",{"sourceInterval":[3871,3881]},"external"],["terminal",{"sourceInterval":[3882,3885]},"("],["terminal",{"sourceInterval":[3886,3889]},")"],["terminal",{"sourceInterval":[3890,3893]},"{"],["star",{"sourceInterval":[3894,3904]},["app",{"sourceInterval":[3894,3903]},"Statement",[]]],["terminal",{"sourceInterval":[3905,3908]},"}"]]],"ReceiveFunction":["define",{"sourceInterval":[3361,3924]},null,[],["alt",{"sourceInterval":[3379,3924]},["app",{"sourceInterval":[3379,3427]},"ReceiveFunction_simple",[]],["app",{"sourceInterval":[3459,3495]},"ReceiveFunction_empty",[]],["app",{"sourceInterval":[3526,3576]},"ReceiveFunction_comment",[]],["app",{"sourceInterval":[3609,3657]},"ReceiveFunction_bounced",[]],["app",{"sourceInterval":[3690,3739]},"ReceiveFunction_externalSimple",[]],["app",{"sourceInterval":[3779,3830]},"ReceiveFunction_externalComment",[]],["app",{"sourceInterval":[3871,3908]},"ReceiveFunction_externalEmpty",[]]]],"Statement":["define",{"sourceInterval":[3948,4232]},null,[],["alt",{"sourceInterval":[3960,4232]},["app",{"sourceInterval":[3960,3972]},"StatementLet",[]],["app",{"sourceInterval":[3989,4003]},"StatementBlock",[]],["app",{"sourceInterval":[4020,4035]},"StatementReturn",[]],["app",{"sourceInterval":[4052,4071]},"StatementExpression",[]],["app",{"sourceInterval":[4088,4103]},"StatementAssign",[]],["app",{"sourceInterval":[4120,4138]},"StatementCondition",[]],["app",{"sourceInterval":[4155,4169]},"StatementWhile",[]],["app",{"sourceInterval":[4186,4201]},"StatementRepeat",[]],["app",{"sourceInterval":[4218,4232]},"StatementUntil",[]]]],"StatementBlock":["define",{"sourceInterval":[4237,4272]},null,[],["seq",{"sourceInterval":[4254,4272]},["terminal",{"sourceInterval":[4254,4257]},"{"],["star",{"sourceInterval":[4258,4268]},["app",{"sourceInterval":[4258,4267]},"Statement",[]]],["terminal",{"sourceInterval":[4269,4272]},"}"]]],"StatementLet":["define",{"sourceInterval":[4277,4326]},null,[],["seq",{"sourceInterval":[4292,4326]},["app",{"sourceInterval":[4292,4295]},"let",[]],["app",{"sourceInterval":[4296,4298]},"id",[]],["terminal",{"sourceInterval":[4299,4302]},":"],["app",{"sourceInterval":[4303,4307]},"Type",[]],["terminal",{"sourceInterval":[4308,4311]},"="],["app",{"sourceInterval":[4312,4322]},"Expression",[]],["terminal",{"sourceInterval":[4323,4326]},";"]]],"StatementReturn_withExpression":["define",{"sourceInterval":[4349,4387]},null,[],["seq",{"sourceInterval":[4349,4370]},["app",{"sourceInterval":[4349,4355]},"return",[]],["app",{"sourceInterval":[4356,4366]},"Expression",[]],["terminal",{"sourceInterval":[4367,4370]},";"]]],"StatementReturn_withoutExpression":["define",{"sourceInterval":[4410,4440]},null,[],["seq",{"sourceInterval":[4410,4420]},["app",{"sourceInterval":[4410,4416]},"return",[]],["terminal",{"sourceInterval":[4417,4420]},";"]]],"StatementReturn":["define",{"sourceInterval":[4331,4440]},null,[],["alt",{"sourceInterval":[4349,4440]},["app",{"sourceInterval":[4349,4370]},"StatementReturn_withExpression",[]],["app",{"sourceInterval":[4410,4420]},"StatementReturn_withoutExpression",[]]]],"StatementExpression":["define",{"sourceInterval":[4449,4485]},null,[],["seq",{"sourceInterval":[4471,4485]},["app",{"sourceInterval":[4471,4481]},"Expression",[]],["terminal",{"sourceInterval":[4482,4485]},";"]]],"StatementAssign":["define",{"sourceInterval":[4490,4533]},null,[],["seq",{"sourceInterval":[4508,4533]},["app",{"sourceInterval":[4508,4514]},"LValue",[]],["terminal",{"sourceInterval":[4515,4518]},"="],["app",{"sourceInterval":[4519,4529]},"Expression",[]],["terminal",{"sourceInterval":[4530,4533]},";"]]],"StatementCondition_simple":["define",{"sourceInterval":[4559,4606]},null,[],["seq",{"sourceInterval":[4559,4597]},["app",{"sourceInterval":[4559,4561]},"if",[]],["app",{"sourceInterval":[4562,4572]},"Expression",[]],["terminal",{"sourceInterval":[4573,4576]},"{"],["star",{"sourceInterval":[4577,4587]},["app",{"sourceInterval":[4577,4586]},"Statement",[]]],["terminal",{"sourceInterval":[4588,4591]},"}"],["not",{"sourceInterval":[4592,4597]},["app",{"sourceInterval":[4593,4597]},"else",[]]]]],"StatementCondition_withElse":["define",{"sourceInterval":[4632,4699]},null,[],["seq",{"sourceInterval":[4632,4688]},["app",{"sourceInterval":[4632,4634]},"if",[]],["app",{"sourceInterval":[4635,4645]},"Expression",[]],["terminal",{"sourceInterval":[4646,4649]},"{"],["star",{"sourceInterval":[4650,4660]},["app",{"sourceInterval":[4650,4659]},"Statement",[]]],["terminal",{"sourceInterval":[4661,4664]},"}"],["app",{"sourceInterval":[4665,4669]},"else",[]],["terminal",{"sourceInterval":[4670,4673]},"{"],["star",{"sourceInterval":[4674,4684]},["app",{"sourceInterval":[4674,4683]},"Statement",[]]],["terminal",{"sourceInterval":[4685,4688]},"}"]]],"StatementCondition_withElseIf":["define",{"sourceInterval":[4725,4794]},null,[],["seq",{"sourceInterval":[4725,4781]},["app",{"sourceInterval":[4725,4727]},"if",[]],["app",{"sourceInterval":[4728,4738]},"Expression",[]],["terminal",{"sourceInterval":[4739,4742]},"{"],["star",{"sourceInterval":[4743,4753]},["app",{"sourceInterval":[4743,4752]},"Statement",[]]],["terminal",{"sourceInterval":[4754,4757]},"}"],["app",{"sourceInterval":[4758,4762]},"else",[]],["app",{"sourceInterval":[4763,4781]},"StatementCondition",[]]]],"StatementCondition":["define",{"sourceInterval":[4538,4794]},null,[],["alt",{"sourceInterval":[4559,4794]},["app",{"sourceInterval":[4559,4597]},"StatementCondition_simple",[]],["app",{"sourceInterval":[4632,4688]},"StatementCondition_withElse",[]],["app",{"sourceInterval":[4725,4781]},"StatementCondition_withElseIf",[]]]],"StatementWhile":["define",{"sourceInterval":[4799,4859]},null,[],["seq",{"sourceInterval":[4816,4859]},["app",{"sourceInterval":[4816,4821]},"while",[]],["terminal",{"sourceInterval":[4822,4825]},"("],["app",{"sourceInterval":[4826,4836]},"Expression",[]],["terminal",{"sourceInterval":[4837,4840]},")"],["terminal",{"sourceInterval":[4841,4844]},"{"],["star",{"sourceInterval":[4845,4855]},["app",{"sourceInterval":[4845,4854]},"Statement",[]]],["terminal",{"sourceInterval":[4856,4859]},"}"]]],"StatementRepeat":["define",{"sourceInterval":[4864,4926]},null,[],["seq",{"sourceInterval":[4882,4926]},["app",{"sourceInterval":[4882,4888]},"repeat",[]],["terminal",{"sourceInterval":[4889,4892]},"("],["app",{"sourceInterval":[4893,4903]},"Expression",[]],["terminal",{"sourceInterval":[4904,4907]},")"],["terminal",{"sourceInterval":[4908,4911]},"{"],["star",{"sourceInterval":[4912,4922]},["app",{"sourceInterval":[4912,4921]},"Statement",[]]],["terminal",{"sourceInterval":[4923,4926]},"}"]]],"StatementUntil":["define",{"sourceInterval":[4931,4998]},null,[],["seq",{"sourceInterval":[4948,4998]},["app",{"sourceInterval":[4948,4950]},"do",[]],["terminal",{"sourceInterval":[4951,4954]},"{"],["star",{"sourceInterval":[4955,4965]},["app",{"sourceInterval":[4955,4964]},"Statement",[]]],["terminal",{"sourceInterval":[4966,4969]},"}"],["app",{"sourceInterval":[4970,4975]},"until",[]],["terminal",{"sourceInterval":[4976,4979]},"("],["app",{"sourceInterval":[4980,4990]},"Expression",[]],["terminal",{"sourceInterval":[4991,4994]},")"],["terminal",{"sourceInterval":[4995,4998]},";"]]],"LValue_more":["define",{"sourceInterval":[5028,5048]},null,[],["seq",{"sourceInterval":[5028,5041]},["app",{"sourceInterval":[5028,5030]},"id",[]],["terminal",{"sourceInterval":[5031,5034]},"."],["app",{"sourceInterval":[5035,5041]},"LValue",[]]]],"LValue_single":["define",{"sourceInterval":[5062,5073]},null,[],["app",{"sourceInterval":[5062,5064]},"id",[]]],"LValue":["define",{"sourceInterval":[5019,5073]},null,[],["alt",{"sourceInterval":[5028,5073]},["app",{"sourceInterval":[5028,5041]},"LValue_more",[]],["app",{"sourceInterval":[5062,5064]},"LValue_single",[]]]],"Expression":["define",{"sourceInterval":[5098,5123]},null,[],["app",{"sourceInterval":[5111,5123]},"ExpressionOr",[]]],"ExpressionOr_or":["define",{"sourceInterval":[5143,5179]},null,[],["seq",{"sourceInterval":[5143,5174]},["app",{"sourceInterval":[5143,5155]},"ExpressionOr",[]],["terminal",{"sourceInterval":[5156,5160]},"||"],["app",{"sourceInterval":[5161,5174]},"ExpressionAnd",[]]]],"ExpressionOr":["define",{"sourceInterval":[5128,5212]},null,[],["alt",{"sourceInterval":[5143,5212]},["app",{"sourceInterval":[5143,5174]},"ExpressionOr_or",[]],["app",{"sourceInterval":[5199,5212]},"ExpressionAnd",[]]]],"ExpressionAnd_and":["define",{"sourceInterval":[5233,5275]},null,[],["seq",{"sourceInterval":[5233,5269]},["app",{"sourceInterval":[5233,5246]},"ExpressionAnd",[]],["terminal",{"sourceInterval":[5247,5251]},"&&"],["app",{"sourceInterval":[5252,5269]},"ExpressionCompare",[]]]],"ExpressionAnd":["define",{"sourceInterval":[5217,5313]},null,[],["alt",{"sourceInterval":[5233,5313]},["app",{"sourceInterval":[5233,5269]},"ExpressionAnd_and",[]],["app",{"sourceInterval":[5296,5313]},"ExpressionCompare",[]]]],"ExpressionCompare_not":["define",{"sourceInterval":[5338,5383]},null,[],["seq",{"sourceInterval":[5338,5377]},["app",{"sourceInterval":[5338,5355]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5356,5360]},"!="],["app",{"sourceInterval":[5361,5377]},"ExpressionBinary",[]]]],"ExpressionCompare_eq":["define",{"sourceInterval":[5408,5452]},null,[],["seq",{"sourceInterval":[5408,5447]},["app",{"sourceInterval":[5408,5425]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5426,5430]},"=="],["app",{"sourceInterval":[5431,5447]},"ExpressionBinary",[]]]],"ExpressionCompare_gt":["define",{"sourceInterval":[5477,5520]},null,[],["seq",{"sourceInterval":[5477,5515]},["app",{"sourceInterval":[5477,5494]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5495,5498]},">"],["app",{"sourceInterval":[5499,5515]},"ExpressionBinary",[]]]],"ExpressionCompare_gte":["define",{"sourceInterval":[5545,5590]},null,[],["seq",{"sourceInterval":[5545,5584]},["app",{"sourceInterval":[5545,5562]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5563,5567]},">="],["app",{"sourceInterval":[5568,5584]},"ExpressionBinary",[]]]],"ExpressionCompare_lt":["define",{"sourceInterval":[5615,5658]},null,[],["seq",{"sourceInterval":[5615,5653]},["app",{"sourceInterval":[5615,5632]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5633,5636]},"<"],["app",{"sourceInterval":[5637,5653]},"ExpressionBinary",[]]]],"ExpressionCompare_lte":["define",{"sourceInterval":[5683,5728]},null,[],["seq",{"sourceInterval":[5683,5722]},["app",{"sourceInterval":[5683,5700]},"ExpressionCompare",[]],["terminal",{"sourceInterval":[5701,5705]},"<="],["app",{"sourceInterval":[5706,5722]},"ExpressionBinary",[]]]],"ExpressionCompare":["define",{"sourceInterval":[5318,5769]},null,[],["alt",{"sourceInterval":[5338,5769]},["app",{"sourceInterval":[5338,5377]},"ExpressionCompare_not",[]],["app",{"sourceInterval":[5408,5447]},"ExpressionCompare_eq",[]],["app",{"sourceInterval":[5477,5515]},"ExpressionCompare_gt",[]],["app",{"sourceInterval":[5545,5584]},"ExpressionCompare_gte",[]],["app",{"sourceInterval":[5615,5653]},"ExpressionCompare_lt",[]],["app",{"sourceInterval":[5683,5722]},"ExpressionCompare_lte",[]],["app",{"sourceInterval":[5753,5769]},"ExpressionBinary",[]]]],"ExpressionBinary_shr":["define",{"sourceInterval":[5793,5834]},null,[],["seq",{"sourceInterval":[5793,5828]},["app",{"sourceInterval":[5793,5809]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[5810,5814]},">>"],["app",{"sourceInterval":[5815,5828]},"ExpressionAdd",[]]]],"ExpressionBinary_shl":["define",{"sourceInterval":[5857,5898]},null,[],["seq",{"sourceInterval":[5857,5892]},["app",{"sourceInterval":[5857,5873]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[5874,5878]},"<<"],["app",{"sourceInterval":[5879,5892]},"ExpressionAdd",[]]]],"ExpressionBinary_bin_and":["define",{"sourceInterval":[5921,5965]},null,[],["seq",{"sourceInterval":[5921,5955]},["app",{"sourceInterval":[5921,5937]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[5938,5941]},"&"],["app",{"sourceInterval":[5942,5955]},"ExpressionAdd",[]]]],"ExpressionBinary_bin_or":["define",{"sourceInterval":[5988,6031]},null,[],["seq",{"sourceInterval":[5988,6022]},["app",{"sourceInterval":[5988,6004]},"ExpressionBinary",[]],["terminal",{"sourceInterval":[6005,6008]},"|"],["app",{"sourceInterval":[6009,6022]},"ExpressionAdd",[]]]],"ExpressionBinary":["define",{"sourceInterval":[5774,6067]},null,[],["alt",{"sourceInterval":[5793,6067]},["app",{"sourceInterval":[5793,5828]},"ExpressionBinary_shr",[]],["app",{"sourceInterval":[5857,5892]},"ExpressionBinary_shl",[]],["app",{"sourceInterval":[5921,5955]},"ExpressionBinary_bin_and",[]],["app",{"sourceInterval":[5988,6022]},"ExpressionBinary_bin_or",[]],["app",{"sourceInterval":[6054,6067]},"ExpressionAdd",[]]]],"ExpressionAdd_add":["define",{"sourceInterval":[6088,6130]},null,[],["seq",{"sourceInterval":[6088,6124]},["app",{"sourceInterval":[6088,6101]},"ExpressionAdd",[]],["terminal",{"sourceInterval":[6102,6105]},"+"],["not",{"sourceInterval":[6106,6110]},["terminal",{"sourceInterval":[6107,6110]},"+"]],["app",{"sourceInterval":[6111,6124]},"ExpressionMul",[]]]],"ExpressionAdd_sub":["define",{"sourceInterval":[6151,6193]},null,[],["seq",{"sourceInterval":[6151,6187]},["app",{"sourceInterval":[6151,6164]},"ExpressionAdd",[]],["terminal",{"sourceInterval":[6165,6168]},"-"],["not",{"sourceInterval":[6169,6173]},["terminal",{"sourceInterval":[6170,6173]},"-"]],["app",{"sourceInterval":[6174,6187]},"ExpressionMul",[]]]],"ExpressionAdd":["define",{"sourceInterval":[6072,6227]},null,[],["alt",{"sourceInterval":[6088,6227]},["app",{"sourceInterval":[6088,6124]},"ExpressionAdd_add",[]],["app",{"sourceInterval":[6151,6187]},"ExpressionAdd_sub",[]],["app",{"sourceInterval":[6214,6227]},"ExpressionMul",[]]]],"ExpressionMul_mul":["define",{"sourceInterval":[6248,6287]},null,[],["seq",{"sourceInterval":[6248,6281]},["app",{"sourceInterval":[6248,6261]},"ExpressionMul",[]],["terminal",{"sourceInterval":[6262,6265]},"*"],["app",{"sourceInterval":[6266,6281]},"ExpressionUnary",[]]]],"ExpressionMul_div":["define",{"sourceInterval":[6308,6347]},null,[],["seq",{"sourceInterval":[6308,6341]},["app",{"sourceInterval":[6308,6321]},"ExpressionMul",[]],["terminal",{"sourceInterval":[6322,6325]},"/"],["app",{"sourceInterval":[6326,6341]},"ExpressionUnary",[]]]],"ExpressionMul_rem":["define",{"sourceInterval":[6368,6407]},null,[],["seq",{"sourceInterval":[6368,6401]},["app",{"sourceInterval":[6368,6381]},"ExpressionMul",[]],["terminal",{"sourceInterval":[6382,6385]},"%"],["app",{"sourceInterval":[6386,6401]},"ExpressionUnary",[]]]],"ExpressionMul":["define",{"sourceInterval":[6232,6443]},null,[],["alt",{"sourceInterval":[6248,6443]},["app",{"sourceInterval":[6248,6281]},"ExpressionMul_mul",[]],["app",{"sourceInterval":[6308,6341]},"ExpressionMul_div",[]],["app",{"sourceInterval":[6368,6401]},"ExpressionMul_rem",[]],["app",{"sourceInterval":[6428,6443]},"ExpressionUnary",[]]]],"ExpressionUnary_neg":["define",{"sourceInterval":[6466,6497]},null,[],["seq",{"sourceInterval":[6466,6491]},["terminal",{"sourceInterval":[6466,6469]},"-"],["app",{"sourceInterval":[6470,6491]},"ExpressionUnarySuffix",[]]]],"ExpressionUnary_add":["define",{"sourceInterval":[6520,6551]},null,[],["seq",{"sourceInterval":[6520,6545]},["terminal",{"sourceInterval":[6520,6523]},"+"],["app",{"sourceInterval":[6524,6545]},"ExpressionUnarySuffix",[]]]],"ExpressionUnary_not":["define",{"sourceInterval":[6574,6605]},null,[],["seq",{"sourceInterval":[6574,6599]},["terminal",{"sourceInterval":[6574,6577]},"!"],["app",{"sourceInterval":[6578,6599]},"ExpressionUnarySuffix",[]]]],"ExpressionUnary":["define",{"sourceInterval":[6448,6649]},null,[],["alt",{"sourceInterval":[6466,6649]},["app",{"sourceInterval":[6466,6491]},"ExpressionUnary_neg",[]],["app",{"sourceInterval":[6520,6545]},"ExpressionUnary_add",[]],["app",{"sourceInterval":[6574,6599]},"ExpressionUnary_not",[]],["app",{"sourceInterval":[6628,6649]},"ExpressionUnarySuffix",[]]]],"ExpressionUnarySuffix_notNull":["define",{"sourceInterval":[6678,6708]},null,[],["seq",{"sourceInterval":[6678,6698]},["app",{"sourceInterval":[6678,6693]},"ExpressionValue",[]],["terminal",{"sourceInterval":[6694,6698]},"!!"]]],"ExpressionUnarySuffix":["define",{"sourceInterval":[6654,6752]},null,[],["alt",{"sourceInterval":[6678,6752]},["app",{"sourceInterval":[6678,6698]},"ExpressionUnarySuffix_notNull",[]],["app",{"sourceInterval":[6737,6752]},"ExpressionValue",[]]]],"ExpressionBracket":["define",{"sourceInterval":[6757,6795]},null,[],["seq",{"sourceInterval":[6777,6795]},["terminal",{"sourceInterval":[6777,6780]},"("],["app",{"sourceInterval":[6781,6791]},"Expression",[]],["terminal",{"sourceInterval":[6792,6795]},")"]]],"ExpressionValue":["define",{"sourceInterval":[6827,7217]},null,[],["alt",{"sourceInterval":[6845,7217]},["app",{"sourceInterval":[6845,6859]},"ExpressionCall",[]],["app",{"sourceInterval":[6882,6897]},"ExpressionField",[]],["app",{"sourceInterval":[6920,6940]},"ExpressionStaticCall",[]],["app",{"sourceInterval":[6963,6980]},"ExpressionBracket",[]],["app",{"sourceInterval":[7003,7016]},"ExpressionNew",[]],["app",{"sourceInterval":[7039,7053]},"integerLiteral",[]],["app",{"sourceInterval":[7076,7087]},"boolLiteral",[]],["app",{"sourceInterval":[7110,7112]},"id",[]],["app",{"sourceInterval":[7135,7139]},"null",[]],["app",{"sourceInterval":[7162,7178]},"ExpressionInitOf",[]],["app",{"sourceInterval":[7201,7217]},"ExpressionString",[]]]],"ExpressionString":["define",{"sourceInterval":[7222,7254]},null,[],["app",{"sourceInterval":[7241,7254]},"stringLiteral",[]]],"ExpressionField":["define",{"sourceInterval":[7259,7304]},null,[],["seq",{"sourceInterval":[7277,7304]},["app",{"sourceInterval":[7277,7292]},"ExpressionValue",[]],["terminal",{"sourceInterval":[7293,7296]},"."],["app",{"sourceInterval":[7297,7299]},"id",[]],["not",{"sourceInterval":[7300,7304]},["terminal",{"sourceInterval":[7301,7304]},"("]]]],"ExpressionCall":["define",{"sourceInterval":[7309,7380]},null,[],["seq",{"sourceInterval":[7326,7380]},["app",{"sourceInterval":[7326,7341]},"ExpressionValue",[]],["terminal",{"sourceInterval":[7342,7345]},"."],["app",{"sourceInterval":[7346,7348]},"id",[]],["terminal",{"sourceInterval":[7349,7352]},"("],["app",{"sourceInterval":[7353,7376]},"ListOf",[["app",{"sourceInterval":[7360,7370]},"Expression",[]],["terminal",{"sourceInterval":[7372,7375]},","]]],["terminal",{"sourceInterval":[7377,7380]},")"]]],"ExpressionNew":["define",{"sourceInterval":[7385,7437]},null,[],["seq",{"sourceInterval":[7401,7437]},["app",{"sourceInterval":[7401,7403]},"id",[]],["terminal",{"sourceInterval":[7404,7407]},"{"],["app",{"sourceInterval":[7408,7433]},"ListOf",[["app",{"sourceInterval":[7415,7427]},"NewParameter",[]],["terminal",{"sourceInterval":[7429,7432]},","]]],["terminal",{"sourceInterval":[7434,7437]},"}"]]],"NewParameter":["define",{"sourceInterval":[7442,7474]},null,[],["seq",{"sourceInterval":[7457,7474]},["app",{"sourceInterval":[7457,7459]},"id",[]],["terminal",{"sourceInterval":[7460,7463]},":"],["app",{"sourceInterval":[7464,7474]},"Expression",[]]]],"ExpressionStaticCall":["define",{"sourceInterval":[7479,7536]},null,[],["seq",{"sourceInterval":[7502,7536]},["app",{"sourceInterval":[7502,7504]},"id",[]],["terminal",{"sourceInterval":[7505,7508]},"("],["app",{"sourceInterval":[7509,7532]},"ListOf",[["app",{"sourceInterval":[7516,7526]},"Expression",[]],["terminal",{"sourceInterval":[7528,7531]},","]]],["terminal",{"sourceInterval":[7533,7536]},")"]]],"ExpressionInitOf":["define",{"sourceInterval":[7541,7601]},null,[],["seq",{"sourceInterval":[7560,7601]},["app",{"sourceInterval":[7560,7566]},"initOf",[]],["app",{"sourceInterval":[7567,7569]},"id",[]],["terminal",{"sourceInterval":[7570,7573]},"("],["app",{"sourceInterval":[7574,7597]},"ListOf",[["app",{"sourceInterval":[7581,7591]},"Expression",[]],["terminal",{"sourceInterval":[7593,7596]},","]]],["terminal",{"sourceInterval":[7598,7601]},")"]]],"typeLiteral":["define",{"sourceInterval":[7627,7671]},null,[],["seq",{"sourceInterval":[7641,7671]},["app",{"sourceInterval":[7641,7654]},"letterAsciiUC",[]],["star",{"sourceInterval":[7655,7671]},["app",{"sourceInterval":[7655,7670]},"typeLiteralPart",[]]]]],"typeLiteralPart":["define",{"sourceInterval":[7676,7719]},null,[],["alt",{"sourceInterval":[7694,7719]},["app",{"sourceInterval":[7694,7705]},"letterAscii",[]],["app",{"sourceInterval":[7708,7713]},"digit",[]],["terminal",{"sourceInterval":[7716,7719]},"_"]]],"integerLiteral":["define",{"sourceInterval":[7926,8000]},null,[],["alt",{"sourceInterval":[7943,8000]},["app",{"sourceInterval":[7943,7960]},"integerLiteralHex",[]],["app",{"sourceInterval":[7963,7980]},"integerLiteralBin",[]],["app",{"sourceInterval":[7983,8000]},"integerLiteralDec",[]]]],"integerLiteralDec":["define",{"sourceInterval":[8027,8053]},null,[],["plus",{"sourceInterval":[8047,8053]},["app",{"sourceInterval":[8047,8052]},"digit",[]]]],"integerLiteralHex":["define",{"sourceInterval":[8058,8131]},null,[],["alt",{"sourceInterval":[8078,8131]},["seq",{"sourceInterval":[8078,8092]},["terminal",{"sourceInterval":[8078,8082]},"0x"],["plus",{"sourceInterval":[8083,8092]},["app",{"sourceInterval":[8083,8091]},"hexDigit",[]]]],["seq",{"sourceInterval":[8117,8131]},["terminal",{"sourceInterval":[8117,8121]},"0X"],["plus",{"sourceInterval":[8122,8131]},["app",{"sourceInterval":[8122,8130]},"hexDigit",[]]]]]],"integerLiteralBin":["define",{"sourceInterval":[8136,8209]},null,[],["alt",{"sourceInterval":[8156,8209]},["seq",{"sourceInterval":[8156,8170]},["terminal",{"sourceInterval":[8156,8160]},"0b"],["plus",{"sourceInterval":[8161,8170]},["app",{"sourceInterval":[8161,8169]},"binDigit",[]]]],["seq",{"sourceInterval":[8195,8209]},["terminal",{"sourceInterval":[8195,8199]},"0B"],["plus",{"sourceInterval":[8200,8209]},["app",{"sourceInterval":[8200,8208]},"binDigit",[]]]]]],"binDigit":["define",{"sourceInterval":[8214,8234]},null,[],["alt",{"sourceInterval":[8225,8234]},["terminal",{"sourceInterval":[8225,8228]},"0"],["terminal",{"sourceInterval":[8231,8234]},"1"]]],"letterAsciiLC":["define",{"sourceInterval":[8255,8279]},null,[],["range",{"sourceInterval":[8271,8279]},"a","z"]],"letterAsciiUC":["define",{"sourceInterval":[8284,8308]},null,[],["range",{"sourceInterval":[8300,8308]},"A","Z"]],"letterAscii":["define",{"sourceInterval":[8313,8356]},null,[],["alt",{"sourceInterval":[8327,8356]},["app",{"sourceInterval":[8327,8340]},"letterAsciiLC",[]],["app",{"sourceInterval":[8343,8356]},"letterAsciiUC",[]]]],"letterComment":["define",{"sourceInterval":[8361,8420]},null,[],["alt",{"sourceInterval":[8377,8420]},["app",{"sourceInterval":[8377,8390]},"letterAsciiLC",[]],["app",{"sourceInterval":[8393,8406]},"letterAsciiUC",[]],["app",{"sourceInterval":[8409,8414]},"digit",[]],["terminal",{"sourceInterval":[8417,8420]},"_"]]],"idStart":["define",{"sourceInterval":[8444,8471]},null,[],["alt",{"sourceInterval":[8454,8471]},["app",{"sourceInterval":[8454,8465]},"letterAscii",[]],["terminal",{"sourceInterval":[8468,8471]},"_"]]],"idPart":["define",{"sourceInterval":[8476,8510]},null,[],["alt",{"sourceInterval":[8485,8510]},["app",{"sourceInterval":[8485,8496]},"letterAscii",[]],["app",{"sourceInterval":[8499,8504]},"digit",[]],["terminal",{"sourceInterval":[8507,8510]},"_"]]],"id":["define",{"sourceInterval":[8515,8553]},null,[],["seq",{"sourceInterval":[8520,8553]},["not",{"sourceInterval":[8520,8533]},["app",{"sourceInterval":[8521,8533]},"reservedWord",[]]],["lex",{"sourceInterval":[8534,8542]},["app",{"sourceInterval":[8535,8542]},"idStart",[]]],["lex",{"sourceInterval":[8543,8553]},["star",{"sourceInterval":[8545,8552]},["app",{"sourceInterval":[8545,8551]},"idPart",[]]]]]],"funcLetter":["define",{"sourceInterval":[8574,8635]},null,[],["alt",{"sourceInterval":[8587,8635]},["app",{"sourceInterval":[8587,8598]},"letterAscii",[]],["terminal",{"sourceInterval":[8601,8604]},"_"],["terminal",{"sourceInterval":[8607,8610]},"'"],["terminal",{"sourceInterval":[8613,8616]},"?"],["terminal",{"sourceInterval":[8619,8622]},"!"],["terminal",{"sourceInterval":[8625,8629]},"::"],["terminal",{"sourceInterval":[8632,8635]},"&"]]],"funcId":["define",{"sourceInterval":[8640,8682]},null,[],["seq",{"sourceInterval":[8649,8682]},["app",{"sourceInterval":[8649,8659]},"funcLetter",[]],["star",{"sourceInterval":[8660,8682]},["lex",{"sourceInterval":[8660,8681]},["alt",{"sourceInterval":[8662,8680]},["app",{"sourceInterval":[8662,8672]},"funcLetter",[]],["app",{"sourceInterval":[8675,8680]},"digit",[]]]]]]],"boolLiteral":["define",{"sourceInterval":[8708,8748]},null,[],["seq",{"sourceInterval":[8722,8748]},["alt",{"sourceInterval":[8723,8739]},["terminal",{"sourceInterval":[8723,8729]},"true"],["terminal",{"sourceInterval":[8732,8739]},"false"]],["not",{"sourceInterval":[8741,8748]},["app",{"sourceInterval":[8742,8748]},"idPart",[]]]]],"stringLiteralCharacter":["define",{"sourceInterval":[8776,8836]},null,[],["seq",{"sourceInterval":[8801,8836]},["not",{"sourceInterval":[8801,8832]},["alt",{"sourceInterval":[8803,8831]},["terminal",{"sourceInterval":[8803,8807]},"\""],["terminal",{"sourceInterval":[8810,8814]},"\\"],["app",{"sourceInterval":[8817,8831]},"lineTerminator",[]]]],["app",{"sourceInterval":[8833,8836]},"any",[]]]],"stringLiteral":["define",{"sourceInterval":[8841,8890]},null,[],["seq",{"sourceInterval":[8857,8890]},["terminal",{"sourceInterval":[8857,8861]},"\""],["star",{"sourceInterval":[8862,8885]},["app",{"sourceInterval":[8862,8884]},"stringLiteralCharacter",[]]],["terminal",{"sourceInterval":[8886,8890]},"\""]]],"keyword":["define",{"sourceInterval":[8943,9456]},null,[],["alt",{"sourceInterval":[8953,9456]},["app",{"sourceInterval":[8953,8956]},"fun",[]],["app",{"sourceInterval":[8972,8975]},"let",[]],["app",{"sourceInterval":[8990,8996]},"return",[]],["app",{"sourceInterval":[9012,9018]},"extend",[]],["app",{"sourceInterval":[9034,9040]},"native",[]],["app",{"sourceInterval":[9056,9062]},"public",[]],["app",{"sourceInterval":[9078,9082]},"null",[]],["app",{"sourceInterval":[9098,9100]},"if",[]],["app",{"sourceInterval":[9116,9120]},"else",[]],["app",{"sourceInterval":[9136,9141]},"while",[]],["app",{"sourceInterval":[9157,9163]},"repeat",[]],["app",{"sourceInterval":[9179,9181]},"do",[]],["app",{"sourceInterval":[9197,9202]},"until",[]],["app",{"sourceInterval":[9218,9220]},"as",[]],["app",{"sourceInterval":[9237,9244]},"mutates",[]],["app",{"sourceInterval":[9259,9266]},"extends",[]],["app",{"sourceInterval":[9281,9287]},"import",[]],["app",{"sourceInterval":[9302,9306]},"with",[]],["app",{"sourceInterval":[9321,9326]},"trait",[]],["app",{"sourceInterval":[9341,9347]},"initOf",[]],["app",{"sourceInterval":[9362,9370]},"override",[]],["app",{"sourceInterval":[9385,9393]},"abstract",[]],["app",{"sourceInterval":[9408,9415]},"virtual",[]],["app",{"sourceInterval":[9430,9436]},"inline",[]],["app",{"sourceInterval":[9451,9456]},"const",[]]]],"contract":["define",{"sourceInterval":[9461,9490]},null,[],["seq",{"sourceInterval":[9472,9490]},["terminal",{"sourceInterval":[9472,9482]},"contract"],["not",{"sourceInterval":[9483,9490]},["app",{"sourceInterval":[9484,9490]},"idPart",[]]]]],"let":["define",{"sourceInterval":[9495,9514]},null,[],["seq",{"sourceInterval":[9501,9514]},["terminal",{"sourceInterval":[9501,9506]},"let"],["not",{"sourceInterval":[9507,9514]},["app",{"sourceInterval":[9508,9514]},"idPart",[]]]]],"fun":["define",{"sourceInterval":[9519,9538]},null,[],["seq",{"sourceInterval":[9525,9538]},["terminal",{"sourceInterval":[9525,9530]},"fun"],["not",{"sourceInterval":[9531,9538]},["app",{"sourceInterval":[9532,9538]},"idPart",[]]]]],"return":["define",{"sourceInterval":[9543,9568]},null,[],["seq",{"sourceInterval":[9552,9568]},["terminal",{"sourceInterval":[9552,9560]},"return"],["not",{"sourceInterval":[9561,9568]},["app",{"sourceInterval":[9562,9568]},"idPart",[]]]]],"extend":["define",{"sourceInterval":[9573,9598]},null,[],["seq",{"sourceInterval":[9582,9598]},["terminal",{"sourceInterval":[9582,9590]},"extend"],["not",{"sourceInterval":[9591,9598]},["app",{"sourceInterval":[9592,9598]},"idPart",[]]]]],"native":["define",{"sourceInterval":[9603,9628]},null,[],["seq",{"sourceInterval":[9612,9628]},["terminal",{"sourceInterval":[9612,9620]},"native"],["not",{"sourceInterval":[9621,9628]},["app",{"sourceInterval":[9622,9628]},"idPart",[]]]]],"public":["define",{"sourceInterval":[9633,9658]},null,[],["seq",{"sourceInterval":[9642,9658]},["terminal",{"sourceInterval":[9642,9650]},"public"],["not",{"sourceInterval":[9651,9658]},["app",{"sourceInterval":[9652,9658]},"idPart",[]]]]],"null":["define",{"sourceInterval":[9663,9684]},null,[],["seq",{"sourceInterval":[9670,9684]},["terminal",{"sourceInterval":[9670,9676]},"null"],["not",{"sourceInterval":[9677,9684]},["app",{"sourceInterval":[9678,9684]},"idPart",[]]]]],"if":["define",{"sourceInterval":[9689,9706]},null,[],["seq",{"sourceInterval":[9694,9706]},["terminal",{"sourceInterval":[9694,9698]},"if"],["not",{"sourceInterval":[9699,9706]},["app",{"sourceInterval":[9700,9706]},"idPart",[]]]]],"else":["define",{"sourceInterval":[9711,9732]},null,[],["seq",{"sourceInterval":[9718,9732]},["terminal",{"sourceInterval":[9718,9724]},"else"],["not",{"sourceInterval":[9725,9732]},["app",{"sourceInterval":[9726,9732]},"idPart",[]]]]],"while":["define",{"sourceInterval":[9737,9760]},null,[],["seq",{"sourceInterval":[9745,9760]},["terminal",{"sourceInterval":[9745,9752]},"while"],["not",{"sourceInterval":[9753,9760]},["app",{"sourceInterval":[9754,9760]},"idPart",[]]]]],"repeat":["define",{"sourceInterval":[9765,9790]},null,[],["seq",{"sourceInterval":[9774,9790]},["terminal",{"sourceInterval":[9774,9782]},"repeat"],["not",{"sourceInterval":[9783,9790]},["app",{"sourceInterval":[9784,9790]},"idPart",[]]]]],"do":["define",{"sourceInterval":[9795,9812]},null,[],["seq",{"sourceInterval":[9800,9812]},["terminal",{"sourceInterval":[9800,9804]},"do"],["not",{"sourceInterval":[9805,9812]},["app",{"sourceInterval":[9806,9812]},"idPart",[]]]]],"until":["define",{"sourceInterval":[9817,9840]},null,[],["seq",{"sourceInterval":[9825,9840]},["terminal",{"sourceInterval":[9825,9832]},"until"],["not",{"sourceInterval":[9833,9840]},["app",{"sourceInterval":[9834,9840]},"idPart",[]]]]],"as":["define",{"sourceInterval":[9845,9862]},null,[],["seq",{"sourceInterval":[9850,9862]},["terminal",{"sourceInterval":[9850,9854]},"as"],["not",{"sourceInterval":[9855,9862]},["app",{"sourceInterval":[9856,9862]},"idPart",[]]]]],"mutates":["define",{"sourceInterval":[9867,9894]},null,[],["seq",{"sourceInterval":[9877,9894]},["terminal",{"sourceInterval":[9877,9886]},"mutates"],["not",{"sourceInterval":[9887,9894]},["app",{"sourceInterval":[9888,9894]},"idPart",[]]]]],"extends":["define",{"sourceInterval":[9899,9926]},null,[],["seq",{"sourceInterval":[9909,9926]},["terminal",{"sourceInterval":[9909,9918]},"extends"],["not",{"sourceInterval":[9919,9926]},["app",{"sourceInterval":[9920,9926]},"idPart",[]]]]],"import":["define",{"sourceInterval":[9931,9956]},null,[],["seq",{"sourceInterval":[9940,9956]},["terminal",{"sourceInterval":[9940,9948]},"import"],["not",{"sourceInterval":[9949,9956]},["app",{"sourceInterval":[9950,9956]},"idPart",[]]]]],"with":["define",{"sourceInterval":[9961,9982]},null,[],["seq",{"sourceInterval":[9968,9982]},["terminal",{"sourceInterval":[9968,9974]},"with"],["not",{"sourceInterval":[9975,9982]},["app",{"sourceInterval":[9976,9982]},"idPart",[]]]]],"trait":["define",{"sourceInterval":[9987,10010]},null,[],["seq",{"sourceInterval":[9995,10010]},["terminal",{"sourceInterval":[9995,10002]},"trait"],["not",{"sourceInterval":[10003,10010]},["app",{"sourceInterval":[10004,10010]},"idPart",[]]]]],"initOf":["define",{"sourceInterval":[10015,10040]},null,[],["seq",{"sourceInterval":[10024,10040]},["terminal",{"sourceInterval":[10024,10032]},"initOf"],["not",{"sourceInterval":[10033,10040]},["app",{"sourceInterval":[10034,10040]},"idPart",[]]]]],"virtual":["define",{"sourceInterval":[10045,10072]},null,[],["seq",{"sourceInterval":[10055,10072]},["terminal",{"sourceInterval":[10055,10064]},"virtual"],["not",{"sourceInterval":[10065,10072]},["app",{"sourceInterval":[10066,10072]},"idPart",[]]]]],"override":["define",{"sourceInterval":[10077,10106]},null,[],["seq",{"sourceInterval":[10088,10106]},["terminal",{"sourceInterval":[10088,10098]},"override"],["not",{"sourceInterval":[10099,10106]},["app",{"sourceInterval":[10100,10106]},"idPart",[]]]]],"inline":["define",{"sourceInterval":[10111,10136]},null,[],["seq",{"sourceInterval":[10120,10136]},["terminal",{"sourceInterval":[10120,10128]},"inline"],["not",{"sourceInterval":[10129,10136]},["app",{"sourceInterval":[10130,10136]},"idPart",[]]]]],"const":["define",{"sourceInterval":[10141,10164]},null,[],["seq",{"sourceInterval":[10149,10164]},["terminal",{"sourceInterval":[10149,10156]},"const"],["not",{"sourceInterval":[10157,10164]},["app",{"sourceInterval":[10158,10164]},"idPart",[]]]]],"abstract":["define",{"sourceInterval":[10169,10198]},null,[],["seq",{"sourceInterval":[10180,10198]},["terminal",{"sourceInterval":[10180,10190]},"abstract"],["not",{"sourceInterval":[10191,10198]},["app",{"sourceInterval":[10192,10198]},"idPart",[]]]]],"nameAttribute":["define",{"sourceInterval":[10222,10245]},null,[],["terminal",{"sourceInterval":[10238,10245]},"@name"]],"reservedWord":["define",{"sourceInterval":[10267,10289]},null,[],["app",{"sourceInterval":[10282,10289]},"keyword",[]]],"space":["extend",{"sourceInterval":[10311,10344]},null,[],["alt",{"sourceInterval":[10320,10344]},["app",{"sourceInterval":[10320,10327]},"comment",[]],["app",{"sourceInterval":[10330,10344]},"lineTerminator",[]]]],"comment":["define",{"sourceInterval":[10349,10395]},null,[],["alt",{"sourceInterval":[10359,10395]},["app",{"sourceInterval":[10359,10375]},"multiLineComment",[]],["app",{"sourceInterval":[10378,10395]},"singleLineComment",[]]]],"lineTerminator":["define",{"sourceInterval":[10400,10450]},null,[],["alt",{"sourceInterval":[10417,10450]},["terminal",{"sourceInterval":[10417,10421]},"\n"],["terminal",{"sourceInterval":[10424,10428]},"\r"],["terminal",{"sourceInterval":[10431,10439]},"\u2028"],["terminal",{"sourceInterval":[10442,10450]},"\u2029"]]],"multiLineComment":["define",{"sourceInterval":[10455,10496]},null,[],["seq",{"sourceInterval":[10474,10496]},["terminal",{"sourceInterval":[10474,10478]},"/*"],["star",{"sourceInterval":[10479,10491]},["seq",{"sourceInterval":[10480,10489]},["not",{"sourceInterval":[10480,10485]},["terminal",{"sourceInterval":[10481,10485]},"*/"]],["app",{"sourceInterval":[10486,10489]},"any",[]]]],["terminal",{"sourceInterval":[10492,10496]},"*/"]]],"singleLineComment":["define",{"sourceInterval":[10501,10548]},null,[],["seq",{"sourceInterval":[10521,10548]},["terminal",{"sourceInterval":[10521,10525]},"//"],["star",{"sourceInterval":[10526,10548]},["seq",{"sourceInterval":[10527,10546]},["not",{"sourceInterval":[10527,10542]},["app",{"sourceInterval":[10528,10542]},"lineTerminator",[]]],["app",{"sourceInterval":[10543,10546]},"any",[]]]]]]}]);module.exports=result; \ No newline at end of file diff --git a/src/test/feature-integer-literals.spec.ts b/src/test/feature-integer-literals.spec.ts new file mode 100644 index 000000000..efb14c0b8 --- /dev/null +++ b/src/test/feature-integer-literals.spec.ts @@ -0,0 +1,28 @@ +import { toNano } from 'ton-core'; +import { ContractSystem } from '@tact-lang/emulator'; +import { __DANGER_resetNodeId } from '../grammar/ast'; +import { IntegerLiteralsTester } from './features/output/integer-literals_IntegerLiteralsTester'; + +describe('feature-integer-literals', () => { + beforeEach(() => { + __DANGER_resetNodeId(); + }); + it('should implement integer literals correctly', async () => { + // Init + let system = await ContractSystem.create(); + let treasure = system.treasure('treasure'); + let contract = system.open(await IntegerLiteralsTester.fromInit()); + await contract.send(treasure, { value: toNano('10') }, null); + await system.run(); + + // Check methods + expect(await contract.getDecLiteral1()).toEqual(123n); + expect(await contract.getDecLiteral2()).toEqual(-123n); + + expect(await contract.getHexLiteral1()).toEqual(0x123n); + expect(await contract.getHexLiteral2()).toEqual(-0x123n); + + expect(await contract.getBinLiteral1()).toEqual(0b101010n); + expect(await contract.getBinLiteral2()).toEqual(-0b101010n); + }); +}); diff --git a/src/test/features/integer-literals.tact b/src/test/features/integer-literals.tact new file mode 100644 index 000000000..fcf4d5bff --- /dev/null +++ b/src/test/features/integer-literals.tact @@ -0,0 +1,34 @@ +contract IntegerLiteralsTester { + + init() { + + } + + receive() { + // Deploy + } + + get fun decLiteral1(): Int { + return 123; + } + + get fun decLiteral2(): Int { + return -123; + } + + get fun hexLiteral1(): Int { + return 0x123; + } + + get fun hexLiteral2(): Int { + return -0x123; + } + + get fun binLiteral1(): Int { + return 0b101010; + } + + get fun binLiteral2(): Int { + return -0b101010; + } +} \ No newline at end of file diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.abi b/src/test/features/output/integer-literals_IntegerLiteralsTester.abi new file mode 100644 index 000000000..8952bb3b9 --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.abi @@ -0,0 +1 @@ +{"name":"IntegerLiteralsTester","types":[{"name":"StateInit","header":null,"fields":[{"name":"code","type":{"kind":"simple","type":"cell","optional":false}},{"name":"data","type":{"kind":"simple","type":"cell","optional":false}}]},{"name":"Context","header":null,"fields":[{"name":"bounced","type":{"kind":"simple","type":"bool","optional":false}},{"name":"sender","type":{"kind":"simple","type":"address","optional":false}},{"name":"value","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"raw","type":{"kind":"simple","type":"slice","optional":false}}]},{"name":"SendParameters","header":null,"fields":[{"name":"bounce","type":{"kind":"simple","type":"bool","optional":false}},{"name":"to","type":{"kind":"simple","type":"address","optional":false}},{"name":"value","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"mode","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"body","type":{"kind":"simple","type":"cell","optional":true}},{"name":"code","type":{"kind":"simple","type":"cell","optional":true}},{"name":"data","type":{"kind":"simple","type":"cell","optional":true}}]}],"receivers":[{"receiver":"internal","message":{"kind":"empty"}}],"getters":[{"name":"decLiteral1","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"decLiteral2","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"hexLiteral1","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"hexLiteral2","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"binLiteral1","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"binLiteral2","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}}],"errors":{"2":{"message":"Stack undeflow"},"3":{"message":"Stack overflow"},"4":{"message":"Integer overflow"},"5":{"message":"Integer out of expected range"},"6":{"message":"Invalid opcode"},"7":{"message":"Type check error"},"8":{"message":"Cell overflow"},"9":{"message":"Cell underflow"},"10":{"message":"Dictionary error"},"13":{"message":"Out of gas error"},"32":{"message":"Method ID not found"},"34":{"message":"Action is invalid or not supported"},"37":{"message":"Not enough TON"},"38":{"message":"Not enough extra-currencies"},"128":{"message":"Null reference exception"},"129":{"message":"Invalid serialization prefix"},"130":{"message":"Invalid incoming message"},"131":{"message":"Constraints error"},"132":{"message":"Access denied"},"133":{"message":"Contract stopped"},"134":{"message":"Invalid argument"},"135":{"message":"Code of a contract was not found"},"136":{"message":"Invalid address"},"137":{"message":"Masterchain support is not enabled for this contract"}},"interfaces":["org.ton.introspection.v0","org.ton.abi.ipfs.v0","org.ton.deploy.lazy.v0","org.ton.debug.v0","org.ton.chain.workchain.v0"]} \ No newline at end of file diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.code.boc b/src/test/features/output/integer-literals_IntegerLiteralsTester.code.boc new file mode 100644 index 000000000..7b671de23 Binary files /dev/null and b/src/test/features/output/integer-literals_IntegerLiteralsTester.code.boc differ diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.code.fc b/src/test/features/output/integer-literals_IntegerLiteralsTester.code.fc new file mode 100644 index 000000000..3cd757b79 --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.code.fc @@ -0,0 +1,162 @@ +#pragma version =0.4.3; +#pragma allow-post-modification; +#pragma compute-asm-ltr; + +#include "integer-literals_IntegerLiteralsTester.headers.fc"; +#include "integer-literals_IntegerLiteralsTester.stdlib.fc"; +#include "integer-literals_IntegerLiteralsTester.storage.fc"; + +;; +;; Contract IntegerLiteralsTester functions +;; + +tuple $IntegerLiteralsTester$_contract_init() impure inline_ref { + tuple $self = null(); + return $self; +} + +(tuple, int) $IntegerLiteralsTester$_fun_decLiteral1(tuple $self) impure inline_ref { + var ($self) = $self; + return ($self, 123); +} + +(tuple, int) $IntegerLiteralsTester$_fun_decLiteral2(tuple $self) impure inline_ref { + var ($self) = $self; + return ($self, (- 123)); +} + +(tuple, int) $IntegerLiteralsTester$_fun_hexLiteral1(tuple $self) impure inline_ref { + var ($self) = $self; + return ($self, 291); +} + +(tuple, int) $IntegerLiteralsTester$_fun_hexLiteral2(tuple $self) impure inline_ref { + var ($self) = $self; + return ($self, (- 291)); +} + +(tuple, int) $IntegerLiteralsTester$_fun_binLiteral1(tuple $self) impure inline_ref { + var ($self) = $self; + return ($self, 42); +} + +(tuple, int) $IntegerLiteralsTester$_fun_binLiteral2(tuple $self) impure inline_ref { + var ($self) = $self; + return ($self, (- 42)); +} + +;; +;; Receivers of a Contract IntegerLiteralsTester +;; + +((tuple), ()) %$IntegerLiteralsTester$_internal_empty(tuple $self) impure inline { + var $self = $self; + return ($self, ()); +} + +;; +;; Get methods of a Contract IntegerLiteralsTester +;; + +_ %decLiteral1() method_id(102042) { + var self = $IntegerLiteralsTester$_contract_load(); + var res = self~$IntegerLiteralsTester$_fun_decLiteral1(); + return res; +} + +_ %decLiteral2() method_id(114425) { + var self = $IntegerLiteralsTester$_contract_load(); + var res = self~$IntegerLiteralsTester$_fun_decLiteral2(); + return res; +} + +_ %hexLiteral1() method_id(76310) { + var self = $IntegerLiteralsTester$_contract_load(); + var res = self~$IntegerLiteralsTester$_fun_hexLiteral1(); + return res; +} + +_ %hexLiteral2() method_id(72309) { + var self = $IntegerLiteralsTester$_contract_load(); + var res = self~$IntegerLiteralsTester$_fun_hexLiteral2(); + return res; +} + +_ %binLiteral1() method_id(116259) { + var self = $IntegerLiteralsTester$_contract_load(); + var res = self~$IntegerLiteralsTester$_fun_binLiteral1(); + return res; +} + +_ %binLiteral2() method_id(128576) { + var self = $IntegerLiteralsTester$_contract_load(); + var res = self~$IntegerLiteralsTester$_fun_binLiteral2(); + return res; +} + +_ supported_interfaces() method_id { + return ( + "org.ton.introspection.v0"H >> 128, + "org.ton.abi.ipfs.v0"H >> 128, + "org.ton.deploy.lazy.v0"H >> 128, + "org.ton.debug.v0"H >> 128, + "org.ton.chain.workchain.v0"H >> 128 + ); +} + +_ get_abi_ipfs() method_id { + return "ipfs://QmVmyo6powuj49BDo3NwkUwouAXS9zFRRcZ6drqt3LUcot"; +} + +_ lazy_deployment_completed() method_id { + return get_data().begin_parse().load_int(1); +} + +;; +;; Routing of a Contract IntegerLiteralsTester +;; + +(tuple, int) $IntegerLiteralsTester$_contract_router_internal(tuple self, int msg_bounced, slice in_msg) impure inline_ref { + ;; Handle bounced messages + if (msg_bounced) { + return (self, true); + } + + ;; Parse incoming message + int op = 0; + if (slice_bits(in_msg) >= 32) { + op = in_msg.preload_uint(32); + } + + + ;; Receive empty message + if ((op == 0) & (slice_bits(in_msg) <= 32)) { + self~%$IntegerLiteralsTester$_internal_empty(); + return (self, true); + } + + return (self, false); +} + +() recv_internal(int msg_value, cell in_msg_cell, slice in_msg) impure { + + ;; Context + var cs = in_msg_cell.begin_parse(); + var msg_flags = cs~load_uint(4); + var msg_bounced = -(msg_flags & 1); + slice msg_sender_addr = __tact_verify_address(cs~load_msg_addr()); + __tact_context = (msg_bounced, msg_sender_addr, msg_value, cs); + __tact_context_sender = msg_sender_addr; + + ;; Load contract data + var self = $IntegerLiteralsTester$_contract_load(); + + ;; Handle operation + int handled = self~$IntegerLiteralsTester$_contract_router_internal(msg_bounced, in_msg); + + ;; Throw if not handled + throw_unless(130, handled); + + ;; Persist state + $IntegerLiteralsTester$_contract_store(self); +} diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.code.fif b/src/test/features/output/integer-literals_IntegerLiteralsTester.code.fif new file mode 100644 index 000000000..c76a3ee0a --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.code.fif @@ -0,0 +1,193 @@ +PROGRAM{ + DECLPROC __tact_verify_address + DECLPROC $IntegerLiteralsTester$_contract_init + DECLPROC $IntegerLiteralsTester$_contract_load + DECLPROC $IntegerLiteralsTester$_contract_store + DECLPROC $IntegerLiteralsTester$_fun_decLiteral1 + DECLPROC $IntegerLiteralsTester$_fun_decLiteral2 + DECLPROC $IntegerLiteralsTester$_fun_hexLiteral1 + DECLPROC $IntegerLiteralsTester$_fun_hexLiteral2 + DECLPROC $IntegerLiteralsTester$_fun_binLiteral1 + DECLPROC $IntegerLiteralsTester$_fun_binLiteral2 + DECLPROC %$IntegerLiteralsTester$_internal_empty + 102042 DECLMETHOD %decLiteral1 + 114425 DECLMETHOD %decLiteral2 + 76310 DECLMETHOD %hexLiteral1 + 72309 DECLMETHOD %hexLiteral2 + 116259 DECLMETHOD %binLiteral1 + 128576 DECLMETHOD %binLiteral2 + 113617 DECLMETHOD supported_interfaces + 121275 DECLMETHOD get_abi_ipfs + 115390 DECLMETHOD lazy_deployment_completed + DECLPROC $IntegerLiteralsTester$_contract_router_internal + DECLPROC recv_internal + DECLGLOBVAR __tact_context + DECLGLOBVAR __tact_context_sender + DECLGLOBVAR __tact_context_sys + DECLGLOBVAR __tact_randomized + __tact_verify_address PROCINLINE:<{ + DUP + SBITS + 267 PUSHINT + EQUAL + 136 THROWIFNOT + DUP + 11 PLDU + DUP + 1279 PUSHINT + EQUAL + 137 THROWIF + 10 PUSHPOW2 + EQUAL + 136 THROWIFNOT + }> + $IntegerLiteralsTester$_contract_init PROCREF:<{ + PUSHNULL + }> + $IntegerLiteralsTester$_contract_load PROCREF:<{ + c4 PUSH + CTOS + LDREF + SWAP + __tact_context_sys SETGLOB + 1 LDI + DROP + IFJMP:<{ + PUSHNULL + }> + MYADDR + 11 PLDU + 10 PUSHPOW2 + EQUAL + 137 THROWIFNOT + $IntegerLiteralsTester$_contract_init INLINECALLDICT + }> + $IntegerLiteralsTester$_contract_store PROCINLINE:<{ + DROP + NEWC + __tact_context_sys GETGLOB + SWAP + STREF + TRUE + SWAP + 1 STI + ENDC + c4 POP + }> + $IntegerLiteralsTester$_fun_decLiteral1 PROCREF:<{ + 123 PUSHINT + }> + $IntegerLiteralsTester$_fun_decLiteral2 PROCREF:<{ + -123 PUSHINT + }> + $IntegerLiteralsTester$_fun_hexLiteral1 PROCREF:<{ + 291 PUSHINT + }> + $IntegerLiteralsTester$_fun_hexLiteral2 PROCREF:<{ + -291 PUSHINT + }> + $IntegerLiteralsTester$_fun_binLiteral1 PROCREF:<{ + 42 PUSHINT + }> + $IntegerLiteralsTester$_fun_binLiteral2 PROCREF:<{ + -42 PUSHINT + }> + %$IntegerLiteralsTester$_internal_empty PROCINLINE:<{ + }> + %decLiteral1 PROC:<{ + $IntegerLiteralsTester$_contract_load INLINECALLDICT + $IntegerLiteralsTester$_fun_decLiteral1 INLINECALLDICT + NIP + }> + %decLiteral2 PROC:<{ + $IntegerLiteralsTester$_contract_load INLINECALLDICT + $IntegerLiteralsTester$_fun_decLiteral2 INLINECALLDICT + NIP + }> + %hexLiteral1 PROC:<{ + $IntegerLiteralsTester$_contract_load INLINECALLDICT + $IntegerLiteralsTester$_fun_hexLiteral1 INLINECALLDICT + NIP + }> + %hexLiteral2 PROC:<{ + $IntegerLiteralsTester$_contract_load INLINECALLDICT + $IntegerLiteralsTester$_fun_hexLiteral2 INLINECALLDICT + NIP + }> + %binLiteral1 PROC:<{ + $IntegerLiteralsTester$_contract_load INLINECALLDICT + $IntegerLiteralsTester$_fun_binLiteral1 INLINECALLDICT + NIP + }> + %binLiteral2 PROC:<{ + $IntegerLiteralsTester$_contract_load INLINECALLDICT + $IntegerLiteralsTester$_fun_binLiteral2 INLINECALLDICT + NIP + }> + supported_interfaces PROC:<{ + 123515602279859691144772641439386770278 PUSHINT + 209801025412363888721030803524359905849 PUSHINT + 42980537499636128163026532310500881091 PUSHINT + 36993126140238121407019133875791708966 PUSHINT + 209474421377847335869795010607481022628 PUSHINT + }> + get_abi_ipfs PROC:<{ + x{697066733a2f2f516d566d796f36706f77756a343942446f334e776b55776f75415853397a465252635a3664727174334c55636f74} PUSHSLICE + }> + lazy_deployment_completed PROC:<{ + c4 PUSH + CTOS + 1 LDI + SWAP + }> + $IntegerLiteralsTester$_contract_router_internal PROCREF:<{ + SWAP + IFJMP:<{ + DROP + TRUE + }> + 0 PUSHINT + OVER + SBITS + 31 GTINT + IF:<{ + DROP + DUP + 32 PLDU + }> + 0 EQINT + SWAP + SBITS + 33 LESSINT + AND + IFJMP:<{ + %$IntegerLiteralsTester$_internal_empty INLINECALLDICT + TRUE + }> + FALSE + }> + recv_internal PROC:<{ + SWAP + CTOS + 4 LDU + SWAP + 1 PUSHINT + AND + NEGATE + SWAP + LDMSGADDR + SWAP + __tact_verify_address INLINECALLDICT + s0 s4 s2 PUXCPU + s0 s3 XCHG + 4 TUPLE + __tact_context SETGLOB + s0 s2 XCHG + __tact_context_sender SETGLOB + $IntegerLiteralsTester$_contract_load INLINECALLDICT + -ROT + $IntegerLiteralsTester$_contract_router_internal INLINECALLDICT + 130 THROWIFNOT + $IntegerLiteralsTester$_contract_store INLINECALLDICT + }> +}END>c diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.code.rev.fif b/src/test/features/output/integer-literals_IntegerLiteralsTester.code.rev.fif new file mode 100644 index 000000000..d94dd5fe9 --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.code.rev.fif @@ -0,0 +1,181 @@ +PROGRAM{ + DECLPROC recv_internal; + DECLPROC ?fun_72309; + DECLPROC ?fun_76310; + DECLPROC ?fun_102042; + DECLPROC supported_interfaces; + DECLPROC ?fun_114425; + DECLPROC lazy_deployment_completed; + DECLPROC ?fun_116259; + DECLPROC get_abi_ipfs; + DECLPROC ?fun_128576; + DECLPROC ?fun_ref_026cdd3ff17e82bb; + DECLPROC ?fun_ref_26dd4850c2973b9d; + DECLPROC ?fun_ref_32a8f017ec2ceafb; + DECLPROC ?fun_ref_364de9562794919e; + DECLPROC ?fun_ref_4065f3bb1951fe13; + DECLPROC ?fun_ref_553f7869b01170d9; + DECLPROC ?fun_ref_7a4cfefa28b39727; + DECLPROC ?fun_ref_a05e0042bce184fb; + DECLPROC ?fun_ref_c0ca23818e24f3c9; + recv_internal PROC:<{ + s0 s1 XCHG + CTOS + 4 LDU + s0 s1 XCHG + 1 PUSHINT + AND + -1 MULCONST + s0 s1 XCHG + LDMSGADDR + s0 s1 XCHG + s0 PUSH + SBITS + 267 PUSHINT + EQUAL + 136 THROWIFNOT + s0 PUSH + 11 PLDU + s0 PUSH + 1279 PUSHINT + EQUAL + 137 THROWIF + 10 PUSHPOW2 + EQUAL + 136 THROWIFNOT + s0 s6 s4 PUXCPU + s0 s3 XCHG + 4 TUPLE + 1 SETGLOBVAR + s0 s2 XCHG + 2 SETGLOBVAR + ?fun_ref_a05e0042bce184fb INLINECALLDICT + ROTREV + ?fun_ref_364de9562794919e INLINECALLDICT + 130 THROWIFNOT + s0 POP + NEWC + 3 GETGLOBVAR + s0 s1 XCHG + STREF + -1 PUSHINT + s0 s1 XCHG + 1 STI + ENDC + c4 POP + }> + ?fun_72309 PROC:<{ + ?fun_ref_a05e0042bce184fb INLINECALLDICT + ?fun_ref_26dd4850c2973b9d INLINECALLDICT + s1 POP + }> + ?fun_76310 PROC:<{ + ?fun_ref_a05e0042bce184fb INLINECALLDICT + ?fun_ref_7a4cfefa28b39727 INLINECALLDICT + s1 POP + }> + ?fun_102042 PROC:<{ + ?fun_ref_a05e0042bce184fb INLINECALLDICT + ?fun_ref_553f7869b01170d9 INLINECALLDICT + s1 POP + }> + supported_interfaces PROC:<{ + 123515602279859691144772641439386770278 PUSHINT + 209801025412363888721030803524359905849 PUSHINT + 42980537499636128163026532310500881091 PUSHINT + 36993126140238121407019133875791708966 PUSHINT + 209474421377847335869795010607481022628 PUSHINT + }> + ?fun_114425 PROC:<{ + ?fun_ref_a05e0042bce184fb INLINECALLDICT + ?fun_ref_32a8f017ec2ceafb INLINECALLDICT + s1 POP + }> + lazy_deployment_completed PROC:<{ + c4 PUSH + CTOS + 1 LDI + s0 s1 XCHG + }> + ?fun_116259 PROC:<{ + ?fun_ref_a05e0042bce184fb INLINECALLDICT + ?fun_ref_026cdd3ff17e82bb INLINECALLDICT + s1 POP + }> + get_abi_ipfs PROC:<{ + x{697066733A2F2F516D566D796F36706F77756A343942446F334E776B55776F75415853397A465252635A3664727174334C55636F7482_} PUSHSLICE + }> + ?fun_128576 PROC:<{ + ?fun_ref_a05e0042bce184fb INLINECALLDICT + ?fun_ref_4065f3bb1951fe13 INLINECALLDICT + s1 POP + }> + ?fun_ref_026cdd3ff17e82bb PROCREF:<{ + 42 PUSHINT + }> + ?fun_ref_26dd4850c2973b9d PROCREF:<{ + -291 PUSHINT + }> + ?fun_ref_32a8f017ec2ceafb PROCREF:<{ + -123 PUSHINT + }> + ?fun_ref_364de9562794919e PROCREF:<{ + s0 s1 XCHG + <{ + s0 POP + -1 PUSHINT + }> PUSHCONT + IFJMP + 0 PUSHINT + s1 PUSH + SBITS + 31 GTINT + <{ + s0 POP + s0 PUSH + 32 PLDU + }> PUSHCONT + IF + 0 EQINT + s0 s1 XCHG + SBITS + 33 LESSINT + AND + <{ + -1 PUSHINT + }> PUSHCONT + IFJMP + 0 PUSHINT + }> + ?fun_ref_4065f3bb1951fe13 PROCREF:<{ + -42 PUSHINT + }> + ?fun_ref_553f7869b01170d9 PROCREF:<{ + 123 PUSHINT + }> + ?fun_ref_7a4cfefa28b39727 PROCREF:<{ + 291 PUSHINT + }> + ?fun_ref_a05e0042bce184fb PROCREF:<{ + c4 PUSH + CTOS + LDREF + s0 s1 XCHG + 3 SETGLOBVAR + 1 LDI + s0 POP + <{ + NULL + }> PUSHCONT + IFJMP + MYADDR + 11 PLDU + 10 PUSHPOW2 + EQUAL + 137 THROWIFNOT + ?fun_ref_c0ca23818e24f3c9 INLINECALLDICT + }> + ?fun_ref_c0ca23818e24f3c9 PROCREF:<{ + NULL + }> +}END>c \ No newline at end of file diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.headers.fc b/src/test/features/output/integer-literals_IntegerLiteralsTester.headers.fc new file mode 100644 index 000000000..212cd1070 --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.headers.fc @@ -0,0 +1,34 @@ +;; +;; Header files for IntegerLiteralsTester +;; NOTE: declarations are sorted for optimal order +;; + +;; __tact_verify_address +slice __tact_verify_address(slice address) inline; + +;; $IntegerLiteralsTester$_contract_init +tuple $IntegerLiteralsTester$_contract_init() impure inline_ref; + +;; $IntegerLiteralsTester$_contract_load +tuple $IntegerLiteralsTester$_contract_load() impure inline_ref; + +;; $IntegerLiteralsTester$_contract_store +() $IntegerLiteralsTester$_contract_store(tuple v) impure inline; + +;; $IntegerLiteralsTester$_fun_decLiteral1 +(tuple, int) $IntegerLiteralsTester$_fun_decLiteral1(tuple $self) impure inline_ref; + +;; $IntegerLiteralsTester$_fun_decLiteral2 +(tuple, int) $IntegerLiteralsTester$_fun_decLiteral2(tuple $self) impure inline_ref; + +;; $IntegerLiteralsTester$_fun_hexLiteral1 +(tuple, int) $IntegerLiteralsTester$_fun_hexLiteral1(tuple $self) impure inline_ref; + +;; $IntegerLiteralsTester$_fun_hexLiteral2 +(tuple, int) $IntegerLiteralsTester$_fun_hexLiteral2(tuple $self) impure inline_ref; + +;; $IntegerLiteralsTester$_fun_binLiteral1 +(tuple, int) $IntegerLiteralsTester$_fun_binLiteral1(tuple $self) impure inline_ref; + +;; $IntegerLiteralsTester$_fun_binLiteral2 +(tuple, int) $IntegerLiteralsTester$_fun_binLiteral2(tuple $self) impure inline_ref; diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.md b/src/test/features/output/integer-literals_IntegerLiteralsTester.md new file mode 100644 index 000000000..d2eb7aff4 --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.md @@ -0,0 +1,59 @@ +# TACT Compilation Report +Contract: IntegerLiteralsTester +BOC Size: 472 bytes + +# Types +Total Types: 3 + +## StateInit +TLB: `_ code:^cell data:^cell = StateInit` +Signature: `StateInit{code:^cell,data:^cell}` + +## Context +TLB: `_ bounced:bool sender:address value:int257 raw:^slice = Context` +Signature: `Context{bounced:bool,sender:address,value:int257,raw:^slice}` + +## SendParameters +TLB: `_ bounce:bool to:address value:int257 mode:int257 body:Maybe ^cell code:Maybe ^cell data:Maybe ^cell = SendParameters` +Signature: `SendParameters{bounce:bool,to:address,value:int257,mode:int257,body:Maybe ^cell,code:Maybe ^cell,data:Maybe ^cell}` + +# Get Methods +Total Get Methods: 6 + +## decLiteral1 + +## decLiteral2 + +## hexLiteral1 + +## hexLiteral2 + +## binLiteral1 + +## binLiteral2 + +# Error Codes +2: Stack undeflow +3: Stack overflow +4: Integer overflow +5: Integer out of expected range +6: Invalid opcode +7: Type check error +8: Cell overflow +9: Cell underflow +10: Dictionary error +13: Out of gas error +32: Method ID not found +34: Action is invalid or not supported +37: Not enough TON +38: Not enough extra-currencies +128: Null reference exception +129: Invalid serialization prefix +130: Invalid incoming message +131: Constraints error +132: Access denied +133: Contract stopped +134: Invalid argument +135: Code of a contract was not found +136: Invalid address +137: Masterchain support is not enabled for this contract \ No newline at end of file diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.pkg b/src/test/features/output/integer-literals_IntegerLiteralsTester.pkg new file mode 100644 index 000000000..11bef1f0a --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.pkg @@ -0,0 +1 @@ +{"name":"IntegerLiteralsTester","code":"te6ccgECHQEAAcwAART/APSkE/S88sgLAQIBYgIDApLQAdDTAwFxsKMB+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiFRQUwNvBPhhAvhi2zxZ2zzy4IIwyPhDAcx/AcoAye1UGgQCASAFBgA8AZIwf+BwIddJwh+VMCDXCx/ewAAB10nBIbCRf+BwAgFIBwgCASALDAIPt067Z5tnhjAaCQIPtULbZ5tnhjAaCgAGgf7dAAaBASMCASANDgIBIBMUAg+101tnm2eGMBoPAgFuEBEABIB7ALir0YJwXOw9XSyuex6E7DnWSoUbZoJwndY1LStkfLMi068t/fFiOYJwIFXAG4BnY5TOWDquRyWyw4JwG9Sd75VFlvHHU9PeBVnDJoJwnZdOWrNOy3M6DpZtlGbopAIOqvnbPNs8MRoSAASAhQIBIBUWAg+2yBtnm2eGMBobAgFIFxgAdbJu40NWlwZnM6Ly9RbVZteW82cG93dWo0OUJEbzNOd2tVd291QVhTOXpGUlJjWjZkcnF0M0xVY290ggABCqvu1E0NIAAQIOqiPbPNs8MRoZAASAKgE07UTQ1AH4Y9IAMJFt4Pgo1wsKgwm68uCJ2zwcAASA1gACbQ==","abi":"{\"name\":\"IntegerLiteralsTester\",\"types\":[{\"name\":\"StateInit\",\"header\":null,\"fields\":[{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}}]},{\"name\":\"Context\",\"header\":null,\"fields\":[{\"name\":\"bounced\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"sender\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"raw\",\"type\":{\"kind\":\"simple\",\"type\":\"slice\",\"optional\":false}}]},{\"name\":\"SendParameters\",\"header\":null,\"fields\":[{\"name\":\"bounce\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"to\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"mode\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"body\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}}]}],\"receivers\":[{\"receiver\":\"internal\",\"message\":{\"kind\":\"empty\"}}],\"getters\":[{\"name\":\"decLiteral1\",\"arguments\":[],\"returnType\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"decLiteral2\",\"arguments\":[],\"returnType\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"hexLiteral1\",\"arguments\":[],\"returnType\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"hexLiteral2\",\"arguments\":[],\"returnType\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"binLiteral1\",\"arguments\":[],\"returnType\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"binLiteral2\",\"arguments\":[],\"returnType\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}}],\"errors\":{\"2\":{\"message\":\"Stack undeflow\"},\"3\":{\"message\":\"Stack overflow\"},\"4\":{\"message\":\"Integer overflow\"},\"5\":{\"message\":\"Integer out of expected range\"},\"6\":{\"message\":\"Invalid opcode\"},\"7\":{\"message\":\"Type check error\"},\"8\":{\"message\":\"Cell overflow\"},\"9\":{\"message\":\"Cell underflow\"},\"10\":{\"message\":\"Dictionary error\"},\"13\":{\"message\":\"Out of gas error\"},\"32\":{\"message\":\"Method ID not found\"},\"34\":{\"message\":\"Action is invalid or not supported\"},\"37\":{\"message\":\"Not enough TON\"},\"38\":{\"message\":\"Not enough extra-currencies\"},\"128\":{\"message\":\"Null reference exception\"},\"129\":{\"message\":\"Invalid serialization prefix\"},\"130\":{\"message\":\"Invalid incoming message\"},\"131\":{\"message\":\"Constraints error\"},\"132\":{\"message\":\"Access denied\"},\"133\":{\"message\":\"Contract stopped\"},\"134\":{\"message\":\"Invalid argument\"},\"135\":{\"message\":\"Code of a contract was not found\"},\"136\":{\"message\":\"Invalid address\"},\"137\":{\"message\":\"Masterchain support is not enabled for this contract\"}},\"interfaces\":[\"org.ton.introspection.v0\",\"org.ton.abi.ipfs.v0\",\"org.ton.deploy.lazy.v0\",\"org.ton.debug.v0\",\"org.ton.chain.workchain.v0\"]}","init":{"kind":"direct","args":[],"prefix":{"bits":1,"value":0},"deployment":{"kind":"system-cell","system":"te6cckECHwEAAdYAAQHAAQEFobyzAgEU/wD0pBP0vPLICwMCAWIbBAIBIBYFAgEgDwYCASAJBwIPtsgbZ5tnhjAdCAAEgNYCASALCgB1sm7jQ1aXBmczovL1FtVm15bzZwb3d1ajQ5QkRvM053a1V3b3VBWFM5ekZSUmNaNmRycXQzTFVjb3SCACAUgODAIOqiPbPNs8MR0NAASAKgAQqr7tRNDSAAECASAUEAIBbhMRAg6q+ds82zwxHRIABICFALir0YJwXOw9XSyuex6E7DnWSoUbZoJwndY1LStkfLMi068t/fFiOYJwIFXAG4BnY5TOWDquRyWyw4JwG9Sd75VFlvHHU9PeBVnDJoJwnZdOWrNOy3M6DpZtlGbopAIPtdNbZ5tnhjAdFQAEgHsCAUgZFwIPtULbZ5tnhjAdGAAGgQEjAg+3Trtnm2eGMB0aAAaB/t0CktAB0NMDAXGwowH6QAEg10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIVFBTA28E+GEC+GLbPFnbPPLggjDI+EMBzH8BygDJ7VQdHAA8AZIwf+BwIddJwh+VMCDXCx/ewAAB10nBIbCRf+BwATTtRNDUAfhj0gAwkW3g+CjXCwqDCbry4InbPB4AAm0QTcC0"}},"sources":{"src/test/features/integer-literals.tact":"Y29udHJhY3QgSW50ZWdlckxpdGVyYWxzVGVzdGVyIHsKCiAgICBpbml0KCkgewogICAgICAgIAogICAgfQogICAgCiAgICByZWNlaXZlKCkgewogICAgICAgIC8vIERlcGxveQogICAgfQoKICAgIGdldCBmdW4gZGVjTGl0ZXJhbDEoKTogSW50IHsKICAgICAgICByZXR1cm4gMTIzOwogICAgfQoKICAgIGdldCBmdW4gZGVjTGl0ZXJhbDIoKTogSW50IHsKICAgICAgICByZXR1cm4gLTEyMzsKICAgIH0KCiAgICBnZXQgZnVuIGhleExpdGVyYWwxKCk6IEludCB7CiAgICAgICAgcmV0dXJuIDB4MTIzOwogICAgfQoKICAgIGdldCBmdW4gaGV4TGl0ZXJhbDIoKTogSW50IHsKICAgICAgICByZXR1cm4gLTB4MTIzOwogICAgfQoKICAgIGdldCBmdW4gYmluTGl0ZXJhbDEoKTogSW50IHsKICAgICAgICByZXR1cm4gMGIxMDEwMTA7CiAgICB9CgogICAgZ2V0IGZ1biBiaW5MaXRlcmFsMigpOiBJbnQgewogICAgICAgIHJldHVybiAtMGIxMDEwMTA7CiAgICB9Cn0="},"compiler":{"name":"tact","version":"invalid","parameters":"{\"entrypoint\":\"./src/test/features/integer-literals.tact\",\"options\":{\"debug\":true}}"}} \ No newline at end of file diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.stdlib.fc b/src/test/features/output/integer-literals_IntegerLiteralsTester.stdlib.fc new file mode 100644 index 000000000..b987818a0 --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.stdlib.fc @@ -0,0 +1,12 @@ +global (int, slice, int, slice) __tact_context; +global slice __tact_context_sender; +global cell __tact_context_sys; +global int __tact_randomized; + +slice __tact_verify_address(slice address) inline { + throw_unless(136, address.slice_bits() == 267); + var h = address.preload_uint(11); + throw_if(137, h == 1279); + throw_unless(136, h == 1024); + return address; +} \ No newline at end of file diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.storage.fc b/src/test/features/output/integer-literals_IntegerLiteralsTester.storage.fc new file mode 100644 index 000000000..fd570364f --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.storage.fc @@ -0,0 +1,23 @@ +;; +;; Type: IntegerLiteralsTester +;; + +tuple $IntegerLiteralsTester$_contract_load() impure inline_ref { + slice $sc = get_data().begin_parse(); + __tact_context_sys = $sc~load_ref(); + int $loaded = $sc~load_int(1); + if ($loaded) { + return null(); + } else { + ;; Allow only workchain deployments + throw_unless(137, my_address().preload_uint(11) == 1024); + return $IntegerLiteralsTester$_contract_init(); + } +} + +() $IntegerLiteralsTester$_contract_store(tuple v) impure inline { + builder b = begin_cell(); + b = b.store_ref(__tact_context_sys); + b = b.store_int(true, 1); + set_data(b.end_cell()); +} \ No newline at end of file diff --git a/src/test/features/output/integer-literals_IntegerLiteralsTester.ts b/src/test/features/output/integer-literals_IntegerLiteralsTester.ts new file mode 100644 index 000000000..cbac06fe3 --- /dev/null +++ b/src/test/features/output/integer-literals_IntegerLiteralsTester.ts @@ -0,0 +1,344 @@ +import { + Cell, + Slice, + Address, + Builder, + beginCell, + ComputeError, + TupleItem, + TupleReader, + Dictionary, + contractAddress, + ContractProvider, + Sender, + Contract, + ContractABI, + ABIType, + ABIGetter, + ABIReceiver, + TupleBuilder, + DictionaryValue +} from 'ton-core'; + +export type StateInit = { + $$type: 'StateInit'; + code: Cell; + data: Cell; +} + +export function storeStateInit(src: StateInit) { + return (builder: Builder) => { + let b_0 = builder; + b_0.storeRef(src.code); + b_0.storeRef(src.data); + }; +} + +export function loadStateInit(slice: Slice) { + let sc_0 = slice; + let _code = sc_0.loadRef(); + let _data = sc_0.loadRef(); + return { $$type: 'StateInit' as const, code: _code, data: _data }; +} + +function loadTupleStateInit(source: TupleReader) { + let _code = source.readCell(); + let _data = source.readCell(); + return { $$type: 'StateInit' as const, code: _code, data: _data }; +} + +function storeTupleStateInit(source: StateInit) { + let builder = new TupleBuilder(); + builder.writeCell(source.code); + builder.writeCell(source.data); + return builder.build(); +} + +function dictValueParserStateInit(): DictionaryValue { + return { + serialize: (src, buidler) => { + buidler.storeRef(beginCell().store(storeStateInit(src)).endCell()); + }, + parse: (src) => { + return loadStateInit(src.loadRef().beginParse()); + } + } +} + +export type Context = { + $$type: 'Context'; + bounced: boolean; + sender: Address; + value: bigint; + raw: Cell; +} + +export function storeContext(src: Context) { + return (builder: Builder) => { + let b_0 = builder; + b_0.storeBit(src.bounced); + b_0.storeAddress(src.sender); + b_0.storeInt(src.value, 257); + b_0.storeRef(src.raw); + }; +} + +export function loadContext(slice: Slice) { + let sc_0 = slice; + let _bounced = sc_0.loadBit(); + let _sender = sc_0.loadAddress(); + let _value = sc_0.loadIntBig(257); + let _raw = sc_0.loadRef(); + return { $$type: 'Context' as const, bounced: _bounced, sender: _sender, value: _value, raw: _raw }; +} + +function loadTupleContext(source: TupleReader) { + let _bounced = source.readBoolean(); + let _sender = source.readAddress(); + let _value = source.readBigNumber(); + let _raw = source.readCell(); + return { $$type: 'Context' as const, bounced: _bounced, sender: _sender, value: _value, raw: _raw }; +} + +function storeTupleContext(source: Context) { + let builder = new TupleBuilder(); + builder.writeBoolean(source.bounced); + builder.writeAddress(source.sender); + builder.writeNumber(source.value); + builder.writeSlice(source.raw); + return builder.build(); +} + +function dictValueParserContext(): DictionaryValue { + return { + serialize: (src, buidler) => { + buidler.storeRef(beginCell().store(storeContext(src)).endCell()); + }, + parse: (src) => { + return loadContext(src.loadRef().beginParse()); + } + } +} + +export type SendParameters = { + $$type: 'SendParameters'; + bounce: boolean; + to: Address; + value: bigint; + mode: bigint; + body: Cell | null; + code: Cell | null; + data: Cell | null; +} + +export function storeSendParameters(src: SendParameters) { + return (builder: Builder) => { + let b_0 = builder; + b_0.storeBit(src.bounce); + b_0.storeAddress(src.to); + b_0.storeInt(src.value, 257); + b_0.storeInt(src.mode, 257); + if (src.body !== null && src.body !== undefined) { b_0.storeBit(true).storeRef(src.body); } else { b_0.storeBit(false); } + if (src.code !== null && src.code !== undefined) { b_0.storeBit(true).storeRef(src.code); } else { b_0.storeBit(false); } + if (src.data !== null && src.data !== undefined) { b_0.storeBit(true).storeRef(src.data); } else { b_0.storeBit(false); } + }; +} + +export function loadSendParameters(slice: Slice) { + let sc_0 = slice; + let _bounce = sc_0.loadBit(); + let _to = sc_0.loadAddress(); + let _value = sc_0.loadIntBig(257); + let _mode = sc_0.loadIntBig(257); + let _body = sc_0.loadBit() ? sc_0.loadRef() : null; + let _code = sc_0.loadBit() ? sc_0.loadRef() : null; + let _data = sc_0.loadBit() ? sc_0.loadRef() : null; + return { $$type: 'SendParameters' as const, bounce: _bounce, to: _to, value: _value, mode: _mode, body: _body, code: _code, data: _data }; +} + +function loadTupleSendParameters(source: TupleReader) { + let _bounce = source.readBoolean(); + let _to = source.readAddress(); + let _value = source.readBigNumber(); + let _mode = source.readBigNumber(); + let _body = source.readCellOpt(); + let _code = source.readCellOpt(); + let _data = source.readCellOpt(); + return { $$type: 'SendParameters' as const, bounce: _bounce, to: _to, value: _value, mode: _mode, body: _body, code: _code, data: _data }; +} + +function storeTupleSendParameters(source: SendParameters) { + let builder = new TupleBuilder(); + builder.writeBoolean(source.bounce); + builder.writeAddress(source.to); + builder.writeNumber(source.value); + builder.writeNumber(source.mode); + builder.writeCell(source.body); + builder.writeCell(source.code); + builder.writeCell(source.data); + return builder.build(); +} + +function dictValueParserSendParameters(): DictionaryValue { + return { + serialize: (src, buidler) => { + buidler.storeRef(beginCell().store(storeSendParameters(src)).endCell()); + }, + parse: (src) => { + return loadSendParameters(src.loadRef().beginParse()); + } + } +} + + type IntegerLiteralsTester_init_args = { + $$type: 'IntegerLiteralsTester_init_args'; +} + +function initIntegerLiteralsTester_init_args(src: IntegerLiteralsTester_init_args) { + return (builder: Builder) => { + let b_0 = builder; + }; +} + +async function IntegerLiteralsTester_init() { + const __code = Cell.fromBase64('te6ccgECHQEAAcwAART/APSkE/S88sgLAQIBYgIDApLQAdDTAwFxsKMB+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiFRQUwNvBPhhAvhi2zxZ2zzy4IIwyPhDAcx/AcoAye1UGgQCASAFBgA8AZIwf+BwIddJwh+VMCDXCx/ewAAB10nBIbCRf+BwAgFIBwgCASALDAIPt067Z5tnhjAaCQIPtULbZ5tnhjAaCgAGgf7dAAaBASMCASANDgIBIBMUAg+101tnm2eGMBoPAgFuEBEABIB7ALir0YJwXOw9XSyuex6E7DnWSoUbZoJwndY1LStkfLMi068t/fFiOYJwIFXAG4BnY5TOWDquRyWyw4JwG9Sd75VFlvHHU9PeBVnDJoJwnZdOWrNOy3M6DpZtlGbopAIOqvnbPNs8MRoSAASAhQIBIBUWAg+2yBtnm2eGMBobAgFIFxgAdbJu40NWlwZnM6Ly9RbVZteW82cG93dWo0OUJEbzNOd2tVd291QVhTOXpGUlJjWjZkcnF0M0xVY290ggABCqvu1E0NIAAQIOqiPbPNs8MRoZAASAKgE07UTQ1AH4Y9IAMJFt4Pgo1wsKgwm68uCJ2zwcAASA1gACbQ=='); + const __system = Cell.fromBase64('te6cckECHwEAAdYAAQHAAQEFobyzAgEU/wD0pBP0vPLICwMCAWIbBAIBIBYFAgEgDwYCASAJBwIPtsgbZ5tnhjAdCAAEgNYCASALCgB1sm7jQ1aXBmczovL1FtVm15bzZwb3d1ajQ5QkRvM053a1V3b3VBWFM5ekZSUmNaNmRycXQzTFVjb3SCACAUgODAIOqiPbPNs8MR0NAASAKgAQqr7tRNDSAAECASAUEAIBbhMRAg6q+ds82zwxHRIABICFALir0YJwXOw9XSyuex6E7DnWSoUbZoJwndY1LStkfLMi068t/fFiOYJwIFXAG4BnY5TOWDquRyWyw4JwG9Sd75VFlvHHU9PeBVnDJoJwnZdOWrNOy3M6DpZtlGbopAIPtdNbZ5tnhjAdFQAEgHsCAUgZFwIPtULbZ5tnhjAdGAAGgQEjAg+3Trtnm2eGMB0aAAaB/t0CktAB0NMDAXGwowH6QAEg10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIVFBTA28E+GEC+GLbPFnbPPLggjDI+EMBzH8BygDJ7VQdHAA8AZIwf+BwIddJwh+VMCDXCx/ewAAB10nBIbCRf+BwATTtRNDUAfhj0gAwkW3g+CjXCwqDCbry4InbPB4AAm0QTcC0'); + let builder = beginCell(); + builder.storeRef(__system); + builder.storeUint(0, 1); + initIntegerLiteralsTester_init_args({ $$type: 'IntegerLiteralsTester_init_args' })(builder); + const __data = builder.endCell(); + return { code: __code, data: __data }; +} + +const IntegerLiteralsTester_errors: { [key: number]: { message: string } } = { + 2: { message: `Stack undeflow` }, + 3: { message: `Stack overflow` }, + 4: { message: `Integer overflow` }, + 5: { message: `Integer out of expected range` }, + 6: { message: `Invalid opcode` }, + 7: { message: `Type check error` }, + 8: { message: `Cell overflow` }, + 9: { message: `Cell underflow` }, + 10: { message: `Dictionary error` }, + 13: { message: `Out of gas error` }, + 32: { message: `Method ID not found` }, + 34: { message: `Action is invalid or not supported` }, + 37: { message: `Not enough TON` }, + 38: { message: `Not enough extra-currencies` }, + 128: { message: `Null reference exception` }, + 129: { message: `Invalid serialization prefix` }, + 130: { message: `Invalid incoming message` }, + 131: { message: `Constraints error` }, + 132: { message: `Access denied` }, + 133: { message: `Contract stopped` }, + 134: { message: `Invalid argument` }, + 135: { message: `Code of a contract was not found` }, + 136: { message: `Invalid address` }, + 137: { message: `Masterchain support is not enabled for this contract` }, +} + +const IntegerLiteralsTester_types: ABIType[] = [ + {"name":"StateInit","header":null,"fields":[{"name":"code","type":{"kind":"simple","type":"cell","optional":false}},{"name":"data","type":{"kind":"simple","type":"cell","optional":false}}]}, + {"name":"Context","header":null,"fields":[{"name":"bounced","type":{"kind":"simple","type":"bool","optional":false}},{"name":"sender","type":{"kind":"simple","type":"address","optional":false}},{"name":"value","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"raw","type":{"kind":"simple","type":"slice","optional":false}}]}, + {"name":"SendParameters","header":null,"fields":[{"name":"bounce","type":{"kind":"simple","type":"bool","optional":false}},{"name":"to","type":{"kind":"simple","type":"address","optional":false}},{"name":"value","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"mode","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"body","type":{"kind":"simple","type":"cell","optional":true}},{"name":"code","type":{"kind":"simple","type":"cell","optional":true}},{"name":"data","type":{"kind":"simple","type":"cell","optional":true}}]}, +] + +const IntegerLiteralsTester_getters: ABIGetter[] = [ + {"name":"decLiteral1","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}}, + {"name":"decLiteral2","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}}, + {"name":"hexLiteral1","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}}, + {"name":"hexLiteral2","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}}, + {"name":"binLiteral1","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}}, + {"name":"binLiteral2","arguments":[],"returnType":{"kind":"simple","type":"int","optional":false,"format":257}}, +] + +const IntegerLiteralsTester_receivers: ABIReceiver[] = [ + {"receiver":"internal","message":{"kind":"empty"}}, +] + +export class IntegerLiteralsTester implements Contract { + + static async init() { + return await IntegerLiteralsTester_init(); + } + + static async fromInit() { + const init = await IntegerLiteralsTester_init(); + const address = contractAddress(0, init); + return new IntegerLiteralsTester(address, init); + } + + static fromAddress(address: Address) { + return new IntegerLiteralsTester(address); + } + + readonly address: Address; + readonly init?: { code: Cell, data: Cell }; + readonly abi: ContractABI = { + types: IntegerLiteralsTester_types, + getters: IntegerLiteralsTester_getters, + receivers: IntegerLiteralsTester_receivers, + errors: IntegerLiteralsTester_errors, + }; + + private constructor(address: Address, init?: { code: Cell, data: Cell }) { + this.address = address; + this.init = init; + } + + async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: null) { + + let body: Cell | null = null; + if (message === null) { + body = new Cell(); + } + if (body === null) { throw new Error('Invalid message type'); } + + await provider.internal(via, { ...args, body: body }); + + } + + async getDecLiteral1(provider: ContractProvider) { + let builder = new TupleBuilder(); + let source = (await provider.get('decLiteral1', builder.build())).stack; + let result = source.readBigNumber(); + return result; + } + + async getDecLiteral2(provider: ContractProvider) { + let builder = new TupleBuilder(); + let source = (await provider.get('decLiteral2', builder.build())).stack; + let result = source.readBigNumber(); + return result; + } + + async getHexLiteral1(provider: ContractProvider) { + let builder = new TupleBuilder(); + let source = (await provider.get('hexLiteral1', builder.build())).stack; + let result = source.readBigNumber(); + return result; + } + + async getHexLiteral2(provider: ContractProvider) { + let builder = new TupleBuilder(); + let source = (await provider.get('hexLiteral2', builder.build())).stack; + let result = source.readBigNumber(); + return result; + } + + async getBinLiteral1(provider: ContractProvider) { + let builder = new TupleBuilder(); + let source = (await provider.get('binLiteral1', builder.build())).stack; + let result = source.readBigNumber(); + return result; + } + + async getBinLiteral2(provider: ContractProvider) { + let builder = new TupleBuilder(); + let source = (await provider.get('binLiteral2', builder.build())).stack; + let result = source.readBigNumber(); + return result; + } + +} \ No newline at end of file diff --git a/tact.config.json b/tact.config.json index 5908e1820..0239e61be 100644 --- a/tact.config.json +++ b/tact.config.json @@ -148,6 +148,14 @@ "debug": true } }, + { + "name": "integer-literals", + "path": "./src/test/features/integer-literals.tact", + "output": "./src/test/features/output", + "options": { + "debug": true + } + }, { "name": "random", "path": "./src/test/features/random.tact",