diff --git a/.idea/modules/vyper-plugin.main.iml b/.idea/modules/vyper-plugin.main.iml index 50ac8ef..d7c2e44 100644 --- a/.idea/modules/vyper-plugin.main.iml +++ b/.idea/modules/vyper-plugin.main.iml @@ -55,34 +55,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/modules/vyper-plugin.test.iml b/.idea/modules/vyper-plugin.test.iml index f4c6c95..ca003ae 100644 --- a/.idea/modules/vyper-plugin.test.iml +++ b/.idea/modules/vyper-plugin.test.iml @@ -56,34 +56,34 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md index 7930c14..6f33283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Support for Vyper 0.4.0 ([#15](https://github.com/NikitaMishin/vyper-plugin/issues/15)) - Get rid of Vyper compile/stub menus and output window - Fix multiple parsing issues +- Better syntax highlighting for the `self` keyword ## [0.2.0-alpha.4] - 2024-07-09 diff --git a/src/main/gen/org/vyperlang/plugin/grammar/_BaseVyperLexer.flex b/src/main/gen/org/vyperlang/plugin/grammar/_BaseVyperLexer.flex index a136866..b0b40dd 100644 --- a/src/main/gen/org/vyperlang/plugin/grammar/_BaseVyperLexer.flex +++ b/src/main/gen/org/vyperlang/plugin/grammar/_BaseVyperLexer.flex @@ -59,9 +59,6 @@ IDENTIFIER=([A-Za-z_][a-zA-Z_0-9]*) "}" { return RBRACE; } "(" { return LPAREN; } ")" { return RPAREN; } - "import" { return IMPORT; } - "from" { return FROM; } - "pass" { return PASS; } "..." { return ELLIPSIS; } "+" { return PLUS; } "-" { return MINUS; } @@ -82,7 +79,6 @@ IDENTIFIER=([A-Za-z_][a-zA-Z_0-9]*) "<=" { return LESSEQ; } ">" { return MORE; } ">=" { return MOREEQ; } - "^" { return CARET; } "and" { return AND; } "or" { return OR; } "?" { return QUESTION; } @@ -90,33 +86,35 @@ IDENTIFIER=([A-Za-z_][a-zA-Z_0-9]*) "~" { return TILDE; } "<<" { return LSHIFT; } ">>" { return RSHIFT; } - "&" { return INTERSECTION; } - "|" { return UNION; } - "public" { return PUBLIC; } - "immutable" { return IMMUTABLE; } - "constant" { return CONSTANT; } - "payable" { return PAYABLE; } - "nonpayable" { return NONPAYABLE; } - "external" { return EXTERNAL; } - "internal" { return INTERNAL; } - "deploy" { return DEPLOY; } - "pure" { return PURE; } - "view" { return VIEW; } - "nonreentrant" { return NONREENTRANT; } - "event" { return EVENT; } - "range" { return RANGE; } + "&" { return AMPERSAND; } + "|" { return PIPE; } + "^" { return CARET; } "String" { return STRING; } "Bytes" { return BYTES; } "DynArray" { return DYNARRAY; } "HashMap" { return HASHMAP; } + "constant" { return CONSTANT; } + "public" { return PUBLIC; } + "immutable" { return IMMUTABLE; } + "import" { return IMPORT; } "as" { return AS; } + "from" { return FROM; } "implements" { return IMPLEMENTS; } "interface" { return INTERFACE; } "def" { return DEF; } + "pure" { return PURE; } + "view" { return VIEW; } + "nonpayable" { return NONPAYABLE; } + "payable" { return PAYABLE; } "struct" { return STRUCT; } "enum" { return ENUM; } "flag" { return FLAG; } + "event" { return EVENT; } "indexed" { return INDEXED; } + "external" { return EXTERNAL; } + "internal" { return INTERNAL; } + "deploy" { return DEPLOY; } + "nonreentrant" { return NONREENTRANT; } "elif" { return ELIF; } "else" { return ELSE; } "if" { return IF; } @@ -126,11 +124,13 @@ IDENTIFIER=([A-Za-z_][a-zA-Z_0-9]*) "break" { return BREAK; } "return" { return RETURN; } "raise" { return RAISE; } + "PASS" { return PASS; } "log" { return LOG; } "extcall" { return EXTCALL; } "staticcall" { return STATICCALL; } - "clear" { return CLEAR; } + "range" { return RANGE; } "assert" { return ASSERT; } + "self" { return SELF; } "address" { return ADDRESS; } "bool" { return BOOL; } diff --git a/src/main/gen/org/vyperlang/plugin/grammar/_BaseVyperLexer.java b/src/main/gen/org/vyperlang/plugin/grammar/_BaseVyperLexer.java index 722852c..b6a89a9 100644 --- a/src/main/gen/org/vyperlang/plugin/grammar/_BaseVyperLexer.java +++ b/src/main/gen/org/vyperlang/plugin/grammar/_BaseVyperLexer.java @@ -72,14 +72,14 @@ private static int zzUnpackcmap_top(String packed, int offset, int [] result) { "\1\15\1\16\1\17\1\20\1\21\1\22\1\23\11\24"+ "\1\25\1\26\1\27\1\30\1\31\1\32\1\33\1\34"+ "\1\35\1\36\1\37\1\40\1\41\1\42\1\43\4\42"+ - "\1\44\5\42\1\45\1\46\3\42\1\47\2\42\1\50"+ - "\1\51\1\52\1\53\1\54\1\0\1\55\1\56\1\57"+ - "\1\60\1\61\1\62\1\63\1\64\1\65\1\42\1\66"+ - "\1\67\1\70\1\71\1\72\1\73\1\42\1\74\1\75"+ - "\1\76\1\77\1\100\1\101\1\102\1\103\1\42\1\104"+ - "\1\105\1\106\1\107\6\0\1\110\32\0\1\111\u01df\0"+ - "\1\111\177\0\13\111\35\0\2\110\5\0\1\111\57\0"+ - "\1\111\240\0\1\111\377\0\u0100\112"; + "\1\44\2\42\1\45\2\42\1\46\1\47\3\42\1\50"+ + "\2\42\1\51\1\52\1\53\1\54\1\55\1\0\1\56"+ + "\1\57\1\60\1\61\1\62\1\63\1\64\1\65\1\66"+ + "\1\42\1\67\1\70\1\71\1\72\1\73\1\74\1\42"+ + "\1\75\1\76\1\77\1\100\1\101\1\102\1\103\1\104"+ + "\1\42\1\105\1\106\1\107\1\110\6\0\1\111\32\0"+ + "\1\112\u01df\0\1\112\177\0\13\112\35\0\2\111\5\0"+ + "\1\112\57\0\1\112\240\0\1\112\377\0\u0100\113"; private static int [] zzUnpackcmap_blocks() { int [] result = new int[1536]; @@ -109,19 +109,19 @@ private static int zzUnpackcmap_blocks(String packed, int offset, int [] result) "\1\0\1\1\1\2\2\1\1\3\1\4\1\5\1\1"+ "\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\15"+ "\2\16\1\17\1\20\1\21\1\22\1\23\1\24\1\25"+ - "\7\26\1\27\1\1\1\30\1\31\20\26\1\32\1\33"+ + "\10\26\1\27\1\1\1\30\1\31\20\26\1\32\1\33"+ "\1\34\1\35\1\2\1\0\1\36\1\0\1\37\1\0"+ "\1\40\1\0\1\41\1\0\1\42\1\43\1\44\1\45"+ "\1\0\1\46\1\0\1\47\2\0\1\50\1\51\1\52"+ - "\1\53\1\54\1\55\6\26\1\56\2\26\1\57\2\0"+ - "\16\26\1\60\1\26\1\61\2\26\1\62\7\26\1\37"+ - "\1\0\1\63\1\0\1\64\1\65\7\26\1\66\1\26"+ - "\1\67\1\0\1\70\1\0\5\26\1\71\7\26\1\72"+ - "\6\26\1\73\1\26\1\74\13\26\1\0\4\26\1\75"+ - "\2\26\1\76\6\26\1\77\1\100\1\101\3\26\1\102"+ - "\1\103\1\0\4\26\1\104\3\26\1\105\2\26\1\106"+ - "\6\26\1\107\1\0\1\110\5\26\1\111\1\26\1\112"+ - "\3\26\1\113\2\26\1\0\11\26\1\114\1\115\3\26"+ + "\1\53\1\54\1\55\7\26\1\56\2\26\1\57\2\0"+ + "\15\26\1\60\1\26\1\61\2\26\1\62\10\26\1\37"+ + "\1\0\1\63\1\0\1\64\1\65\10\26\1\66\1\26"+ + "\1\67\1\0\1\70\1\0\4\26\1\71\7\26\1\72"+ + "\6\26\1\73\1\26\1\74\13\26\1\0\3\26\1\75"+ + "\1\26\1\76\2\26\1\77\5\26\1\100\1\101\1\102"+ + "\3\26\1\103\1\104\1\0\4\26\1\105\5\26\1\106"+ + "\3\26\1\107\3\26\1\110\1\0\1\111\5\26\1\112"+ + "\4\26\1\113\2\26\1\0\11\26\1\114\1\115\3\26"+ "\1\116\1\117\2\26\1\120\1\26\1\121\1\122\2\26"+ "\1\123\2\26\1\124\2\26\1\125\6\26\1\126\1\127"+ "\1\26\1\130\1\26\1\131\1\132\2\26\1\133\3\26"+ @@ -130,7 +130,7 @@ private static int zzUnpackcmap_blocks(String packed, int offset, int [] result) "\1\146\1\26\1\147\1\26\1\150"; private static int [] zzUnpackAction() { - int [] result = new int[315]; + int [] result = new int[316]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -155,49 +155,49 @@ private static int zzUnpackAction(String packed, int offset, int [] result) { private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\113\0\226\0\341\0\u012c\0\u0177\0\u01c2\0\113"+ - "\0\u020d\0\113\0\113\0\u0258\0\u02a3\0\113\0\u02ee\0\u0339"+ - "\0\u0384\0\u03cf\0\u041a\0\113\0\113\0\u0465\0\u04b0\0\u04fb"+ - "\0\113\0\113\0\u0546\0\u0591\0\u05dc\0\u0627\0\u0672\0\u06bd"+ - "\0\u0708\0\113\0\u0753\0\113\0\113\0\u079e\0\u07e9\0\u0834"+ - "\0\u087f\0\u08ca\0\u0915\0\u0960\0\u09ab\0\u09f6\0\u0a41\0\u0a8c"+ - "\0\u0ad7\0\u0b22\0\u0b6d\0\u0bb8\0\u0c03\0\113\0\113\0\113"+ - "\0\113\0\u0c4e\0\u0753\0\113\0\u0c99\0\u0ce4\0\u0d2f\0\113"+ - "\0\u020d\0\113\0\u0d7a\0\113\0\113\0\113\0\113\0\u0dc5"+ - "\0\u0e10\0\u0e5b\0\113\0\u0ea6\0\u0ef1\0\113\0\113\0\113"+ - "\0\113\0\113\0\113\0\u0f3c\0\u0f87\0\u0fd2\0\u101d\0\u1068"+ - "\0\u10b3\0\u0753\0\u10fe\0\u1149\0\u1194\0\u11df\0\u122a\0\u1275"+ - "\0\u12c0\0\u130b\0\u1356\0\u13a1\0\u13ec\0\u1437\0\u1482\0\u14cd"+ - "\0\u1518\0\u1563\0\u15ae\0\u15f9\0\u1644\0\u0546\0\u168f\0\u16da"+ - "\0\u1725\0\u1770\0\u0546\0\u17bb\0\u1806\0\u1851\0\u189c\0\u18e7"+ - "\0\u1932\0\u197d\0\113\0\u19c8\0\113\0\u1a13\0\u1a13\0\u0ef1"+ - "\0\u1a5e\0\u1aa9\0\u1af4\0\u1b3f\0\u1b8a\0\u1bd5\0\u1c20\0\u0546"+ - "\0\u1c6b\0\113\0\u1cb6\0\113\0\u1d01\0\u1d4c\0\u1d97\0\u1de2"+ - "\0\u1e2d\0\u1e78\0\u0546\0\u1ec3\0\u1f0e\0\u1f59\0\u1fa4\0\u1fef"+ - "\0\u203a\0\u2085\0\u0546\0\u20d0\0\u211b\0\u2166\0\u21b1\0\u21fc"+ - "\0\u2247\0\u0546\0\u2292\0\u0546\0\u22dd\0\u2328\0\u2373\0\u23be"+ - "\0\u2409\0\u2454\0\u249f\0\u24ea\0\u2535\0\u2580\0\u25cb\0\u2616"+ - "\0\u2661\0\u26ac\0\u26f7\0\u2742\0\u0546\0\u278d\0\u27d8\0\u0546"+ - "\0\u2823\0\u286e\0\u28b9\0\u2904\0\u294f\0\u299a\0\u0546\0\u0546"+ - "\0\u0546\0\u29e5\0\u2a30\0\u2a7b\0\u0546\0\u0546\0\u2ac6\0\u2b11"+ - "\0\u2b5c\0\u2ba7\0\u2bf2\0\u2c3d\0\u2c88\0\u2cd3\0\u2d1e\0\u0546"+ - "\0\u2d69\0\u2db4\0\u0546\0\u2dff\0\u2e4a\0\u2e95\0\u2ee0\0\u2f2b"+ - "\0\u2f76\0\u0546\0\u2fc1\0\u0546\0\u300c\0\u3057\0\u30a2\0\u30ed"+ - "\0\u3138\0\u0546\0\u3183\0\u0546\0\u31ce\0\u3219\0\u3264\0\u0546"+ - "\0\u32af\0\u32fa\0\u3345\0\u3390\0\u33db\0\u3426\0\u3471\0\u34bc"+ - "\0\u3507\0\u3552\0\u359d\0\u35e8\0\u0546\0\u0546\0\u3633\0\u367e"+ - "\0\u36c9\0\u2f76\0\113\0\u3714\0\u375f\0\u0546\0\u37aa\0\u0546"+ - "\0\u3183\0\u37f5\0\u3840\0\u0546\0\u388b\0\u38d6\0\113\0\u3921"+ - "\0\u396c\0\u0546\0\u39b7\0\u3a02\0\u3a4d\0\u3a98\0\u3ae3\0\u3b2e"+ - "\0\u0546\0\u0546\0\u3b79\0\u0546\0\u3bc4\0\u0546\0\u0546\0\u3c0f"+ - "\0\u3c5a\0\u0546\0\u3ca5\0\u3cf0\0\u3d3b\0\u0546\0\u3d86\0\u3dd1"+ - "\0\u3e1c\0\u3e67\0\u0546\0\u3eb2\0\u0546\0\u0546\0\u0546\0\u0546"+ - "\0\u3efd\0\u3f48\0\u3f93\0\u0546\0\u3fde\0\u4029\0\u4074\0\u0546"+ - "\0\u40bf\0\u0546\0\u410a\0\u4155\0\u41a0\0\u0546\0\u0546\0\u41eb"+ - "\0\u0546\0\u4236\0\u0546"; + "\0\0\0\114\0\230\0\344\0\u0130\0\u017c\0\u01c8\0\114"+ + "\0\u0214\0\114\0\114\0\u0260\0\u02ac\0\114\0\u02f8\0\u0344"+ + "\0\u0390\0\u03dc\0\u0428\0\114\0\114\0\u0474\0\u04c0\0\u050c"+ + "\0\114\0\114\0\u0558\0\u05a4\0\u05f0\0\u063c\0\u0688\0\u06d4"+ + "\0\u0720\0\u076c\0\114\0\u07b8\0\114\0\114\0\u0804\0\u0850"+ + "\0\u089c\0\u08e8\0\u0934\0\u0980\0\u09cc\0\u0a18\0\u0a64\0\u0ab0"+ + "\0\u0afc\0\u0b48\0\u0b94\0\u0be0\0\u0c2c\0\u0c78\0\114\0\114"+ + "\0\114\0\114\0\u0cc4\0\u07b8\0\114\0\u0d10\0\u0d5c\0\u0da8"+ + "\0\114\0\u0214\0\114\0\u0df4\0\114\0\114\0\114\0\114"+ + "\0\u0e40\0\u0e8c\0\u0ed8\0\114\0\u0f24\0\u0f70\0\114\0\114"+ + "\0\114\0\114\0\114\0\114\0\u0fbc\0\u1008\0\u1054\0\u10a0"+ + "\0\u10ec\0\u1138\0\u1184\0\u07b8\0\u11d0\0\u121c\0\u1268\0\u12b4"+ + "\0\u1300\0\u134c\0\u1398\0\u13e4\0\u1430\0\u147c\0\u14c8\0\u1514"+ + "\0\u1560\0\u15ac\0\u15f8\0\u1644\0\u1690\0\u16dc\0\u0558\0\u1728"+ + "\0\u1774\0\u17c0\0\u180c\0\u0558\0\u1858\0\u18a4\0\u18f0\0\u193c"+ + "\0\u1988\0\u19d4\0\u1a20\0\u1a6c\0\114\0\u1ab8\0\114\0\u1b04"+ + "\0\u1b04\0\u0f70\0\u1b50\0\u1b9c\0\u1be8\0\u1c34\0\u1c80\0\u1ccc"+ + "\0\u1d18\0\u1d64\0\u0558\0\u1db0\0\114\0\u1dfc\0\114\0\u1e48"+ + "\0\u1e94\0\u1ee0\0\u1f2c\0\u1f78\0\u0558\0\u1fc4\0\u2010\0\u205c"+ + "\0\u20a8\0\u20f4\0\u2140\0\u218c\0\u0558\0\u21d8\0\u2224\0\u2270"+ + "\0\u22bc\0\u2308\0\u2354\0\u0558\0\u23a0\0\u0558\0\u23ec\0\u2438"+ + "\0\u2484\0\u24d0\0\u251c\0\u2568\0\u25b4\0\u2600\0\u264c\0\u2698"+ + "\0\u26e4\0\u2730\0\u277c\0\u27c8\0\u2814\0\u0558\0\u2860\0\u0558"+ + "\0\u28ac\0\u28f8\0\u0558\0\u2944\0\u2990\0\u29dc\0\u2a28\0\u2a74"+ + "\0\u0558\0\u0558\0\u0558\0\u2ac0\0\u2b0c\0\u2b58\0\u0558\0\u0558"+ + "\0\u2ba4\0\u2bf0\0\u2c3c\0\u2c88\0\u2cd4\0\u2d20\0\u2d6c\0\u2db8"+ + "\0\u2e04\0\u2e50\0\u2e9c\0\u0558\0\u2ee8\0\u2f34\0\u2f80\0\u0558"+ + "\0\u2fcc\0\u3018\0\u3064\0\u0558\0\u30b0\0\u0558\0\u30fc\0\u3148"+ + "\0\u3194\0\u31e0\0\u322c\0\u0558\0\u3278\0\u32c4\0\u3310\0\u335c"+ + "\0\u0558\0\u33a8\0\u33f4\0\u3440\0\u348c\0\u34d8\0\u3524\0\u3570"+ + "\0\u35bc\0\u3608\0\u3654\0\u36a0\0\u36ec\0\u0558\0\u0558\0\u3738"+ + "\0\u3784\0\u37d0\0\u3064\0\114\0\u381c\0\u3868\0\u0558\0\u38b4"+ + "\0\u0558\0\u3278\0\u3900\0\u394c\0\u0558\0\u3998\0\u39e4\0\114"+ + "\0\u3a30\0\u3a7c\0\u0558\0\u3ac8\0\u3b14\0\u3b60\0\u3bac\0\u3bf8"+ + "\0\u3c44\0\u0558\0\u0558\0\u3c90\0\u0558\0\u3cdc\0\u0558\0\u0558"+ + "\0\u3d28\0\u3d74\0\u0558\0\u3dc0\0\u3e0c\0\u3e58\0\u0558\0\u3ea4"+ + "\0\u3ef0\0\u3f3c\0\u3f88\0\u0558\0\u3fd4\0\u0558\0\u0558\0\u0558"+ + "\0\u0558\0\u4020\0\u406c\0\u40b8\0\u0558\0\u4104\0\u4150\0\u419c"+ + "\0\u0558\0\u41e8\0\u0558\0\u4234\0\u4280\0\u42cc\0\u0558\0\u0558"+ + "\0\u4318\0\u0558\0\u4364\0\u0558"; private static int [] zzUnpackRowMap() { - int [] result = new int[315]; + int [] result = new int[316]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -224,233 +224,234 @@ private static int zzUnpackRowMap(String packed, int offset, int [] result) { "\1\12\1\13\1\14\1\15\1\16\1\17\1\20\1\21"+ "\1\22\1\23\1\24\1\25\1\26\1\27\1\30\1\31"+ "\1\32\1\33\1\34\1\33\1\35\1\33\1\36\1\33"+ - "\1\37\1\33\1\40\1\41\1\33\1\42\1\43\1\44"+ - "\1\45\1\33\1\46\1\47\1\50\1\51\1\52\1\53"+ - "\1\33\1\54\1\55\1\33\1\56\1\33\1\57\1\60"+ - "\1\61\1\62\1\63\1\33\1\64\1\65\3\33\1\66"+ - "\1\67\1\70\1\71\2\72\1\2\114\0\4\3\44\0"+ - "\1\73\36\0\2\72\31\0\1\74\62\0\2\75\1\0"+ - "\1\75\1\0\1\75\1\76\42\75\1\77\41\75\2\6"+ - "\3\0\103\6\1\0\1\6\31\0\1\100\62\0\2\101"+ - "\1\0\1\101\1\0\5\101\1\102\36\101\1\103\41\101"+ - "\15\0\1\104\12\0\1\105\112\0\1\106\112\0\1\107"+ - "\103\0\1\110\1\0\2\111\27\0\1\112\66\0\1\113"+ - "\103\0\1\111\1\0\2\23\13\0\1\114\6\0\1\115"+ - "\4\0\1\23\4\0\1\114\20\0\1\115\31\0\1\111"+ - "\1\0\2\23\13\0\1\114\13\0\1\23\4\0\1\114"+ - "\60\0\1\116\1\117\112\0\1\120\1\121\111\0\1\122"+ - "\1\123\104\0\2\33\7\0\14\33\4\0\30\33\32\0"+ - "\2\33\7\0\14\33\4\0\27\33\1\124\32\0\2\33"+ - "\7\0\14\33\4\0\27\33\1\125\32\0\2\33\7\0"+ - "\14\33\4\0\1\33\1\126\26\33\32\0\2\33\7\0"+ - "\14\33\4\0\1\33\1\127\26\33\32\0\2\33\7\0"+ - "\14\33\4\0\22\33\1\130\5\33\32\0\2\33\7\0"+ - "\14\33\4\0\20\33\1\131\7\33\10\0\1\73\1\132"+ - "\2\73\131\0\2\33\7\0\14\33\4\0\4\33\1\133"+ - "\10\33\1\134\3\33\1\135\6\33\15\0\1\136\3\0"+ - "\1\137\10\0\2\33\7\0\14\33\4\0\16\33\1\140"+ - "\1\33\1\141\6\33\1\142\32\0\2\33\7\0\14\33"+ - "\4\0\13\33\1\143\2\33\1\144\11\33\32\0\2\33"+ - "\7\0\14\33\4\0\5\33\1\145\22\33\32\0\2\33"+ - "\7\0\14\33\4\0\13\33\1\146\1\33\1\147\6\33"+ - "\1\150\1\33\1\151\1\33\32\0\2\33\7\0\14\33"+ - "\4\0\13\33\1\152\2\33\1\153\1\33\1\154\7\33"+ - "\32\0\2\33\7\0\14\33\4\0\5\33\1\155\22\33"+ - "\32\0\2\33\7\0\14\33\4\0\6\33\1\156\5\33"+ - "\1\157\1\160\12\33\32\0\2\33\7\0\14\33\4\0"+ - "\16\33\1\161\11\33\32\0\2\33\7\0\14\33\4\0"+ - "\16\33\1\162\11\33\32\0\2\33\7\0\14\33\4\0"+ - "\20\33\1\163\7\33\32\0\2\33\7\0\14\33\4\0"+ - "\1\33\1\164\21\33\1\165\4\33\32\0\2\33\7\0"+ - "\14\33\4\0\1\33\1\166\3\33\1\167\22\33\32\0"+ - "\2\33\7\0\14\33\4\0\22\33\1\170\5\33\32\0"+ - "\2\33\7\0\14\33\4\0\11\33\1\171\16\33\32\0"+ - "\2\33\7\0\14\33\4\0\11\33\1\172\16\33\10\0"+ - "\4\72\103\0\2\72\1\0\2\75\1\0\1\75\1\0"+ - "\1\75\1\173\42\75\1\77\41\75\6\0\1\174\104\0"+ - "\2\75\3\0\103\75\1\0\1\75\1\0\2\101\3\0"+ - "\103\101\1\0\1\101\22\0\1\175\114\0\2\111\13\0"+ - "\1\114\13\0\1\111\4\0\1\114\54\0\2\112\13\0"+ - "\1\114\13\0\1\112\4\0\1\114\47\0\1\176\1\0"+ - "\1\176\2\0\2\177\27\0\1\177\61\0\2\200\7\0"+ - "\6\200\12\0\7\200\53\0\2\33\7\0\14\33\4\0"+ - "\22\33\1\201\5\33\32\0\2\33\7\0\14\33\4\0"+ - "\15\33\1\202\12\33\32\0\2\33\7\0\14\33\4\0"+ - "\13\33\1\203\14\33\32\0\2\33\7\0\14\33\4\0"+ - "\21\33\1\204\6\33\32\0\2\33\7\0\14\33\4\0"+ - "\20\33\1\205\7\33\32\0\2\33\7\0\14\33\4\0"+ - "\23\33\1\206\4\33\32\0\2\33\7\0\14\33\4\0"+ - "\4\33\1\207\23\33\32\0\2\33\7\0\14\33\4\0"+ - "\4\33\1\210\23\33\32\0\2\33\7\0\14\33\4\0"+ - "\21\33\1\211\6\33\7\0\2\136\1\0\1\136\1\0"+ - "\1\136\1\212\42\136\1\213\41\136\2\137\1\0\1\137"+ - "\1\0\5\137\1\214\36\137\1\215\41\137\23\0\2\33"+ - "\7\0\14\33\4\0\16\33\1\216\11\33\32\0\2\33"+ - "\7\0\14\33\4\0\5\33\1\217\22\33\32\0\2\33"+ - "\7\0\14\33\4\0\22\33\1\220\5\33\32\0\2\33"+ - "\7\0\14\33\4\0\5\33\1\221\22\33\32\0\2\33"+ - "\7\0\14\33\4\0\15\33\1\222\12\33\32\0\2\33"+ - "\7\0\14\33\4\0\6\33\1\223\10\33\1\224\10\33"+ - "\32\0\2\33\7\0\14\33\4\0\11\33\1\225\7\33"+ - "\1\226\6\33\32\0\2\33\7\0\14\33\4\0\23\33"+ - "\1\227\4\33\32\0\2\33\7\0\14\33\4\0\5\33"+ - "\1\230\22\33\32\0\2\33\7\0\14\33\4\0\22\33"+ - "\1\231\5\33\32\0\2\33\7\0\14\33\4\0\1\33"+ - "\1\232\26\33\32\0\2\33\7\0\14\33\4\0\20\33"+ - "\1\233\7\33\32\0\2\33\7\0\14\33\4\0\16\33"+ - "\1\234\11\33\32\0\2\33\7\0\14\33\4\0\26\33"+ - "\1\235\1\33\32\0\2\33\7\0\14\33\4\0\14\33"+ - "\1\236\2\33\1\237\10\33\32\0\2\33\7\0\14\33"+ - "\4\0\4\33\1\240\15\33\1\241\5\33\32\0\2\33"+ - "\7\0\14\33\4\0\7\33\1\242\20\33\32\0\2\33"+ - "\7\0\14\33\4\0\15\33\1\243\4\33\1\244\5\33"+ - "\32\0\2\33\7\0\14\33\4\0\21\33\1\245\5\33"+ - "\1\246\32\0\2\33\7\0\14\33\4\0\2\33\1\247"+ - "\15\33\1\250\7\33\32\0\2\33\7\0\14\33\4\0"+ - "\11\33\1\251\3\33\1\252\12\33\32\0\2\33\7\0"+ - "\14\33\4\0\22\33\1\253\5\33\32\0\2\33\7\0"+ - "\14\33\4\0\1\33\1\254\16\33\1\255\7\33\32\0"+ - "\2\33\7\0\14\33\4\0\15\33\1\256\12\33\32\0"+ - "\2\33\7\0\14\33\4\0\5\33\1\257\22\33\7\0"+ - "\6\174\1\260\104\174\23\0\2\177\27\0\1\177\61\0"+ - "\2\33\7\0\14\33\4\0\5\33\1\261\22\33\32\0"+ - "\2\33\7\0\1\262\13\33\4\0\30\33\32\0\2\33"+ - "\7\0\14\33\4\0\21\33\1\206\6\33\32\0\2\33"+ - "\7\0\14\33\4\0\10\33\1\263\17\33\32\0\2\33"+ - "\7\0\14\33\4\0\11\33\1\264\16\33\32\0\2\33"+ - "\7\0\14\33\4\0\5\33\1\265\22\33\32\0\2\33"+ - "\7\0\14\33\4\0\20\33\1\266\7\33\32\0\2\33"+ - "\7\0\14\33\4\0\5\33\1\267\22\33\7\0\2\136"+ - "\3\0\103\136\1\0\1\136\1\0\2\137\3\0\103\137"+ - "\1\0\1\137\24\0\2\33\7\0\14\33\4\0\13\33"+ - "\1\270\14\33\32\0\2\33\7\0\14\33\4\0\1\33"+ - "\1\271\26\33\32\0\2\33\7\0\14\33\4\0\5\33"+ - "\1\272\22\33\32\0\2\33\7\0\14\33\4\0\1\33"+ - "\1\273\26\33\32\0\2\33\7\0\14\33\4\0\21\33"+ - "\1\274\1\275\5\33\32\0\2\33\7\0\14\33\4\0"+ - "\13\33\1\276\14\33\32\0\2\33\7\0\14\33\4\0"+ - "\6\33\1\277\21\33\32\0\2\33\7\0\14\33\4\0"+ - "\5\33\1\300\22\33\32\0\2\33\7\0\14\33\4\0"+ - "\14\33\1\301\13\33\32\0\2\33\7\0\14\33\4\0"+ - "\15\33\1\302\12\33\32\0\2\33\7\0\14\33\4\0"+ - "\3\33\1\303\1\33\1\304\22\33\32\0\2\33\7\0"+ - "\14\33\4\0\7\33\1\305\20\33\32\0\2\33\7\0"+ - "\14\33\4\0\14\33\1\306\13\33\15\0\1\307\14\0"+ - "\2\33\7\0\14\33\4\0\30\33\32\0\2\33\7\0"+ - "\14\33\4\0\23\33\1\310\4\33\32\0\2\33\7\0"+ - "\14\33\4\0\13\33\1\311\2\33\1\312\11\33\32\0"+ - "\2\33\7\0\14\33\4\0\5\33\1\313\22\33\32\0"+ - "\2\314\7\0\14\33\4\0\5\33\1\315\22\33\32\0"+ - "\2\33\7\0\14\33\4\0\17\33\1\316\1\317\7\33"+ - "\32\0\2\33\7\0\14\33\4\0\21\33\1\320\6\33"+ - "\32\0\2\33\7\0\14\33\4\0\1\33\1\321\26\33"+ - "\32\0\2\33\7\0\14\33\4\0\13\33\1\322\14\33"+ - "\32\0\2\33\7\0\14\33\4\0\5\33\1\323\22\33"+ - "\32\0\2\33\7\0\14\33\4\0\21\33\1\324\6\33"+ - "\32\0\2\33\7\0\14\33\4\0\7\33\1\325\20\33"+ - "\32\0\2\33\7\0\14\33\4\0\23\33\1\326\4\33"+ - "\32\0\2\33\7\0\14\33\4\0\22\33\1\327\5\33"+ - "\32\0\2\33\7\0\14\33\4\0\23\33\1\330\4\33"+ - "\32\0\2\33\7\0\14\33\4\0\22\33\1\331\5\33"+ - "\32\0\2\33\7\0\14\33\4\0\25\33\1\332\2\33"+ - "\7\0\6\174\1\333\104\174\23\0\2\33\7\0\14\33"+ - "\4\0\21\33\1\334\6\33\32\0\2\33\7\0\14\33"+ - "\4\0\20\33\1\335\7\33\32\0\2\33\7\0\10\33"+ - "\1\336\3\33\4\0\30\33\32\0\2\33\7\0\14\33"+ - "\4\0\15\33\1\337\12\33\32\0\2\33\7\0\14\33"+ - "\4\0\5\33\1\340\22\33\32\0\2\33\7\0\14\33"+ - "\4\0\20\33\1\341\7\33\32\0\2\33\7\0\14\33"+ - "\4\0\12\33\1\342\15\33\32\0\2\33\7\0\14\33"+ - "\4\0\21\33\1\343\6\33\32\0\2\33\7\0\14\33"+ - "\4\0\20\33\1\344\7\33\32\0\2\33\7\0\14\33"+ - "\4\0\22\33\1\345\5\33\32\0\2\33\7\0\14\33"+ - "\4\0\11\33\1\346\16\33\32\0\2\33\7\0\14\33"+ - "\4\0\16\33\1\347\11\33\32\0\2\33\7\0\14\33"+ - "\4\0\22\33\1\350\5\33\32\0\2\33\7\0\14\33"+ - "\4\0\1\33\1\351\26\33\32\0\2\33\7\0\14\33"+ - "\4\0\20\33\1\352\7\33\32\0\2\353\7\0\6\353"+ - "\13\0\6\353\53\0\2\33\7\0\14\33\4\0\22\33"+ - "\1\354\5\33\32\0\2\33\7\0\14\33\4\0\5\33"+ - "\1\355\22\33\32\0\2\33\7\0\14\33\4\0\20\33"+ - "\1\356\7\33\32\0\2\33\7\0\14\33\4\0\26\33"+ - "\1\357\1\33\32\0\2\314\7\0\14\33\4\0\30\33"+ - "\32\0\2\33\7\0\14\33\4\0\20\33\1\360\7\33"+ - "\32\0\2\33\7\0\14\33\4\0\1\33\1\361\26\33"+ - "\32\0\2\33\7\0\14\33\4\0\5\33\1\362\22\33"+ - "\32\0\2\33\7\0\14\33\4\0\2\33\1\363\25\33"+ - "\32\0\2\33\7\0\14\33\4\0\11\33\1\364\16\33"+ - "\32\0\2\33\7\0\14\33\4\0\5\33\1\365\22\33"+ - "\32\0\2\33\7\0\14\33\4\0\5\33\1\366\22\33"+ - "\32\0\2\33\7\0\14\33\4\0\20\33\1\367\7\33"+ - "\32\0\2\33\7\0\14\33\4\0\11\33\1\370\16\33"+ - "\32\0\2\33\7\0\14\33\4\0\3\33\1\371\24\33"+ - "\32\0\2\372\7\0\14\33\4\0\30\33\7\0\6\174"+ - "\1\373\104\174\23\0\2\33\7\0\14\33\4\0\20\33"+ - "\1\374\7\33\32\0\2\33\7\0\14\33\4\0\1\33"+ - "\1\375\26\33\32\0\2\33\7\0\14\33\4\0\7\33"+ - "\1\376\20\33\32\0\2\33\7\0\14\33\4\0\21\33"+ - "\1\377\6\33\32\0\2\33\7\0\14\33\4\0\22\33"+ - "\1\u0100\5\33\32\0\2\u0101\7\0\14\33\4\0\30\33"+ - "\32\0\2\33\7\0\14\33\4\0\1\33\1\u0102\26\33"+ - "\32\0\2\33\7\0\14\33\4\0\15\33\1\u0103\12\33"+ - "\32\0\2\33\7\0\14\33\4\0\27\33\1\u0104\32\0"+ - "\2\33\7\0\14\33\4\0\13\33\1\u0105\14\33\32\0"+ - "\2\33\7\0\14\33\4\0\15\33\1\u0106\12\33\15\0"+ - "\1\u0107\14\0\2\353\7\0\6\353\13\0\6\353\53\0"+ - "\2\33\7\0\14\33\4\0\1\33\1\u0108\26\33\32\0"+ - "\2\33\7\0\14\33\4\0\14\33\1\u0109\13\33\32\0"+ - "\2\33\7\0\14\33\4\0\22\33\1\u010a\5\33\32\0"+ - "\2\33\7\0\14\33\4\0\5\33\1\u010b\22\33\32\0"+ - "\2\33\7\0\14\33\4\0\6\33\1\u010c\6\33\1\u010d"+ - "\12\33\32\0\2\33\7\0\14\33\4\0\27\33\1\u010e"+ - "\32\0\2\33\7\0\14\33\4\0\5\33\1\u010f\22\33"+ - "\32\0\2\33\7\0\14\33\4\0\13\33\1\u0110\14\33"+ - "\32\0\2\33\7\0\14\33\4\0\3\33\1\u0111\24\33"+ - "\32\0\2\33\7\0\14\33\4\0\15\33\1\u0112\12\33"+ - "\32\0\2\33\7\0\14\33\4\0\3\33\1\u0113\24\33"+ - "\32\0\2\33\7\0\14\33\4\0\22\33\1\u0114\5\33"+ - "\32\0\2\33\7\0\14\33\4\0\1\33\1\u0115\26\33"+ - "\32\0\2\33\7\0\14\33\4\0\17\33\1\u0116\10\33"+ - "\32\0\2\33\7\0\14\33\4\0\21\33\1\u0117\6\33"+ - "\32\0\2\33\7\0\14\33\4\0\15\33\1\u0118\12\33"+ - "\32\0\2\33\7\0\14\33\4\0\23\33\1\u0119\4\33"+ - "\32\0\2\33\7\0\14\33\4\0\13\33\1\u011a\14\33"+ - "\32\0\2\33\7\0\14\33\4\0\1\33\1\u011b\26\33"+ - "\32\0\2\33\7\0\14\33\4\0\2\33\1\u011c\25\33"+ - "\32\0\2\33\7\0\14\33\4\0\5\33\1\u011d\22\33"+ - "\32\0\2\33\7\0\14\33\4\0\4\33\1\u011e\23\33"+ - "\32\0\2\33\7\0\14\33\4\0\1\33\1\u011f\26\33"+ - "\32\0\2\33\7\0\14\33\4\0\1\33\1\u0120\26\33"+ - "\32\0\2\33\7\0\14\33\4\0\1\33\1\u0121\26\33"+ - "\32\0\2\33\7\0\14\33\4\0\15\33\1\u0122\12\33"+ - "\32\0\2\33\7\0\14\33\4\0\5\33\1\u0123\22\33"+ - "\32\0\2\33\7\0\14\33\4\0\3\33\1\u0124\24\33"+ - "\32\0\2\33\7\0\14\33\4\0\27\33\1\u0125\32\0"+ - "\2\33\7\0\14\33\4\0\22\33\1\u0126\5\33\32\0"+ - "\2\33\7\0\14\33\4\0\5\33\1\u0127\22\33\32\0"+ - "\2\33\7\0\14\33\4\0\13\33\1\u0128\14\33\32\0"+ - "\2\33\7\0\14\33\4\0\13\33\1\u0129\14\33\32\0"+ - "\2\33\7\0\14\33\4\0\15\33\1\u012a\12\33\32\0"+ - "\2\33\7\0\14\33\4\0\3\33\1\u012b\24\33\32\0"+ - "\2\33\7\0\14\33\4\0\13\33\1\u012c\14\33\32\0"+ - "\2\33\7\0\14\33\4\0\2\33\1\u012d\25\33\32\0"+ - "\2\33\7\0\14\33\4\0\22\33\1\u012e\5\33\32\0"+ - "\2\33\7\0\14\33\4\0\1\33\1\u012f\26\33\32\0"+ - "\2\33\7\0\14\33\4\0\5\33\1\u0130\22\33\32\0"+ - "\2\33\7\0\14\33\4\0\22\33\1\u0131\5\33\32\0"+ - "\2\33\7\0\14\33\4\0\5\33\1\u0132\22\33\32\0"+ - "\2\33\7\0\14\33\4\0\13\33\1\u0133\14\33\32\0"+ - "\2\33\7\0\14\33\4\0\20\33\1\u0134\7\33\32\0"+ - "\2\33\7\0\14\33\4\0\13\33\1\u0135\14\33\32\0"+ - "\2\33\7\0\14\33\4\0\21\33\1\u0136\6\33\32\0"+ - "\2\33\7\0\14\33\4\0\5\33\1\u0137\22\33\32\0"+ - "\2\33\7\0\14\33\4\0\1\33\1\u0138\26\33\32\0"+ - "\2\33\7\0\14\33\4\0\13\33\1\u0139\14\33\32\0"+ - "\2\33\7\0\14\33\4\0\15\33\1\u013a\12\33\32\0"+ - "\2\33\7\0\14\33\4\0\22\33\1\u013b\5\33\7\0"; + "\1\37\1\33\1\40\1\41\1\42\1\33\1\43\1\44"+ + "\1\45\1\46\1\33\1\47\1\50\1\51\1\52\1\53"+ + "\1\54\1\33\1\55\1\56\1\33\1\57\1\33\1\60"+ + "\1\61\1\62\1\63\1\64\1\33\1\65\1\66\3\33"+ + "\1\67\1\70\1\71\1\72\2\73\1\2\115\0\4\3"+ + "\45\0\1\74\36\0\2\73\31\0\1\75\63\0\2\76"+ + "\1\0\1\76\1\0\1\76\1\77\43\76\1\100\41\76"+ + "\2\6\3\0\104\6\1\0\1\6\31\0\1\101\63\0"+ + "\2\102\1\0\1\102\1\0\5\102\1\103\37\102\1\104"+ + "\41\102\15\0\1\105\12\0\1\106\113\0\1\107\113\0"+ + "\1\110\104\0\1\111\1\0\2\112\30\0\1\113\66\0"+ + "\1\114\104\0\1\112\1\0\2\23\13\0\1\115\7\0"+ + "\1\116\4\0\1\23\4\0\1\115\20\0\1\116\31\0"+ + "\1\112\1\0\2\23\13\0\1\115\14\0\1\23\4\0"+ + "\1\115\60\0\1\117\1\120\113\0\1\121\1\122\112\0"+ + "\1\123\1\124\105\0\2\33\7\0\15\33\4\0\30\33"+ + "\32\0\2\33\7\0\15\33\4\0\27\33\1\125\32\0"+ + "\2\33\7\0\15\33\4\0\27\33\1\126\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\127\26\33\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\130\26\33\32\0\2\33"+ + "\7\0\1\131\14\33\4\0\30\33\32\0\2\33\7\0"+ + "\15\33\4\0\22\33\1\132\5\33\32\0\2\33\7\0"+ + "\15\33\4\0\20\33\1\133\7\33\10\0\1\74\1\134"+ + "\2\74\132\0\2\33\7\0\15\33\4\0\4\33\1\135"+ + "\10\33\1\136\3\33\1\137\6\33\15\0\1\140\3\0"+ + "\1\141\10\0\2\33\7\0\15\33\4\0\16\33\1\142"+ + "\1\33\1\143\6\33\1\144\32\0\2\33\7\0\15\33"+ + "\4\0\16\33\1\145\11\33\32\0\2\33\7\0\15\33"+ + "\4\0\5\33\1\146\22\33\32\0\2\33\7\0\15\33"+ + "\4\0\13\33\1\147\1\33\1\150\6\33\1\151\1\33"+ + "\1\152\1\33\32\0\2\33\7\0\15\33\4\0\13\33"+ + "\1\153\2\33\1\154\1\33\1\155\7\33\32\0\2\33"+ + "\7\0\15\33\4\0\5\33\1\156\22\33\32\0\2\33"+ + "\7\0\15\33\4\0\6\33\1\157\5\33\1\160\1\161"+ + "\12\33\32\0\2\33\7\0\15\33\4\0\16\33\1\162"+ + "\11\33\32\0\2\33\7\0\15\33\4\0\16\33\1\163"+ + "\11\33\32\0\2\33\7\0\15\33\4\0\20\33\1\164"+ + "\7\33\32\0\2\33\7\0\15\33\4\0\1\33\1\165"+ + "\21\33\1\166\4\33\32\0\2\33\7\0\15\33\4\0"+ + "\1\33\1\167\3\33\1\170\22\33\32\0\2\33\7\0"+ + "\15\33\4\0\5\33\1\171\14\33\1\172\5\33\32\0"+ + "\2\33\7\0\15\33\4\0\11\33\1\173\16\33\32\0"+ + "\2\33\7\0\15\33\4\0\11\33\1\174\16\33\10\0"+ + "\4\73\104\0\2\73\1\0\2\76\1\0\1\76\1\0"+ + "\1\76\1\175\43\76\1\100\41\76\6\0\1\176\105\0"+ + "\2\76\3\0\104\76\1\0\1\76\1\0\2\102\3\0"+ + "\104\102\1\0\1\102\22\0\1\177\115\0\2\112\13\0"+ + "\1\115\14\0\1\112\4\0\1\115\54\0\2\113\13\0"+ + "\1\115\14\0\1\113\4\0\1\115\47\0\1\200\1\0"+ + "\1\200\2\0\2\201\30\0\1\201\61\0\2\202\7\0"+ + "\6\202\13\0\7\202\53\0\2\33\7\0\15\33\4\0"+ + "\22\33\1\203\5\33\32\0\2\33\7\0\15\33\4\0"+ + "\15\33\1\204\12\33\32\0\2\33\7\0\15\33\4\0"+ + "\13\33\1\205\14\33\32\0\2\33\7\0\15\33\4\0"+ + "\21\33\1\206\6\33\32\0\2\33\7\0\12\33\1\207"+ + "\2\33\4\0\30\33\32\0\2\33\7\0\15\33\4\0"+ + "\20\33\1\210\7\33\32\0\2\33\7\0\15\33\4\0"+ + "\23\33\1\211\4\33\32\0\2\33\7\0\15\33\4\0"+ + "\4\33\1\212\23\33\32\0\2\33\7\0\15\33\4\0"+ + "\4\33\1\213\23\33\32\0\2\33\7\0\15\33\4\0"+ + "\21\33\1\214\6\33\7\0\2\140\1\0\1\140\1\0"+ + "\1\140\1\215\43\140\1\216\41\140\2\141\1\0\1\141"+ + "\1\0\5\141\1\217\37\141\1\220\41\141\23\0\2\33"+ + "\7\0\15\33\4\0\16\33\1\221\11\33\32\0\2\33"+ + "\7\0\15\33\4\0\5\33\1\222\22\33\32\0\2\33"+ + "\7\0\15\33\4\0\22\33\1\223\5\33\32\0\2\33"+ + "\7\0\15\33\4\0\15\33\1\224\12\33\32\0\2\33"+ + "\7\0\15\33\4\0\6\33\1\225\10\33\1\226\10\33"+ + "\32\0\2\33\7\0\15\33\4\0\11\33\1\227\7\33"+ + "\1\230\6\33\32\0\2\33\7\0\15\33\4\0\23\33"+ + "\1\231\4\33\32\0\2\33\7\0\15\33\4\0\5\33"+ + "\1\232\22\33\32\0\2\33\7\0\15\33\4\0\22\33"+ + "\1\233\5\33\32\0\2\33\7\0\15\33\4\0\1\33"+ + "\1\234\26\33\32\0\2\33\7\0\15\33\4\0\20\33"+ + "\1\235\7\33\32\0\2\33\7\0\15\33\4\0\16\33"+ + "\1\236\11\33\32\0\2\33\7\0\15\33\4\0\26\33"+ + "\1\237\1\33\32\0\2\33\7\0\15\33\4\0\14\33"+ + "\1\240\2\33\1\241\10\33\32\0\2\33\7\0\15\33"+ + "\4\0\4\33\1\242\15\33\1\243\5\33\32\0\2\33"+ + "\7\0\15\33\4\0\7\33\1\244\20\33\32\0\2\33"+ + "\7\0\15\33\4\0\15\33\1\245\4\33\1\246\5\33"+ + "\32\0\2\33\7\0\15\33\4\0\27\33\1\247\32\0"+ + "\2\33\7\0\15\33\4\0\2\33\1\250\15\33\1\251"+ + "\7\33\32\0\2\33\7\0\15\33\4\0\11\33\1\252"+ + "\3\33\1\253\12\33\32\0\2\33\7\0\15\33\4\0"+ + "\22\33\1\254\5\33\32\0\2\33\7\0\15\33\4\0"+ + "\13\33\1\255\14\33\32\0\2\33\7\0\15\33\4\0"+ + "\1\33\1\256\16\33\1\257\7\33\32\0\2\33\7\0"+ + "\15\33\4\0\15\33\1\260\12\33\32\0\2\33\7\0"+ + "\15\33\4\0\5\33\1\261\22\33\7\0\6\176\1\262"+ + "\105\176\23\0\2\201\30\0\1\201\61\0\2\33\7\0"+ + "\15\33\4\0\5\33\1\263\22\33\32\0\2\33\7\0"+ + "\1\264\14\33\4\0\30\33\32\0\2\33\7\0\15\33"+ + "\4\0\21\33\1\211\6\33\32\0\2\33\7\0\15\33"+ + "\4\0\10\33\1\265\17\33\32\0\2\33\7\0\12\33"+ + "\1\266\2\33\4\0\30\33\32\0\2\33\7\0\15\33"+ + "\4\0\11\33\1\267\16\33\32\0\2\33\7\0\15\33"+ + "\4\0\5\33\1\270\22\33\32\0\2\33\7\0\15\33"+ + "\4\0\20\33\1\271\7\33\32\0\2\33\7\0\15\33"+ + "\4\0\5\33\1\272\22\33\7\0\2\140\3\0\104\140"+ + "\1\0\1\140\1\0\2\141\3\0\104\141\1\0\1\141"+ + "\24\0\2\33\7\0\15\33\4\0\13\33\1\273\14\33"+ + "\32\0\2\33\7\0\15\33\4\0\1\33\1\274\26\33"+ + "\32\0\2\33\7\0\15\33\4\0\5\33\1\275\22\33"+ + "\32\0\2\33\7\0\15\33\4\0\21\33\1\276\1\277"+ + "\5\33\32\0\2\33\7\0\15\33\4\0\13\33\1\300"+ + "\14\33\32\0\2\33\7\0\15\33\4\0\6\33\1\301"+ + "\21\33\32\0\2\33\7\0\15\33\4\0\5\33\1\302"+ + "\22\33\32\0\2\33\7\0\15\33\4\0\14\33\1\303"+ + "\13\33\32\0\2\33\7\0\15\33\4\0\15\33\1\304"+ + "\12\33\32\0\2\33\7\0\15\33\4\0\3\33\1\305"+ + "\1\33\1\306\22\33\32\0\2\33\7\0\15\33\4\0"+ + "\7\33\1\307\20\33\32\0\2\33\7\0\15\33\4\0"+ + "\14\33\1\310\13\33\15\0\1\311\14\0\2\33\7\0"+ + "\15\33\4\0\30\33\32\0\2\33\7\0\15\33\4\0"+ + "\23\33\1\312\4\33\32\0\2\33\7\0\15\33\4\0"+ + "\13\33\1\313\2\33\1\314\11\33\32\0\2\33\7\0"+ + "\15\33\4\0\5\33\1\315\22\33\32\0\2\316\7\0"+ + "\15\33\4\0\5\33\1\317\22\33\32\0\2\33\7\0"+ + "\15\33\4\0\17\33\1\320\1\321\7\33\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\322\26\33\32\0\2\33"+ + "\7\0\15\33\4\0\13\33\1\323\14\33\32\0\2\33"+ + "\7\0\15\33\4\0\5\33\1\324\22\33\32\0\2\33"+ + "\7\0\15\33\4\0\21\33\1\325\6\33\32\0\2\33"+ + "\7\0\15\33\4\0\7\33\1\326\20\33\32\0\2\33"+ + "\7\0\15\33\4\0\23\33\1\327\4\33\32\0\2\33"+ + "\7\0\15\33\4\0\6\33\1\330\21\33\32\0\2\33"+ + "\7\0\15\33\4\0\22\33\1\331\5\33\32\0\2\33"+ + "\7\0\15\33\4\0\23\33\1\332\4\33\32\0\2\33"+ + "\7\0\15\33\4\0\22\33\1\333\5\33\32\0\2\33"+ + "\7\0\15\33\4\0\25\33\1\334\2\33\7\0\6\176"+ + "\1\335\105\176\23\0\2\33\7\0\15\33\4\0\21\33"+ + "\1\336\6\33\32\0\2\33\7\0\15\33\4\0\20\33"+ + "\1\337\7\33\32\0\2\33\7\0\10\33\1\340\4\33"+ + "\4\0\30\33\32\0\2\33\7\0\15\33\4\0\15\33"+ + "\1\341\12\33\32\0\2\33\7\0\15\33\4\0\5\33"+ + "\1\342\22\33\32\0\2\33\7\0\15\33\4\0\20\33"+ + "\1\343\7\33\32\0\2\33\7\0\15\33\4\0\12\33"+ + "\1\344\15\33\32\0\2\33\7\0\15\33\4\0\21\33"+ + "\1\345\6\33\32\0\2\33\7\0\15\33\4\0\22\33"+ + "\1\346\5\33\32\0\2\33\7\0\15\33\4\0\11\33"+ + "\1\347\16\33\32\0\2\33\7\0\15\33\4\0\16\33"+ + "\1\350\11\33\32\0\2\33\7\0\15\33\4\0\22\33"+ + "\1\351\5\33\32\0\2\33\7\0\15\33\4\0\1\33"+ + "\1\352\26\33\32\0\2\33\7\0\15\33\4\0\20\33"+ + "\1\353\7\33\32\0\2\354\7\0\6\354\14\0\6\354"+ + "\53\0\2\33\7\0\15\33\4\0\22\33\1\355\5\33"+ + "\32\0\2\33\7\0\15\33\4\0\5\33\1\356\22\33"+ + "\32\0\2\33\7\0\15\33\4\0\20\33\1\357\7\33"+ + "\32\0\2\33\7\0\15\33\4\0\26\33\1\360\1\33"+ + "\32\0\2\316\7\0\15\33\4\0\30\33\32\0\2\33"+ + "\7\0\15\33\4\0\20\33\1\361\7\33\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\362\26\33\32\0\2\33"+ + "\7\0\15\33\4\0\5\33\1\363\22\33\32\0\2\33"+ + "\7\0\15\33\4\0\2\33\1\364\25\33\32\0\2\33"+ + "\7\0\15\33\4\0\11\33\1\365\16\33\32\0\2\33"+ + "\7\0\15\33\4\0\5\33\1\366\22\33\32\0\2\33"+ + "\7\0\15\33\4\0\5\33\1\367\22\33\32\0\2\33"+ + "\7\0\15\33\4\0\20\33\1\370\7\33\32\0\2\33"+ + "\7\0\15\33\4\0\11\33\1\371\16\33\32\0\2\33"+ + "\7\0\15\33\4\0\3\33\1\372\24\33\32\0\2\373"+ + "\7\0\15\33\4\0\30\33\7\0\6\176\1\374\105\176"+ + "\23\0\2\33\7\0\15\33\4\0\20\33\1\375\7\33"+ + "\32\0\2\33\7\0\15\33\4\0\1\33\1\376\26\33"+ + "\32\0\2\33\7\0\15\33\4\0\7\33\1\377\20\33"+ + "\32\0\2\33\7\0\15\33\4\0\21\33\1\u0100\6\33"+ + "\32\0\2\33\7\0\15\33\4\0\22\33\1\u0101\5\33"+ + "\32\0\2\u0102\7\0\15\33\4\0\30\33\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\u0103\26\33\32\0\2\33"+ + "\7\0\15\33\4\0\15\33\1\u0104\12\33\32\0\2\33"+ + "\7\0\15\33\4\0\27\33\1\u0105\32\0\2\33\7\0"+ + "\15\33\4\0\13\33\1\u0106\14\33\32\0\2\33\7\0"+ + "\15\33\4\0\15\33\1\u0107\12\33\15\0\1\u0108\14\0"+ + "\2\354\7\0\6\354\14\0\6\354\53\0\2\33\7\0"+ + "\15\33\4\0\1\33\1\u0109\26\33\32\0\2\33\7\0"+ + "\15\33\4\0\14\33\1\u010a\13\33\32\0\2\33\7\0"+ + "\15\33\4\0\22\33\1\u010b\5\33\32\0\2\33\7\0"+ + "\15\33\4\0\5\33\1\u010c\22\33\32\0\2\33\7\0"+ + "\15\33\4\0\6\33\1\u010d\6\33\1\u010e\12\33\32\0"+ + "\2\33\7\0\15\33\4\0\27\33\1\u010f\32\0\2\33"+ + "\7\0\15\33\4\0\5\33\1\u0110\22\33\32\0\2\33"+ + "\7\0\15\33\4\0\13\33\1\u0111\14\33\32\0\2\33"+ + "\7\0\15\33\4\0\3\33\1\u0112\24\33\32\0\2\33"+ + "\7\0\15\33\4\0\15\33\1\u0113\12\33\32\0\2\33"+ + "\7\0\15\33\4\0\3\33\1\u0114\24\33\32\0\2\33"+ + "\7\0\15\33\4\0\22\33\1\u0115\5\33\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\u0116\26\33\32\0\2\33"+ + "\7\0\15\33\4\0\17\33\1\u0117\10\33\32\0\2\33"+ + "\7\0\15\33\4\0\21\33\1\u0118\6\33\32\0\2\33"+ + "\7\0\15\33\4\0\15\33\1\u0119\12\33\32\0\2\33"+ + "\7\0\15\33\4\0\23\33\1\u011a\4\33\32\0\2\33"+ + "\7\0\15\33\4\0\13\33\1\u011b\14\33\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\u011c\26\33\32\0\2\33"+ + "\7\0\15\33\4\0\2\33\1\u011d\25\33\32\0\2\33"+ + "\7\0\15\33\4\0\5\33\1\u011e\22\33\32\0\2\33"+ + "\7\0\15\33\4\0\4\33\1\u011f\23\33\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\u0120\26\33\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\u0121\26\33\32\0\2\33"+ + "\7\0\15\33\4\0\1\33\1\u0122\26\33\32\0\2\33"+ + "\7\0\15\33\4\0\15\33\1\u0123\12\33\32\0\2\33"+ + "\7\0\15\33\4\0\5\33\1\u0124\22\33\32\0\2\33"+ + "\7\0\15\33\4\0\3\33\1\u0125\24\33\32\0\2\33"+ + "\7\0\15\33\4\0\27\33\1\u0126\32\0\2\33\7\0"+ + "\15\33\4\0\22\33\1\u0127\5\33\32\0\2\33\7\0"+ + "\15\33\4\0\5\33\1\u0128\22\33\32\0\2\33\7\0"+ + "\15\33\4\0\13\33\1\u0129\14\33\32\0\2\33\7\0"+ + "\15\33\4\0\13\33\1\u012a\14\33\32\0\2\33\7\0"+ + "\15\33\4\0\15\33\1\u012b\12\33\32\0\2\33\7\0"+ + "\15\33\4\0\3\33\1\u012c\24\33\32\0\2\33\7\0"+ + "\15\33\4\0\13\33\1\u012d\14\33\32\0\2\33\7\0"+ + "\15\33\4\0\2\33\1\u012e\25\33\32\0\2\33\7\0"+ + "\15\33\4\0\22\33\1\u012f\5\33\32\0\2\33\7\0"+ + "\15\33\4\0\1\33\1\u0130\26\33\32\0\2\33\7\0"+ + "\15\33\4\0\5\33\1\u0131\22\33\32\0\2\33\7\0"+ + "\15\33\4\0\22\33\1\u0132\5\33\32\0\2\33\7\0"+ + "\15\33\4\0\5\33\1\u0133\22\33\32\0\2\33\7\0"+ + "\15\33\4\0\13\33\1\u0134\14\33\32\0\2\33\7\0"+ + "\15\33\4\0\20\33\1\u0135\7\33\32\0\2\33\7\0"+ + "\15\33\4\0\13\33\1\u0136\14\33\32\0\2\33\7\0"+ + "\15\33\4\0\21\33\1\u0137\6\33\32\0\2\33\7\0"+ + "\15\33\4\0\5\33\1\u0138\22\33\32\0\2\33\7\0"+ + "\15\33\4\0\1\33\1\u0139\26\33\32\0\2\33\7\0"+ + "\15\33\4\0\13\33\1\u013a\14\33\32\0\2\33\7\0"+ + "\15\33\4\0\15\33\1\u013b\12\33\32\0\2\33\7\0"+ + "\15\33\4\0\22\33\1\u013c\5\33\7\0"; private static int [] zzUnpacktrans() { - int [] result = new int[17025]; + int [] result = new int[17328]; int offset = 0; offset = zzUnpacktrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -489,16 +490,16 @@ private static int zzUnpacktrans(String packed, int offset, int [] result) { private static final String ZZ_ATTRIBUTE_PACKED_0 = "\1\0\1\11\5\1\1\11\1\1\2\11\2\1\1\11"+ - "\5\1\2\11\3\1\2\11\7\1\1\11\1\1\2\11"+ + "\5\1\2\11\3\1\2\11\10\1\1\11\1\1\2\11"+ "\20\1\4\11\1\1\1\0\1\11\1\0\1\1\1\0"+ "\1\11\1\0\1\11\1\0\4\11\1\0\1\1\1\0"+ - "\1\11\2\0\6\11\12\1\2\0\33\1\1\11\1\0"+ - "\1\11\1\0\13\1\1\11\1\0\1\11\1\0\42\1"+ - "\1\0\26\1\1\0\23\1\1\0\17\1\1\0\17\1"+ + "\1\11\2\0\6\11\13\1\2\0\33\1\1\11\1\0"+ + "\1\11\1\0\14\1\1\11\1\0\1\11\1\0\41\1"+ + "\1\0\26\1\1\0\23\1\1\0\16\1\1\0\17\1"+ "\1\11\13\1\1\11\64\1"; private static int [] zzUnpackAttribute() { - int [] result = new int[315]; + int [] result = new int[316]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -833,7 +834,7 @@ else if (zzAtEOF) { // fall through case 108: break; case 5: - { return INTERSECTION; + { return AMPERSAND; } // fall through case 109: break; @@ -943,7 +944,7 @@ else if (zzAtEOF) { // fall through case 130: break; case 27: - { return UNION; + { return PIPE; } // fall through case 131: break; @@ -1113,47 +1114,47 @@ else if (zzAtEOF) { // fall through case 164: break; case 61: - { return BOOLEANLITERAL; + { return PASS; } // fall through case 165: break; case 62: - { return BOOL; + { return BOOLEANLITERAL; } // fall through case 166: break; case 63: - { return ELIF; + { return BOOL; } // fall through case 167: break; case 64: - { return ELSE; + { return ELIF; } // fall through case 168: break; case 65: - { return ENUM; + { return ELSE; } // fall through case 169: break; case 66: - { return FLAG; + { return ENUM; } // fall through case 170: break; case 67: - { return FROM; + { return FLAG; } // fall through case 171: break; case 68: - { return INTM; + { return FROM; } // fall through case 172: break; case 69: - { return PASS; + { return INTM; } // fall through case 173: break; @@ -1163,22 +1164,22 @@ else if (zzAtEOF) { // fall through case 174: break; case 71: - { return VIEW; + { return SELF; } // fall through case 175: break; case 72: - { return BYTES; + { return VIEW; } // fall through case 176: break; case 73: - { return BREAK; + { return BYTES; } // fall through case 177: break; case 74: - { return CLEAR; + { return BREAK; } // fall through case 178: break; diff --git a/src/main/gen/org/vyperlang/plugin/parser/BaseVyperParser.java b/src/main/gen/org/vyperlang/plugin/parser/BaseVyperParser.java index 3a48f27..b32cf84 100644 --- a/src/main/gen/org/vyperlang/plugin/parser/BaseVyperParser.java +++ b/src/main/gen/org/vyperlang/plugin/parser/BaseVyperParser.java @@ -37,13 +37,12 @@ static boolean parse_root_(IElementType t, PsiBuilder b, int l) { public static final TokenSet[] EXTENDS_SETS_ = new TokenSet[] { create_token_set_(AND_EXPRESSION, ASSERT_EXPRESSION, ASSIGNMENT_EXPRESSION, BIN_EXPRESSION, - CALL_EXPRESSION, CLEAR_EXPRESSION, COMP_EXPRESSION, CONSTANT_DEFINITION_EXPRESSION, - EQ_EXPRESSION, EVENT_LOG_EXPRESSION, EXPONENT_EXPRESSION, EXPRESSION, - EXT_CALL_EXPRESSION, IMMUTABLE_DEFINITION_EXPRESSION, INDEX_ACCESS_EXPRESSION, INLINE_ARRAY_EXPRESSION, - IN_EXPRESSION, MEMBER_ACCESS_EXPRESSION, MEMBER_INDEX_ACCESS, MULT_DIV_EXPRESSION, - OR_EXPRESSION, PARENTHESIZIED_EXPRESSION, PLUS_MIN_EXPRESSION, PRIMARY_EXPRESSION, - RANGE_EXPRESSION, STATIC_CALL_EXPRESSION, STRUCT_EXPRESSION, TERNARY_EXPRESSION, - TUPLE_ASSIGNMENT_EXPRESSION, UNARY_EXPRESSION), + CALL_EXPRESSION, COMP_EXPRESSION, CONSTANT_DEFINITION_EXPRESSION, EQ_EXPRESSION, + EVENT_LOG_EXPRESSION, EXPONENT_EXPRESSION, EXPRESSION, EXT_CALL_EXPRESSION, + IMMUTABLE_DEFINITION_EXPRESSION, INDEX_ACCESS_EXPRESSION, INLINE_ARRAY_EXPRESSION, IN_EXPRESSION, + MEMBER_ACCESS_EXPRESSION, MULT_DIV_EXPRESSION, OR_EXPRESSION, PARENTHESIZED_EXPRESSION, + PLUS_MIN_EXPRESSION, PRIMARY_EXPRESSION, RANGE_EXPRESSION, STATIC_CALL_EXPRESSION, + STRUCT_EXPRESSION, TERNARY_EXPRESSION, TUPLE_ASSIGNMENT_EXPRESSION, UNARY_EXPRESSION), }; /* ********************************************************** */ @@ -1600,9 +1599,7 @@ static boolean HexNumber(PsiBuilder b, int l) { } /* ********************************************************** */ - // if &INDNONE CondStmt - // (&INDEQ ElifStmt)* - // (&INDEQ ElseStmt)? + // if &INDNONE CondStmt (&INDEQ ElifStmt)* (&INDEQ ElseStmt)? public static boolean IfStatement(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "IfStatement")) return false; if (!nextTokenIs(b, IF)) return false; @@ -2453,7 +2450,7 @@ private static boolean ParamDef_3_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // PASS + // pass static boolean PassStatement(PsiBuilder b, int l) { return consumeToken(b, PASS); } @@ -2502,67 +2499,6 @@ private static boolean RangeBound_3(PsiBuilder b, int l) { return r; } - /* ********************************************************** */ - // (VarLiteral | NumberLiteral) (&INDNONE ',' &INDNONE Expression)? - static boolean RangeInterval(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "RangeInterval")) return false; - boolean r; - Marker m = enter_section_(b); - r = RangeInterval_0(b, l + 1); - r = r && RangeInterval_1(b, l + 1); - exit_section_(b, m, null, r); - return r; - } - - // VarLiteral | NumberLiteral - private static boolean RangeInterval_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "RangeInterval_0")) return false; - boolean r; - r = VarLiteral(b, l + 1); - if (!r) r = NumberLiteral(b, l + 1); - return r; - } - - // (&INDNONE ',' &INDNONE Expression)? - private static boolean RangeInterval_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "RangeInterval_1")) return false; - RangeInterval_1_0(b, l + 1); - return true; - } - - // &INDNONE ',' &INDNONE Expression - private static boolean RangeInterval_1_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "RangeInterval_1_0")) return false; - boolean r; - Marker m = enter_section_(b); - r = RangeInterval_1_0_0(b, l + 1); - r = r && consumeToken(b, COMMA); - r = r && RangeInterval_1_0_2(b, l + 1); - r = r && Expression(b, l + 1, -1); - exit_section_(b, m, null, r); - return r; - } - - // &INDNONE - private static boolean RangeInterval_1_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "RangeInterval_1_0_0")) return false; - boolean r; - Marker m = enter_section_(b, l, _AND_); - r = indNone(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // &INDNONE - private static boolean RangeInterval_1_0_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "RangeInterval_1_0_2")) return false; - boolean r; - Marker m = enter_section_(b, l, _AND_); - r = indNone(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - /* ********************************************************** */ // return (&INDNONE Expression (',' Expression)*)? static boolean Return(PsiBuilder b, int l) { @@ -3325,29 +3261,27 @@ private static boolean recoverStatement_0_1(PsiBuilder b, int l) { // 1: BINARY(AssignmentExpression) // 2: PREFIX(TupleAssignmentExpression) // 3: ATOM(RangeExpression) - // 4: ATOM(ParenthesiziedExpression) - // 5: POSTFIX(CallExpression) - // 6: ATOM(StructExpression) - // 7: ATOM(AssertExpression) - // 8: BINARY(EqExpression) - // 9: BINARY(OrExpression) - // 10: BINARY(AndExpression) - // 11: BINARY(CompExpression) - // 12: BINARY(PlusMinExpression) - // 13: BINARY(MultDivExpression) - // 14: BINARY(ExponentExpression) - // 15: BINARY(BinExpression) - // 16: PREFIX(UnaryExpression) - // 17: ATOM(ClearExpression) - // 18: BINARY(IndexAccessExpression) - // 19: POSTFIX(MemberAccessExpression) - // 20: BINARY(MemberIndexAccess) - // 21: ATOM(InlineArrayExpression) - // 22: ATOM(PrimaryExpression) - // 23: ATOM(EventLogExpression) - // 24: BINARY(InExpression) - // 25: PREFIX(ExtCallExpression) - // 26: PREFIX(StaticCallExpression) + // 4: BINARY(IndexAccessExpression) + // 5: ATOM(UnaryExpression) + // 6: POSTFIX(CallExpression) + // 7: ATOM(StructExpression) + // 8: ATOM(AssertExpression) + // 9: BINARY(EqExpression) + // 10: BINARY(OrExpression) + // 11: BINARY(AndExpression) + // 12: BINARY(CompExpression) + // 13: BINARY(PlusMinExpression) + // 14: BINARY(MultDivExpression) + // 15: BINARY(ExponentExpression) + // 16: BINARY(BinExpression) + // 17: POSTFIX(MemberAccessExpression) + // 18: ATOM(InlineArrayExpression) + // 19: ATOM(EventLogExpression) + // 20: PREFIX(ExtCallExpression) + // 21: PREFIX(StaticCallExpression) + // 22: BINARY(InExpression) + // 23: ATOM(PrimaryExpression) + // 24: ATOM(ParenthesizedExpression) public static boolean Expression(PsiBuilder b, int l, int g) { if (!recursion_guard_(b, l, "Expression")) return false; addVariant(b, ""); @@ -3355,16 +3289,15 @@ public static boolean Expression(PsiBuilder b, int l, int g) { Marker m = enter_section_(b, l, _NONE_, ""); r = TupleAssignmentExpression(b, l + 1); if (!r) r = RangeExpression(b, l + 1); - if (!r) r = ParenthesiziedExpression(b, l + 1); + if (!r) r = UnaryExpression(b, l + 1); if (!r) r = StructExpression(b, l + 1); if (!r) r = AssertExpression(b, l + 1); - if (!r) r = UnaryExpression(b, l + 1); - if (!r) r = ClearExpression(b, l + 1); if (!r) r = InlineArrayExpression(b, l + 1); - if (!r) r = PrimaryExpression(b, l + 1); if (!r) r = EventLogExpression(b, l + 1); if (!r) r = ExtCallExpression(b, l + 1); if (!r) r = StaticCallExpression(b, l + 1); + if (!r) r = PrimaryExpression(b, l + 1); + if (!r) r = ParenthesizedExpression(b, l + 1); p = r; r = r && Expression_0(b, l + 1, g); exit_section_(b, l, m, null, r, p, null); @@ -3385,58 +3318,53 @@ else if (g < 1 && AssignmentExpression_0(b, l + 1)) { r = Expression(b, l, 0); exit_section_(b, l, m, ASSIGNMENT_EXPRESSION, r, true, null); } - else if (g < 5 && CallExpression_0(b, l + 1)) { + else if (g < 4 && IndexAccessExpression_0(b, l + 1)) { + r = report_error_(b, Expression(b, l, 4)); + r = consumeToken(b, RBRACKET) && r; + exit_section_(b, l, m, INDEX_ACCESS_EXPRESSION, r, true, null); + } + else if (g < 6 && CallExpression_0(b, l + 1)) { r = true; exit_section_(b, l, m, CALL_EXPRESSION, r, true, null); } - else if (g < 8 && EqExpression_0(b, l + 1)) { - r = Expression(b, l, 8); + else if (g < 9 && EqExpression_0(b, l + 1)) { + r = Expression(b, l, 9); exit_section_(b, l, m, EQ_EXPRESSION, r, true, null); } - else if (g < 9 && consumeTokenSmart(b, OR)) { - r = Expression(b, l, 9); + else if (g < 10 && consumeTokenSmart(b, OR)) { + r = Expression(b, l, 10); exit_section_(b, l, m, OR_EXPRESSION, r, true, null); } - else if (g < 10 && consumeTokenSmart(b, AND)) { - r = Expression(b, l, 10); + else if (g < 11 && consumeTokenSmart(b, AND)) { + r = Expression(b, l, 11); exit_section_(b, l, m, AND_EXPRESSION, r, true, null); } - else if (g < 11 && CompExpression_0(b, l + 1)) { - r = Expression(b, l, 11); + else if (g < 12 && CompExpression_0(b, l + 1)) { + r = Expression(b, l, 12); exit_section_(b, l, m, COMP_EXPRESSION, r, true, null); } - else if (g < 12 && PlusMinExpression_0(b, l + 1)) { - r = Expression(b, l, 12); + else if (g < 13 && PlusMinExpression_0(b, l + 1)) { + r = Expression(b, l, 13); exit_section_(b, l, m, PLUS_MIN_EXPRESSION, r, true, null); } - else if (g < 13 && MultDivExpression_0(b, l + 1)) { - r = Expression(b, l, 13); + else if (g < 14 && MultDivExpression_0(b, l + 1)) { + r = Expression(b, l, 14); exit_section_(b, l, m, MULT_DIV_EXPRESSION, r, true, null); } - else if (g < 14 && consumeTokenSmart(b, EXPONENT)) { - r = Expression(b, l, 14); + else if (g < 15 && consumeTokenSmart(b, EXPONENT)) { + r = Expression(b, l, 15); exit_section_(b, l, m, EXPONENT_EXPRESSION, r, true, null); } - else if (g < 15 && BinExpression_0(b, l + 1)) { - r = Expression(b, l, 15); + else if (g < 16 && BinExpression_0(b, l + 1)) { + r = Expression(b, l, 16); exit_section_(b, l, m, BIN_EXPRESSION, r, true, null); } - else if (g < 18 && IndexAccessExpression_0(b, l + 1)) { - r = report_error_(b, Expression(b, l, 18)); - r = consumeToken(b, RBRACKET) && r; - exit_section_(b, l, m, INDEX_ACCESS_EXPRESSION, r, true, null); - } - else if (g < 19 && MemberAccessExpression_0(b, l + 1)) { + else if (g < 17 && MemberAccessExpression_0(b, l + 1)) { r = true; exit_section_(b, l, m, MEMBER_ACCESS_EXPRESSION, r, true, null); } - else if (g < 20 && MemberIndexAccess_0(b, l + 1)) { - r = report_error_(b, Expression(b, l, 20)); - r = MemberIndexAccess_1(b, l + 1) && r; - exit_section_(b, l, m, MEMBER_INDEX_ACCESS, r, true, null); - } - else if (g < 24 && InExpression_0(b, l + 1)) { - r = Expression(b, l, 24); + else if (g < 22 && InExpression_0(b, l + 1)) { + r = Expression(b, l, 22); exit_section_(b, l, m, IN_EXPRESSION, r, true, null); } else { @@ -3558,12 +3486,12 @@ public static boolean TupleAssignmentExpression(PsiBuilder b, int l) { return r || p; } - // Identifier (',' Identifier)+ &INDNONE '=' + // VarLiteral (',' VarLiteral)+ &INDNONE '=' private static boolean TupleAssignmentExpression_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "TupleAssignmentExpression_0")) return false; boolean r; Marker m = enter_section_(b); - r = consumeTokenSmart(b, IDENTIFIER); + r = VarLiteral(b, l + 1); r = r && TupleAssignmentExpression_0_1(b, l + 1); r = r && TupleAssignmentExpression_0_2(b, l + 1); r = r && consumeToken(b, ASSIGN); @@ -3571,7 +3499,7 @@ private static boolean TupleAssignmentExpression_0(PsiBuilder b, int l) { return r; } - // (',' Identifier)+ + // (',' VarLiteral)+ private static boolean TupleAssignmentExpression_0_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "TupleAssignmentExpression_0_1")) return false; boolean r; @@ -3586,12 +3514,13 @@ private static boolean TupleAssignmentExpression_0_1(PsiBuilder b, int l) { return r; } - // ',' Identifier + // ',' VarLiteral private static boolean TupleAssignmentExpression_0_1_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "TupleAssignmentExpression_0_1_0")) return false; boolean r; Marker m = enter_section_(b); - r = consumeTokensSmart(b, 0, COMMA, IDENTIFIER); + r = consumeTokenSmart(b, COMMA); + r = r && VarLiteral(b, l + 1); exit_section_(b, m, null, r); return r; } @@ -3606,7 +3535,7 @@ private static boolean TupleAssignmentExpression_0_2(PsiBuilder b, int l) { return r; } - // range &INDNONE '(' RangeInterval RangeBound? ')' + // range &INDNONE '(' Expression (',' Expression)? RangeBound? ')' public static boolean RangeExpression(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "RangeExpression")) return false; if (!nextTokenIsSmart(b, RANGE)) return false; @@ -3615,8 +3544,9 @@ public static boolean RangeExpression(PsiBuilder b, int l) { r = consumeTokenSmart(b, RANGE); r = r && RangeExpression_1(b, l + 1); r = r && consumeToken(b, LPAREN); - r = r && RangeInterval(b, l + 1); + r = r && Expression(b, l + 1, -1); r = r && RangeExpression_4(b, l + 1); + r = r && RangeExpression_5(b, l + 1); r = r && consumeToken(b, RPAREN); exit_section_(b, m, RANGE_EXPRESSION, r); return r; @@ -3632,67 +3562,45 @@ private static boolean RangeExpression_1(PsiBuilder b, int l) { return r; } - // RangeBound? + // (',' Expression)? private static boolean RangeExpression_4(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "RangeExpression_4")) return false; - RangeBound(b, l + 1); + RangeExpression_4_0(b, l + 1); return true; } - // '(' Expression ')' - public static boolean ParenthesiziedExpression(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "ParenthesiziedExpression")) return false; - if (!nextTokenIsSmart(b, LPAREN)) return false; - boolean r, p; - Marker m = enter_section_(b, l, _NONE_, PARENTHESIZIED_EXPRESSION, null); - r = consumeTokenSmart(b, LPAREN); - p = r; // pin = 1 - r = r && report_error_(b, Expression(b, l + 1, -1)); - r = p && consumeToken(b, RPAREN) && r; - exit_section_(b, l, m, r, p, null); - return r || p; - } - - // ( &INDNONE '[' Expression ']' )* &INDNONE FunctionCallArguments (&INDNONE FunctionCallArguments)* - private static boolean CallExpression_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CallExpression_0")) return false; + // ',' Expression + private static boolean RangeExpression_4_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "RangeExpression_4_0")) return false; boolean r; Marker m = enter_section_(b); - r = CallExpression_0_0(b, l + 1); - r = r && CallExpression_0_1(b, l + 1); - r = r && FunctionCallArguments(b, l + 1); - r = r && CallExpression_0_3(b, l + 1); + r = consumeTokenSmart(b, COMMA); + r = r && Expression(b, l + 1, -1); exit_section_(b, m, null, r); return r; } - // ( &INDNONE '[' Expression ']' )* - private static boolean CallExpression_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CallExpression_0_0")) return false; - while (true) { - int c = current_position_(b); - if (!CallExpression_0_0_0(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "CallExpression_0_0", c)) break; - } + // RangeBound? + private static boolean RangeExpression_5(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "RangeExpression_5")) return false; + RangeBound(b, l + 1); return true; } - // &INDNONE '[' Expression ']' - private static boolean CallExpression_0_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CallExpression_0_0_0")) return false; + // &INDNONE '[' + private static boolean IndexAccessExpression_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "IndexAccessExpression_0")) return false; boolean r; Marker m = enter_section_(b); - r = CallExpression_0_0_0_0(b, l + 1); + r = IndexAccessExpression_0_0(b, l + 1); r = r && consumeTokenSmart(b, LBRACKET); - r = r && Expression(b, l + 1, -1); - r = r && consumeToken(b, RBRACKET); exit_section_(b, m, null, r); return r; } // &INDNONE - private static boolean CallExpression_0_0_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CallExpression_0_0_0_0")) return false; + private static boolean IndexAccessExpression_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "IndexAccessExpression_0_0")) return false; boolean r; Marker m = enter_section_(b, l, _AND_); r = indNone(b, l + 1); @@ -3700,9 +3608,33 @@ private static boolean CallExpression_0_0_0_0(PsiBuilder b, int l) { return r; } + // (not | '~' | '+' | '-') &INDNONE Expression + public static boolean UnaryExpression(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "UnaryExpression")) return false; + boolean r, p; + Marker m = enter_section_(b, l, _COLLAPSE_, UNARY_EXPRESSION, ""); + r = UnaryExpression_0(b, l + 1); + p = r; // pin = 1 + r = r && report_error_(b, UnaryExpression_1(b, l + 1)); + r = p && Expression(b, l + 1, -1) && r; + exit_section_(b, l, m, r, p, null); + return r || p; + } + + // not | '~' | '+' | '-' + private static boolean UnaryExpression_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "UnaryExpression_0")) return false; + boolean r; + r = consumeTokenSmart(b, NOT); + if (!r) r = consumeTokenSmart(b, TILDE); + if (!r) r = consumeTokenSmart(b, PLUS); + if (!r) r = consumeTokenSmart(b, MINUS); + return r; + } + // &INDNONE - private static boolean CallExpression_0_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CallExpression_0_1")) return false; + private static boolean UnaryExpression_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "UnaryExpression_1")) return false; boolean r; Marker m = enter_section_(b, l, _AND_); r = indNone(b, l + 1); @@ -3710,31 +3642,20 @@ private static boolean CallExpression_0_1(PsiBuilder b, int l) { return r; } - // (&INDNONE FunctionCallArguments)* - private static boolean CallExpression_0_3(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CallExpression_0_3")) return false; - while (true) { - int c = current_position_(b); - if (!CallExpression_0_3_0(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "CallExpression_0_3", c)) break; - } - return true; - } - // &INDNONE FunctionCallArguments - private static boolean CallExpression_0_3_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CallExpression_0_3_0")) return false; + private static boolean CallExpression_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CallExpression_0")) return false; boolean r; Marker m = enter_section_(b); - r = CallExpression_0_3_0_0(b, l + 1); + r = CallExpression_0_0(b, l + 1); r = r && FunctionCallArguments(b, l + 1); exit_section_(b, m, null, r); return r; } // &INDNONE - private static boolean CallExpression_0_3_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CallExpression_0_3_0_0")) return false; + private static boolean CallExpression_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CallExpression_0_0")) return false; boolean r; Marker m = enter_section_(b, l, _AND_); r = indNone(b, l + 1); @@ -3869,109 +3790,19 @@ private static boolean MultDivExpression_0(PsiBuilder b, int l) { return r; } - // UNION | INTERSECTION | RSHIFT | LSHIFT | CARET + // PIPE | AMPERSAND | RSHIFT | LSHIFT | CARET private static boolean BinExpression_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "BinExpression_0")) return false; boolean r; - r = consumeTokenSmart(b, UNION); - if (!r) r = consumeTokenSmart(b, INTERSECTION); + r = consumeTokenSmart(b, PIPE); + if (!r) r = consumeTokenSmart(b, AMPERSAND); if (!r) r = consumeTokenSmart(b, RSHIFT); if (!r) r = consumeTokenSmart(b, LSHIFT); if (!r) r = consumeTokenSmart(b, CARET); return r; } - public static boolean UnaryExpression(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "UnaryExpression")) return false; - boolean r, p; - Marker m = enter_section_(b, l, _NONE_, null); - r = UnaryExpression_0(b, l + 1); - p = r; - r = p && Expression(b, l, 16); - exit_section_(b, l, m, UNARY_EXPRESSION, r, p, null); - return r || p; - } - - // ('not' | '~' | '+' | '-') &INDNONE - private static boolean UnaryExpression_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "UnaryExpression_0")) return false; - boolean r; - Marker m = enter_section_(b); - r = UnaryExpression_0_0(b, l + 1); - r = r && UnaryExpression_0_1(b, l + 1); - exit_section_(b, m, null, r); - return r; - } - - // 'not' | '~' | '+' | '-' - private static boolean UnaryExpression_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "UnaryExpression_0_0")) return false; - boolean r; - r = consumeTokenSmart(b, NOT); - if (!r) r = consumeTokenSmart(b, TILDE); - if (!r) r = consumeTokenSmart(b, PLUS); - if (!r) r = consumeTokenSmart(b, MINUS); - return r; - } - - // &INDNONE - private static boolean UnaryExpression_0_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "UnaryExpression_0_1")) return false; - boolean r; - Marker m = enter_section_(b, l, _AND_); - r = indNone(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // clear &INDNONE '(' Expression ')' - public static boolean ClearExpression(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "ClearExpression")) return false; - if (!nextTokenIsSmart(b, CLEAR)) return false; - boolean r, p; - Marker m = enter_section_(b, l, _NONE_, CLEAR_EXPRESSION, null); - r = consumeTokenSmart(b, CLEAR); - p = r; // pin = 1 - r = r && report_error_(b, ClearExpression_1(b, l + 1)); - r = p && report_error_(b, consumeToken(b, LPAREN)) && r; - r = p && report_error_(b, Expression(b, l + 1, -1)) && r; - r = p && consumeToken(b, RPAREN) && r; - exit_section_(b, l, m, r, p, null); - return r || p; - } - - // &INDNONE - private static boolean ClearExpression_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "ClearExpression_1")) return false; - boolean r; - Marker m = enter_section_(b, l, _AND_); - r = indNone(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // &INDNONE '[' - private static boolean IndexAccessExpression_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "IndexAccessExpression_0")) return false; - boolean r; - Marker m = enter_section_(b); - r = IndexAccessExpression_0_0(b, l + 1); - r = r && consumeTokenSmart(b, LBRACKET); - exit_section_(b, m, null, r); - return r; - } - - // &INDNONE - private static boolean IndexAccessExpression_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "IndexAccessExpression_0_0")) return false; - boolean r; - Marker m = enter_section_(b, l, _AND_); - r = indNone(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // &INDNONE '.' (&INDNONE VarLiteral) + // &INDNONE '.' &INDNONE VarLiteral private static boolean MemberAccessExpression_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "MemberAccessExpression_0")) return false; boolean r; @@ -3979,6 +3810,7 @@ private static boolean MemberAccessExpression_0(PsiBuilder b, int l) { r = MemberAccessExpression_0_0(b, l + 1); r = r && consumeTokenSmart(b, DOT); r = r && MemberAccessExpression_0_2(b, l + 1); + r = r && VarLiteral(b, l + 1); exit_section_(b, m, null, r); return r; } @@ -3993,65 +3825,10 @@ private static boolean MemberAccessExpression_0_0(PsiBuilder b, int l) { return r; } - // &INDNONE VarLiteral + // &INDNONE private static boolean MemberAccessExpression_0_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "MemberAccessExpression_0_2")) return false; boolean r; - Marker m = enter_section_(b); - r = MemberAccessExpression_0_2_0(b, l + 1); - r = r && VarLiteral(b, l + 1); - exit_section_(b, m, null, r); - return r; - } - - // &INDNONE - private static boolean MemberAccessExpression_0_2_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "MemberAccessExpression_0_2_0")) return false; - boolean r; - Marker m = enter_section_(b, l, _AND_); - r = indNone(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // &INDNONE '.' - private static boolean MemberIndexAccess_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "MemberIndexAccess_0")) return false; - boolean r; - Marker m = enter_section_(b); - r = MemberIndexAccess_0_0(b, l + 1); - r = r && consumeTokenSmart(b, DOT); - exit_section_(b, m, null, r); - return r; - } - - // &INDNONE - private static boolean MemberIndexAccess_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "MemberIndexAccess_0_0")) return false; - boolean r; - Marker m = enter_section_(b, l, _AND_); - r = indNone(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // &INDNONE '[' Expression ']' - private static boolean MemberIndexAccess_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "MemberIndexAccess_1")) return false; - boolean r; - Marker m = enter_section_(b); - r = MemberIndexAccess_1_0(b, l + 1); - r = r && consumeToken(b, LBRACKET); - r = r && Expression(b, l + 1, -1); - r = r && consumeToken(b, RBRACKET); - exit_section_(b, m, null, r); - return r; - } - - // &INDNONE - private static boolean MemberIndexAccess_1_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "MemberIndexAccess_1_0")) return false; - boolean r; Marker m = enter_section_(b, l, _AND_); r = indNone(b, l + 1); exit_section_(b, l, m, r, false, null); @@ -4117,23 +3894,7 @@ private static boolean InlineArrayExpression_2_0_1_1(PsiBuilder b, int l) { return r; } - // VarLiteral | BooleanLiteral | NumberLiteral | HexLiteral | StringLiteral - // | TYPE - public static boolean PrimaryExpression(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "PrimaryExpression")) return false; - boolean r; - Marker m = enter_section_(b, l, _NONE_, PRIMARY_EXPRESSION, ""); - r = VarLiteral(b, l + 1); - if (!r) r = BooleanLiteral(b, l + 1); - if (!r) r = NumberLiteral(b, l + 1); - if (!r) r = HexLiteral(b, l + 1); - if (!r) r = StringLiteral(b, l + 1); - if (!r) r = TYPE(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // log &INDNONE VarLiteral FunctionCallArguments + // log (&INDNONE Identifier '.')? &INDNONE VarLiteral FunctionCallArguments public static boolean EventLogExpression(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "EventLogExpression")) return false; if (!nextTokenIsSmart(b, LOG)) return false; @@ -4141,15 +3902,34 @@ public static boolean EventLogExpression(PsiBuilder b, int l) { Marker m = enter_section_(b); r = consumeTokenSmart(b, LOG); r = r && EventLogExpression_1(b, l + 1); + r = r && EventLogExpression_2(b, l + 1); r = r && VarLiteral(b, l + 1); r = r && FunctionCallArguments(b, l + 1); exit_section_(b, m, EVENT_LOG_EXPRESSION, r); return r; } - // &INDNONE + // (&INDNONE Identifier '.')? private static boolean EventLogExpression_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "EventLogExpression_1")) return false; + EventLogExpression_1_0(b, l + 1); + return true; + } + + // &INDNONE Identifier '.' + private static boolean EventLogExpression_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "EventLogExpression_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = EventLogExpression_1_0_0(b, l + 1); + r = r && consumeTokensSmart(b, 0, IDENTIFIER, DOT); + exit_section_(b, m, null, r); + return r; + } + + // &INDNONE + private static boolean EventLogExpression_1_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "EventLogExpression_1_0_0")) return false; boolean r; Marker m = enter_section_(b, l, _AND_); r = indNone(b, l + 1); @@ -4157,6 +3937,40 @@ private static boolean EventLogExpression_1(PsiBuilder b, int l) { return r; } + // &INDNONE + private static boolean EventLogExpression_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "EventLogExpression_2")) return false; + boolean r; + Marker m = enter_section_(b, l, _AND_); + r = indNone(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; + } + + public static boolean ExtCallExpression(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ExtCallExpression")) return false; + if (!nextTokenIsSmart(b, EXTCALL)) return false; + boolean r, p; + Marker m = enter_section_(b, l, _NONE_, null); + r = consumeTokenSmart(b, EXTCALL); + p = r; + r = p && Expression(b, l, 20); + exit_section_(b, l, m, EXT_CALL_EXPRESSION, r, p, null); + return r || p; + } + + public static boolean StaticCallExpression(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "StaticCallExpression")) return false; + if (!nextTokenIsSmart(b, STATICCALL)) return false; + boolean r, p; + Marker m = enter_section_(b, l, _NONE_, null); + r = consumeTokenSmart(b, STATICCALL); + p = r; + r = p && Expression(b, l, 21); + exit_section_(b, l, m, STATIC_CALL_EXPRESSION, r, p, null); + return r || p; + } + // (&INDNONE not)? &INDNONE in &INDNONE private static boolean InExpression_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "InExpression_0")) return false; @@ -4218,27 +4032,34 @@ private static boolean InExpression_0_3(PsiBuilder b, int l) { return r; } - public static boolean ExtCallExpression(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "ExtCallExpression")) return false; - if (!nextTokenIsSmart(b, EXTCALL)) return false; - boolean r, p; - Marker m = enter_section_(b, l, _NONE_, null); - r = consumeTokenSmart(b, EXTCALL); - p = r; - r = p && Expression(b, l, 25); - exit_section_(b, l, m, EXT_CALL_EXPRESSION, r, p, null); - return r || p; + // VarLiteral | BooleanLiteral | NumberLiteral | HexLiteral | StringLiteral | self + // | TYPE + public static boolean PrimaryExpression(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "PrimaryExpression")) return false; + boolean r; + Marker m = enter_section_(b, l, _NONE_, PRIMARY_EXPRESSION, ""); + r = VarLiteral(b, l + 1); + if (!r) r = BooleanLiteral(b, l + 1); + if (!r) r = NumberLiteral(b, l + 1); + if (!r) r = HexLiteral(b, l + 1); + if (!r) r = StringLiteral(b, l + 1); + if (!r) r = consumeTokenSmart(b, SELF); + if (!r) r = TYPE(b, l + 1); + exit_section_(b, l, m, r, false, null); + return r; } - public static boolean StaticCallExpression(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "StaticCallExpression")) return false; - if (!nextTokenIsSmart(b, STATICCALL)) return false; + // '(' Expression ')' + public static boolean ParenthesizedExpression(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ParenthesizedExpression")) return false; + if (!nextTokenIsSmart(b, LPAREN)) return false; boolean r, p; - Marker m = enter_section_(b, l, _NONE_, null); - r = consumeTokenSmart(b, STATICCALL); - p = r; - r = p && Expression(b, l, -1); - exit_section_(b, l, m, STATIC_CALL_EXPRESSION, r, p, null); + Marker m = enter_section_(b, l, _NONE_, PARENTHESIZED_EXPRESSION, null); + r = consumeTokenSmart(b, LPAREN); + p = r; // pin = 1 + r = r && report_error_(b, Expression(b, l + 1, -1)); + r = p && consumeToken(b, RPAREN) && r; + exit_section_(b, l, m, r, p, null); return r || p; } diff --git a/src/main/gen/org/vyperlang/plugin/psi/VyperCallExpression.java b/src/main/gen/org/vyperlang/plugin/psi/VyperCallExpression.java index d5c3dd6..afdadb9 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/VyperCallExpression.java +++ b/src/main/gen/org/vyperlang/plugin/psi/VyperCallExpression.java @@ -8,9 +8,9 @@ public interface VyperCallExpression extends VyperExpression { @NotNull - List getExpressionList(); + VyperExpression getExpression(); @NotNull - List getFunctionCallArgumentsList(); + VyperFunctionCallArguments getFunctionCallArguments(); } diff --git a/src/main/gen/org/vyperlang/plugin/psi/VyperEventLogExpression.java b/src/main/gen/org/vyperlang/plugin/psi/VyperEventLogExpression.java index e5d8c68..9d4d7b7 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/VyperEventLogExpression.java +++ b/src/main/gen/org/vyperlang/plugin/psi/VyperEventLogExpression.java @@ -13,4 +13,7 @@ public interface VyperEventLogExpression extends VyperExpression { @NotNull VyperVarLiteral getVarLiteral(); + @Nullable + PsiElement getIdentifier(); + } diff --git a/src/main/gen/org/vyperlang/plugin/psi/VyperMemberIndexAccess.java b/src/main/gen/org/vyperlang/plugin/psi/VyperMemberIndexAccess.java deleted file mode 100644 index 464afe2..0000000 --- a/src/main/gen/org/vyperlang/plugin/psi/VyperMemberIndexAccess.java +++ /dev/null @@ -1,13 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package org.vyperlang.plugin.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface VyperMemberIndexAccess extends VyperExpression { - - @NotNull - List getExpressionList(); - -} diff --git a/src/main/gen/org/vyperlang/plugin/psi/VyperClearExpression.java b/src/main/gen/org/vyperlang/plugin/psi/VyperParenthesizedExpression.java similarity index 77% rename from src/main/gen/org/vyperlang/plugin/psi/VyperClearExpression.java rename to src/main/gen/org/vyperlang/plugin/psi/VyperParenthesizedExpression.java index d6987c8..5db817c 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/VyperClearExpression.java +++ b/src/main/gen/org/vyperlang/plugin/psi/VyperParenthesizedExpression.java @@ -5,7 +5,7 @@ import org.jetbrains.annotations.*; import com.intellij.psi.PsiElement; -public interface VyperClearExpression extends VyperExpression { +public interface VyperParenthesizedExpression extends VyperExpression { @Nullable VyperExpression getExpression(); diff --git a/src/main/gen/org/vyperlang/plugin/psi/VyperParenthesiziedExpression.java b/src/main/gen/org/vyperlang/plugin/psi/VyperParenthesiziedExpression.java deleted file mode 100644 index e9708ef..0000000 --- a/src/main/gen/org/vyperlang/plugin/psi/VyperParenthesiziedExpression.java +++ /dev/null @@ -1,13 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package org.vyperlang.plugin.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface VyperParenthesiziedExpression extends VyperExpression { - - @Nullable - VyperExpression getExpression(); - -} diff --git a/src/main/gen/org/vyperlang/plugin/psi/VyperRangeExpression.java b/src/main/gen/org/vyperlang/plugin/psi/VyperRangeExpression.java index d0298b6..358a402 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/VyperRangeExpression.java +++ b/src/main/gen/org/vyperlang/plugin/psi/VyperRangeExpression.java @@ -7,22 +7,10 @@ public interface VyperRangeExpression extends VyperExpression { - @Nullable - VyperExpression getExpression(); + @NotNull + List getExpressionList(); @Nullable VyperRangeBound getRangeBound(); - @Nullable - VyperVarLiteral getVarLiteral(); - - @Nullable - PsiElement getDecimalNumber(); - - @Nullable - PsiElement getFixedNumber(); - - @Nullable - PsiElement getHexNumber(); - } diff --git a/src/main/gen/org/vyperlang/plugin/psi/VyperTupleAssignmentExpression.java b/src/main/gen/org/vyperlang/plugin/psi/VyperTupleAssignmentExpression.java index 9708ecf..bcf3c1d 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/VyperTupleAssignmentExpression.java +++ b/src/main/gen/org/vyperlang/plugin/psi/VyperTupleAssignmentExpression.java @@ -10,4 +10,7 @@ public interface VyperTupleAssignmentExpression extends VyperExpression { @Nullable VyperExpression getExpression(); + @NotNull + List getVarLiteralList(); + } diff --git a/src/main/gen/org/vyperlang/plugin/psi/VyperTypes.java b/src/main/gen/org/vyperlang/plugin/psi/VyperTypes.java index 10c5b81..1b449ff 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/VyperTypes.java +++ b/src/main/gen/org/vyperlang/plugin/psi/VyperTypes.java @@ -13,7 +13,6 @@ public interface VyperTypes { IElementType ASSIGNMENT_EXPRESSION = new VyperElementType("ASSIGNMENT_EXPRESSION"); IElementType BIN_EXPRESSION = new VyperElementType("BIN_EXPRESSION"); IElementType CALL_EXPRESSION = new VyperElementType("CALL_EXPRESSION"); - IElementType CLEAR_EXPRESSION = new VyperElementType("CLEAR_EXPRESSION"); IElementType COMP_EXPRESSION = new VyperElementType("COMP_EXPRESSION"); IElementType CONSTANT_DEFINITION_EXPRESSION = new VyperElementType("CONSTANT_DEFINITION_EXPRESSION"); IElementType EQ_EXPRESSION = new VyperElementType("EQ_EXPRESSION"); @@ -52,12 +51,11 @@ public interface VyperTypes { IElementType LOCAL_VARIABLE_DEFINITION = new VyperElementType("LOCAL_VARIABLE_DEFINITION"); IElementType MAP_TYPE = new VyperElementType("MAP_TYPE"); IElementType MEMBER_ACCESS_EXPRESSION = new VyperElementType("MEMBER_ACCESS_EXPRESSION"); - IElementType MEMBER_INDEX_ACCESS = new VyperElementType("MEMBER_INDEX_ACCESS"); IElementType MULTI_LINE_STRING = new VyperElementType("MULTI_LINE_STRING"); IElementType MULT_DIV_EXPRESSION = new VyperElementType("MULT_DIV_EXPRESSION"); IElementType OR_EXPRESSION = new VyperElementType("OR_EXPRESSION"); IElementType PARAM_DEF = new VyperElementType("PARAM_DEF"); - IElementType PARENTHESIZIED_EXPRESSION = new VyperElementType("PARENTHESIZIED_EXPRESSION"); + IElementType PARENTHESIZED_EXPRESSION = new VyperElementType("PARENTHESIZED_EXPRESSION"); IElementType PLUS_MIN_EXPRESSION = new VyperElementType("PLUS_MIN_EXPRESSION"); IElementType PRIMARY_EXPRESSION = new VyperElementType("PRIMARY_EXPRESSION"); IElementType RANGE_BOUND = new VyperElementType("RANGE_BOUND"); @@ -78,6 +76,7 @@ public interface VyperTypes { IElementType VAR_LITERAL = new VyperElementType("VAR_LITERAL"); IElementType ADDRESS = new VyperTokenType("address"); + IElementType AMPERSAND = new VyperTokenType("&"); IElementType AND = new VyperTokenType("and"); IElementType AS = new VyperTokenType("as"); IElementType ASSERT = new VyperTokenType("assert"); @@ -89,7 +88,6 @@ public interface VyperTypes { IElementType BYTES = new VyperTokenType("Bytes"); IElementType BYTESM = new VyperTokenType("bytesM"); IElementType CARET = new VyperTokenType("^"); - IElementType CLEAR = new VyperTokenType("clear"); IElementType COLON = new VyperTokenType(":"); IElementType COMMA = new VyperTokenType(","); IElementType COMMENT = new VyperTokenType("comment"); @@ -128,7 +126,6 @@ public interface VyperTypes { IElementType INDEXED = new VyperTokenType("indexed"); IElementType INTERFACE = new VyperTokenType("interface"); IElementType INTERNAL = new VyperTokenType("internal"); - IElementType INTERSECTION = new VyperTokenType("&"); IElementType INTM = new VyperTokenType("intM"); IElementType LBRACE = new VyperTokenType("{"); IElementType LBRACKET = new VyperTokenType("["); @@ -153,6 +150,7 @@ public interface VyperTypes { IElementType PAYABLE = new VyperTokenType("payable"); IElementType PERCENT = new VyperTokenType("%"); IElementType PERCENT_ASSIGN = new VyperTokenType("%="); + IElementType PIPE = new VyperTokenType("|"); IElementType PLUS = new VyperTokenType("+"); IElementType PLUS_ASSIGN = new VyperTokenType("+="); IElementType PUBLIC = new VyperTokenType("public"); @@ -166,6 +164,7 @@ public interface VyperTypes { IElementType RPAREN = new VyperTokenType(")"); IElementType RSHIFT = new VyperTokenType(">>"); IElementType SCIENTIFICNUMBER = new VyperTokenType("scientificNumber"); + IElementType SELF = new VyperTokenType("self"); IElementType SEMICOLON = new VyperTokenType(";"); IElementType STATICCALL = new VyperTokenType("staticcall"); IElementType STRING = new VyperTokenType("String"); @@ -177,7 +176,6 @@ public interface VyperTypes { IElementType TILDE = new VyperTokenType("~"); IElementType TO = new VyperTokenType("=>"); IElementType UINTM = new VyperTokenType("uintM"); - IElementType UNION = new VyperTokenType("|"); IElementType VIEW = new VyperTokenType("view"); class Factory { @@ -198,9 +196,6 @@ else if (type == BIN_EXPRESSION) { else if (type == CALL_EXPRESSION) { return new VyperCallExpressionImpl(node); } - else if (type == CLEAR_EXPRESSION) { - return new VyperClearExpressionImpl(node); - } else if (type == COMP_EXPRESSION) { return new VyperCompExpressionImpl(node); } @@ -312,9 +307,6 @@ else if (type == MAP_TYPE) { else if (type == MEMBER_ACCESS_EXPRESSION) { return new VyperMemberAccessExpressionImpl(node); } - else if (type == MEMBER_INDEX_ACCESS) { - return new VyperMemberIndexAccessImpl(node); - } else if (type == MULTI_LINE_STRING) { return new VyperMultiLineStringImpl(node); } @@ -327,8 +319,8 @@ else if (type == OR_EXPRESSION) { else if (type == PARAM_DEF) { return new VyperParamDefImpl(node); } - else if (type == PARENTHESIZIED_EXPRESSION) { - return new VyperParenthesiziedExpressionImpl(node); + else if (type == PARENTHESIZED_EXPRESSION) { + return new VyperParenthesizedExpressionImpl(node); } else if (type == PLUS_MIN_EXPRESSION) { return new VyperPlusMinExpressionImpl(node); diff --git a/src/main/gen/org/vyperlang/plugin/psi/VyperVisitor.java b/src/main/gen/org/vyperlang/plugin/psi/VyperVisitor.java index 33425f1..935c091 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/VyperVisitor.java +++ b/src/main/gen/org/vyperlang/plugin/psi/VyperVisitor.java @@ -26,10 +26,6 @@ public void visitCallExpression(@NotNull VyperCallExpression o) { visitExpression(o); } - public void visitClearExpression(@NotNull VyperClearExpression o) { - visitExpression(o); - } - public void visitCompExpression(@NotNull VyperCompExpression o) { visitExpression(o); } @@ -184,10 +180,6 @@ public void visitMemberAccessExpression(@NotNull VyperMemberAccessExpression o) visitExpression(o); } - public void visitMemberIndexAccess(@NotNull VyperMemberIndexAccess o) { - visitExpression(o); - } - public void visitMultDivExpression(@NotNull VyperMultDivExpression o) { visitExpression(o); } @@ -204,7 +196,7 @@ public void visitParamDef(@NotNull VyperParamDef o) { visitNamedElement(o); } - public void visitParenthesiziedExpression(@NotNull VyperParenthesiziedExpression o) { + public void visitParenthesizedExpression(@NotNull VyperParenthesizedExpression o) { visitExpression(o); } diff --git a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperCallExpressionImpl.java b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperCallExpressionImpl.java index b97c146..5cb7e1d 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperCallExpressionImpl.java +++ b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperCallExpressionImpl.java @@ -29,14 +29,14 @@ public void accept(@NotNull PsiElementVisitor visitor) { @Override @NotNull - public List getExpressionList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, VyperExpression.class); + public VyperExpression getExpression() { + return findNotNullChildByClass(VyperExpression.class); } @Override @NotNull - public List getFunctionCallArgumentsList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, VyperFunctionCallArguments.class); + public VyperFunctionCallArguments getFunctionCallArguments() { + return findNotNullChildByClass(VyperFunctionCallArguments.class); } } diff --git a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperEventLogExpressionImpl.java b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperEventLogExpressionImpl.java index 0d07d53..05e78c0 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperEventLogExpressionImpl.java +++ b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperEventLogExpressionImpl.java @@ -39,4 +39,10 @@ public VyperVarLiteral getVarLiteral() { return findNotNullChildByClass(VyperVarLiteral.class); } + @Override + @Nullable + public PsiElement getIdentifier() { + return findChildByType(IDENTIFIER); + } + } diff --git a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperMemberIndexAccessImpl.java b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperMemberIndexAccessImpl.java deleted file mode 100644 index 09fc420..0000000 --- a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperMemberIndexAccessImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package org.vyperlang.plugin.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static org.vyperlang.plugin.psi.VyperTypes.*; -import org.vyperlang.plugin.psi.*; - -public class VyperMemberIndexAccessImpl extends VyperExpressionImpl implements VyperMemberIndexAccess { - - public VyperMemberIndexAccessImpl(@NotNull ASTNode node) { - super(node); - } - - @Override - public void accept(@NotNull VyperVisitor visitor) { - visitor.visitMemberIndexAccess(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof VyperVisitor) accept((VyperVisitor)visitor); - else super.accept(visitor); - } - - @Override - @NotNull - public List getExpressionList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, VyperExpression.class); - } - -} diff --git a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperClearExpressionImpl.java b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperParenthesizedExpressionImpl.java similarity index 77% rename from src/main/gen/org/vyperlang/plugin/psi/impl/VyperClearExpressionImpl.java rename to src/main/gen/org/vyperlang/plugin/psi/impl/VyperParenthesizedExpressionImpl.java index 1183e6a..8af3c46 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperClearExpressionImpl.java +++ b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperParenthesizedExpressionImpl.java @@ -10,15 +10,15 @@ import static org.vyperlang.plugin.psi.VyperTypes.*; import org.vyperlang.plugin.psi.*; -public class VyperClearExpressionImpl extends VyperExpressionImpl implements VyperClearExpression { +public class VyperParenthesizedExpressionImpl extends VyperExpressionImpl implements VyperParenthesizedExpression { - public VyperClearExpressionImpl(@NotNull ASTNode node) { + public VyperParenthesizedExpressionImpl(@NotNull ASTNode node) { super(node); } @Override public void accept(@NotNull VyperVisitor visitor) { - visitor.visitClearExpression(this); + visitor.visitParenthesizedExpression(this); } @Override diff --git a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperParenthesiziedExpressionImpl.java b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperParenthesiziedExpressionImpl.java deleted file mode 100644 index 8150a47..0000000 --- a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperParenthesiziedExpressionImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package org.vyperlang.plugin.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static org.vyperlang.plugin.psi.VyperTypes.*; -import org.vyperlang.plugin.psi.*; - -public class VyperParenthesiziedExpressionImpl extends VyperExpressionImpl implements VyperParenthesiziedExpression { - - public VyperParenthesiziedExpressionImpl(@NotNull ASTNode node) { - super(node); - } - - @Override - public void accept(@NotNull VyperVisitor visitor) { - visitor.visitParenthesiziedExpression(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof VyperVisitor) accept((VyperVisitor)visitor); - else super.accept(visitor); - } - - @Override - @Nullable - public VyperExpression getExpression() { - return findChildByClass(VyperExpression.class); - } - -} diff --git a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperRangeExpressionImpl.java b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperRangeExpressionImpl.java index 1996645..1335561 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperRangeExpressionImpl.java +++ b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperRangeExpressionImpl.java @@ -28,9 +28,9 @@ public void accept(@NotNull PsiElementVisitor visitor) { } @Override - @Nullable - public VyperExpression getExpression() { - return findChildByClass(VyperExpression.class); + @NotNull + public List getExpressionList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, VyperExpression.class); } @Override @@ -39,28 +39,4 @@ public VyperRangeBound getRangeBound() { return findChildByClass(VyperRangeBound.class); } - @Override - @Nullable - public VyperVarLiteral getVarLiteral() { - return findChildByClass(VyperVarLiteral.class); - } - - @Override - @Nullable - public PsiElement getDecimalNumber() { - return findChildByType(DECIMALNUMBER); - } - - @Override - @Nullable - public PsiElement getFixedNumber() { - return findChildByType(FIXEDNUMBER); - } - - @Override - @Nullable - public PsiElement getHexNumber() { - return findChildByType(HEXNUMBER); - } - } diff --git a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperTupleAssignmentExpressionImpl.java b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperTupleAssignmentExpressionImpl.java index 6cef7b0..1d61849 100644 --- a/src/main/gen/org/vyperlang/plugin/psi/impl/VyperTupleAssignmentExpressionImpl.java +++ b/src/main/gen/org/vyperlang/plugin/psi/impl/VyperTupleAssignmentExpressionImpl.java @@ -33,4 +33,10 @@ public VyperExpression getExpression() { return findChildByClass(VyperExpression.class); } + @Override + @NotNull + public List getVarLiteralList() { + return PsiTreeUtil.getChildrenOfTypeAsList(this, VyperVarLiteral.class); + } + } diff --git a/src/main/kotlin/org/vyperlang/plugin/Highligther.kt b/src/main/kotlin/org/vyperlang/plugin/Highligther.kt index 33da9db..5b99a7d 100644 --- a/src/main/kotlin/org/vyperlang/plugin/Highligther.kt +++ b/src/main/kotlin/org/vyperlang/plugin/Highligther.kt @@ -5,6 +5,7 @@ import com.intellij.openapi.fileTypes.SingleLazyInstanceSyntaxHighlighterFactory import com.intellij.openapi.fileTypes.SyntaxHighlighterBase import com.intellij.psi.tree.IElementType import org.vyperlang.plugin.psi.VyperTypes.* +import org.vyperlang.plugin.psi.VyperTypes; import com.intellij.openapi.editor.DefaultLanguageHighlighterColors as Defaults class VyperHighlighterFactory : SingleLazyInstanceSyntaxHighlighterFactory() { @@ -60,9 +61,9 @@ class VyperHighlighter : SyntaxHighlighterBase() { // todo #29: min, max, empty, constant, range are built-in functions private fun keywords() = setOf( - IMPORT, FROM, AS, INTERFACE, IMPLEMENTS, STRUCT, DEF, - IF, ELSE, FOR, BREAK, CONTINUE, RAISE, RETURN, - ELIF, EVENT, PASS, ASSERT, CLEAR, RANGE, LOG + IMPORT, FROM, VyperTypes.AS, INTERFACE, IMPLEMENTS, STRUCT, DEF, + IF, ELSE, ELIF, FOR, BREAK, CONTINUE, RAISE, RETURN, + EVENT, PASS, ASSERT, RANGE, VyperTypes.LOG, SELF, ENUM, FLAG, ) private fun boolLiteral() = setOf(BOOLEANLITERAL) diff --git a/src/main/kotlin/org/vyperlang/plugin/docker/VyperCompilerDocker.kt b/src/main/kotlin/org/vyperlang/plugin/docker/VyperCompilerDocker.kt index bad808c..f3b30fa 100644 --- a/src/main/kotlin/org/vyperlang/plugin/docker/VyperCompilerDocker.kt +++ b/src/main/kotlin/org/vyperlang/plugin/docker/VyperCompilerDocker.kt @@ -59,8 +59,10 @@ class VyperCompilerDocker( downloadImage() } runContainer() - } catch (dockerException: DockerException) { - throw CompilerMissingError(dockerException) + } catch (e: DockerException) { + throw CompilerMissingError(e) + } catch (e: UnsatisfiedLinkError) { + throw CompilerMissingError(e) } catch (e: InterruptedException) { throw CompilerMissingError(e) } @@ -159,7 +161,7 @@ private class VyperPullImageAdapter(private val indicator: ProgressIndicator?) : } } -class CompilerMissingError(baseError: Exception) : Exception(baseError) { +class CompilerMissingError(baseError: Throwable) : Exception(baseError) { companion object { const val ERROR_HTML = "Error running docker.\n" + " Do you install docker" + diff --git a/src/main/kotlin/org/vyperlang/plugin/grammar/Vyper.bnf b/src/main/kotlin/org/vyperlang/plugin/grammar/Vyper.bnf index 08cf9bd..a5b60ff 100644 --- a/src/main/kotlin/org/vyperlang/plugin/grammar/Vyper.bnf +++ b/src/main/kotlin/org/vyperlang/plugin/grammar/Vyper.bnf @@ -27,9 +27,6 @@ RBRACE='}' LPAREN='(' RPAREN=')' - IMPORT = 'import' - FROM = 'from' - PASS = 'pass' ELLIPSIS='...' PLUS='+' @@ -51,7 +48,6 @@ LESSEQ='<=' MORE='>' MOREEQ='>=' - CARET='^' AND='and' OR='or' QUESTION='?' @@ -59,8 +55,9 @@ TILDE='~' LSHIFT='<<' RSHIFT='>>' - INTERSECTION='&' - UNION='|' + AMPERSAND='&' + PIPE='|' + CARET='^' hexLiteral='regexp:hex"([0-9a-fA-F]+)"' stringLiteralDouble='regexp:("([^"\r\n\\]|\\.)*")' @@ -75,24 +72,35 @@ scientificNumber='regexp:((([0-9][_0-9]*)+|([0-9][_0-9]*)+\.[_0-9]*|([0-9][_0-9]*|[0-9])*\.[_0-9]+)[Ee][+-]?[_0-9]+)' hexNumber='regexp:(0[xX][_0-9a-fA-F]+)' - // variable modifiers - public='public' - immutable='immutable' - constant='constant' - payable='payable' - nonpayable='nonpayable' - - // function modifiers - external='external' - internal='internal' - deploy='deploy' - pure='pure' - view='view' - payable='payable' - nonreentrant='nonreentrant' - - event='event' - range = 'range' + // keywords +// def='def' +// if='if' +// elif='elif' +// else='else' +// for='for' +// in='in' +// return='return' +// raise='raise' +// pass='pass' +// assert='assert' +// log='log' +// range='range' +// enum='enum' +// flag='flag' +// struct='struct' +// interface='interface' +// event='event' +// implements='implements' +// external='external' +// internal='internal' +// deploy='deploy' +// pure='pure' +// view='view' +// nonpayable='nonpayable' +// payable='payable' +// self='self' +// indexed='indexed' + BOUND='bound' intM = 'regexp:(int[0-9]+)' uintM = 'regexp:(uint[0-9]+)' @@ -105,11 +113,7 @@ newline = 'regexp:(\r?\n)' BREAK_LINE = 'regexp:(\s*\\\s*\n)' Identifier='regexp:([A-Za-z_]\w*)' - //add !@ etc. - // BadStatementString = 'regexp:(\w+)' - //ALL='regexp:[\^a-zA-Z_0-9.<>"]*' for preview ] - //to handle left recursion extends(".*Expression") = Expression } @@ -280,45 +284,36 @@ private recoverStatement ::= !(&INDEQ|&INDLT) private CondStmt ::= Expression &INDNONE ':' ((&INDNONE Statement) | <>) - private ElifStmt ::= elif &INDNONE CondStmt {pin = 1} - private ElseStmt ::= else &INDNONE ':' ((&INDNONE Statement) | <>) {pin = 1} -IfStatement ::= if &INDNONE CondStmt - (&INDEQ ElifStmt)* - (&INDEQ ElseStmt)? - {pin=1} +IfStatement ::= if &INDNONE CondStmt (&INDEQ ElifStmt)* (&INDEQ ElseStmt)? {pin=1} private SimpleStatement ::= LocalVariableDefinition | ExpressionStatement private ExpressionStatement ::= Expression ForStatement ::= for &INDNONE Identifier (&INDNONE ':' TYPE)? &INDNONE in &INDNONE Expression &INDNONE ':' - (&INDNONE Statement | <>) -{ + (&INDNONE Statement | <>) { pin=1 } - private Continue ::= continue - private Break ::= break - private Return ::= return (&INDNONE Expression (',' Expression)*)? { pin=1 } private Raise ::= raise StringLiteral? - -private PassStatement ::= PASS +private PassStatement ::= pass Expression ::= TernaryExpression | AssignmentExpression | TupleAssignmentExpression | RangeExpression - | ParenthesiziedExpression + | IndexAccessExpression + | UnaryExpression | CallExpression | StructExpression | AssertExpression @@ -330,28 +325,24 @@ Expression ::= | MultDivExpression | ExponentExpression | BinExpression - | UnaryExpression - | ClearExpression - | IndexAccessExpression | MemberAccessExpression - | MemberIndexAccess | InlineArrayExpression - | PrimaryExpression | EventLogExpression - | InExpression | ExtCallExpression | StaticCallExpression + | InExpression + | PrimaryExpression + | ParenthesizedExpression -EventLogExpression ::= log &INDNONE VarLiteral FunctionCallArguments +EventLogExpression ::= log (&INDNONE Identifier '.')? &INDNONE VarLiteral FunctionCallArguments InExpression ::= Expression (&INDNONE not)? &INDNONE in &INDNONE Expression TernaryExpression ::= Expression &INDNONE if &INDNONE Expression &INDNONE else &INDNONE Expression { pin = 1 } ExtCallExpression ::= extcall Expression StaticCallExpression ::= staticcall Expression -private RangeInterval ::= (VarLiteral | NumberLiteral) (&INDNONE ',' &INDNONE Expression)? -RangeExpression ::= range &INDNONE '(' RangeInterval RangeBound? ')' -RangeBound ::= ',' 'bound' '=' (VarLiteral | NumberLiteral) +RangeExpression ::= range &INDNONE '(' Expression (',' Expression)? RangeBound? ')' +RangeBound ::= ',' BOUND '=' (VarLiteral | NumberLiteral) StructExpressionMember ::= VarLiteral &INDNONE ':' &INDNONE Expression private StructExpressionMembers ::= '{' StructExpressionMember (',' (StructExpressionMember | &'}'))* '}' {pin(".*")=1} @@ -361,31 +352,28 @@ AssignmentExpression ::= Expression (&INDNONE ('=' | '+=' | '-=' | '*=' | '/=' | '%=')) Expression { rightAssociative=true } -TupleAssignmentExpression ::= Identifier (',' Identifier)+ &INDNONE '=' Expression +TupleAssignmentExpression ::= VarLiteral (',' VarLiteral)+ &INDNONE '=' Expression -CallExpression ::= Expression ( &INDNONE '[' Expression ']' )* - &INDNONE FunctionCallArguments (&INDNONE FunctionCallArguments)* +CallExpression ::= Expression &INDNONE FunctionCallArguments -MemberAccessExpression ::= Expression &INDNONE '.' (&INDNONE VarLiteral) { +MemberAccessExpression ::= Expression &INDNONE '.' &INDNONE VarLiteral { name = "member access" } -MemberIndexAccess ::= Expression &INDNONE '.' Expression &INDNONE '[' Expression']' {extends=Expression} -IndexAccessExpression ::= Expression &INDNONE '[' Expression']' -ParenthesiziedExpression ::= '(' Expression ')' {pin = 1} - -ClearExpression ::= clear &INDNONE '(' Expression ')' {pin=1} - -UnaryExpression ::= ('not' | '~' | '+' | '-') &INDNONE Expression +IndexAccessExpression ::= Expression &INDNONE '[' Expression ']' +ParenthesizedExpression ::= '(' Expression ')' {pin = 1} +UnaryExpression ::= (not | '~' | '+' | '-') &INDNONE Expression { + rightAssociative=true + pin = 1 +} InlineArrayExpression ::= '[' Expression (',' (Expression | &']'))* ']' {pin(".*")=1} AndExpression ::= Expression AND Expression OrExpression ::= Expression OR Expression EqExpression ::= Expression ('==' | '!=') Expression CompExpression ::= Expression ('<' | '>' | '<=' | '>=') Expression - PlusMinExpression ::= Expression ('+' | '-') Expression MultDivExpression ::= Expression ('*' | '/' | '%') Expression ExponentExpression ::= Expression '**' Expression -BinExpression ::= Expression (UNION | INTERSECTION | RSHIFT | LSHIFT | CARET) Expression +BinExpression ::= Expression (PIPE | AMPERSAND | RSHIFT | LSHIFT | CARET) Expression AssertExpression ::= assert &INDNONE Expression (&INDNONE AssertMessage)? { pin = 1 @@ -396,15 +384,16 @@ private AssertMessage ::= ',' ( stringLiteralDouble | stringLiteralSingle | Mult FunctionCallArgument ::= Expression | ( VarLiteral '=' Expression ) FunctionCallArguments ::= '(' (FunctionCallArgument (',' (FunctionCallArgument | &')'))*)? ')' {pin(".*")=1} -PrimaryExpression ::= VarLiteral | BooleanLiteral | NumberLiteral | HexLiteral | StringLiteral +PrimaryExpression ::= VarLiteral | BooleanLiteral | NumberLiteral | HexLiteral | StringLiteral | self | TYPE // type is accepted as parameter in some built-in functions -VarLiteral ::= Identifier {implements = "org.vyperlang.plugin.psi.VyperReferenceElement" - mixin = "org.vyperlang.plugin.psi.VyperVarLiteralMixin" - name = "variable" - } +VarLiteral ::= Identifier { + implements = "org.vyperlang.plugin.psi.VyperReferenceElement" + mixin = "org.vyperlang.plugin.psi.VyperVarLiteralMixin" + name = "variable" +} -//BuiltIn ::= 'bitwise_and' | 'bitwise_not' | 'bitwise_or' | 'bitwise_xor' | 'shift' | 'create_minimal_proxy_to' | 'create_copy_of' | 'create_from_blueprint' | 'raw_call' | 'raw_log' | 'raw_revert' | 'selfdestruct' | 'send' | 'ecadd' | 'ecmul' | 'ecrecover' | 'keccak256' | 'sha256' | 'concat' | 'convert' | 'uint2str' | 'extract32' | 'slice' | 'abs' | 'ceil' | 'epsilon' | 'floor' | 'max' | 'max_value' | 'min' | 'min_value' | 'pow_mod256' | 'sqrt' | 'isqrt' | 'uint256_addmod' | 'uint256_mulmod' | 'unsafe_add' | 'unsafe_sub' | 'unsafe_mul' | 'unsafe_div' | 'as_wei_value' | 'blockhash' | 'empty' | 'len' | 'method_id' | '_abi_encode' | '_abi_decode' | 'abi_encode' | 'abi_decode' | 'print' +// TODO #29: BuiltIn ::= 'bitwise_and' | 'bitwise_not' | 'bitwise_or' | 'bitwise_xor' | 'shift' | 'create_minimal_proxy_to' | 'create_copy_of' | 'create_from_blueprint' | 'raw_call' | 'raw_log' | 'raw_revert' | 'selfdestruct' | 'send' | 'ecadd' | 'ecmul' | 'ecrecover' | 'keccak256' | 'sha256' | 'concat' | 'convert' | 'uint2str' | 'extract32' | 'slice' | 'abs' | 'ceil' | 'epsilon' | 'floor' | 'max' | 'max_value' | 'min' | 'min_value' | 'pow_mod256' | 'sqrt' | 'isqrt' | 'uint256_addmod' | 'uint256_mulmod' | 'unsafe_add' | 'unsafe_sub' | 'unsafe_mul' | 'unsafe_div' | 'as_wei_value' | 'blockhash' | 'empty' | 'len' | 'method_id' | '_abi_encode' | '_abi_decode' | 'abi_encode' | 'abi_decode' | 'print' // TYPES seems okay TYPE ::= ListType | MapType | ValueType | StructType diff --git a/src/main/kotlin/org/vyperlang/plugin/references/Resolver.kt b/src/main/kotlin/org/vyperlang/plugin/references/Resolver.kt index e01233f..fe0ec40 100644 --- a/src/main/kotlin/org/vyperlang/plugin/references/Resolver.kt +++ b/src/main/kotlin/org/vyperlang/plugin/references/Resolver.kt @@ -108,9 +108,9 @@ object VyperResolver { fun resolveInterfaces(element: VyperElement): List = sequenceOf(element.file.interfaces, element.file.imports).flatten().toList() - private fun getFirstLiteralName(element: VyperExpression?): String? = when (element) { - is VyperPrimaryExpression -> element.varLiteral?.text - is VyperCallExpression -> getFirstLiteralName(element.expressionList.firstOrNull()) + fun getFirstLiteralName(element: VyperExpression?): String? = when (element) { + is VyperPrimaryExpression -> element.varLiteral?.text ?: element.text // fallback to `text` e.g. for `self` + is VyperCallExpression -> getFirstLiteralName(element.expression) else -> null } diff --git a/src/main/kotlin/org/vyperlang/plugin/references/VyperUserDefinedReferences.kt b/src/main/kotlin/org/vyperlang/plugin/references/VyperUserDefinedReferences.kt index ed29088..26721a1 100644 --- a/src/main/kotlin/org/vyperlang/plugin/references/VyperUserDefinedReferences.kt +++ b/src/main/kotlin/org/vyperlang/plugin/references/VyperUserDefinedReferences.kt @@ -11,7 +11,7 @@ class VyperVarLiteralReference(element: VyperVarLiteral) : VyperReferenceBase(element), VyperReference { override fun getAlternatives() = VyperResolver.resolveMemberAccess(member) - override fun multiResolve() = this.getAlternatives().filter { it.name == member.varLiteral.name } + override fun multiResolve() = this.getAlternatives().filter { it.name == member.varLiteral.name } } class VyperStructReference(element: VyperVarLiteral) : VyperReferenceBase(element), VyperReference { diff --git a/src/test/kotlin/org/vyperlang/plugin/annotators/TestVersionAnnotator.kt b/src/test/kotlin/org/vyperlang/plugin/annotators/TestVersionAnnotator.kt index 11af26e..2011620 100644 --- a/src/test/kotlin/org/vyperlang/plugin/annotators/TestVersionAnnotator.kt +++ b/src/test/kotlin/org/vyperlang/plugin/annotators/TestVersionAnnotator.kt @@ -1,12 +1,14 @@ package org.vyperlang.plugin.annotators import com.intellij.lang.annotation.HighlightSeverity +import com.intellij.psi.impl.DebugUtil import com.intellij.testFramework.fixtures.BasePlatformTestCase import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized import org.junit.runners.Parameterized.Parameters import org.vyperlang.plugin.VyperFileType +import java.util.logging.Logger private const val Vy3 = "#pragma version 0.3.10" private const val Vy4 = "#pragma version 0.4.0" @@ -185,7 +187,7 @@ class TestVersionAnnotator(private val case: TestCase) : BasePlatformTestCase() @external def repeat(n: uint256) -> uint256: x: uint256 = 0 - for i: uint256 in range(n, 7, bound=6): + for i: uint256 in range(n, 10 + 7, bound=6): x += i + 1 return x """, diff --git a/src/test/kotlin/org/vyperlang/plugin/completion/TestCompletion.kt b/src/test/kotlin/org/vyperlang/plugin/completion/TestCompleter.kt similarity index 98% rename from src/test/kotlin/org/vyperlang/plugin/completion/TestCompletion.kt rename to src/test/kotlin/org/vyperlang/plugin/completion/TestCompleter.kt index d4cf5b1..733a500 100644 --- a/src/test/kotlin/org/vyperlang/plugin/completion/TestCompletion.kt +++ b/src/test/kotlin/org/vyperlang/plugin/completion/TestCompleter.kt @@ -4,7 +4,7 @@ import com.intellij.codeInsight.completion.CompletionType import com.intellij.testFramework.fixtures.BasePlatformTestCase import org.vyperlang.plugin.VyperFileType -class TestCompletion : BasePlatformTestCase() { +class TestCompleter : BasePlatformTestCase() { override fun getTestDataPath(): String { return "src/test/resources/examples" } diff --git a/src/test/resources/TestParse/ParsingTestData.txt b/src/test/resources/TestParse/ParsingTestData.txt index b7a1bba..0ffc084 100644 --- a/src/test/resources/TestParse/ParsingTestData.txt +++ b/src/test/resources/TestParse/ParsingTestData.txt @@ -1,261 +1,272 @@ -Vyper(0,368) - VyperConstantDefinitionExpressionImpl(CONSTANT_DEFINITION_EXPRESSION)(0,35) - PsiElement(Identifier)('x')(0,1) - PsiElement(:)(':')(1,2) - PsiWhiteSpace(' ')(2,3) - PsiElement(constant)('constant')(3,11) - PsiElement(()('(')(11,12) - VyperTypeImpl(TYPE)(12,19) - VyperValueTypeImpl(VALUE_TYPE)(12,19) - PsiElement(uintM)('uint256')(12,19) - PsiElement())(')')(19,20) - PsiWhiteSpace(' ')(20,21) - PsiElement(=)('=')(21,22) - PsiWhiteSpace(' ')(22,23) - VyperCallExpressionImpl(CALL_EXPRESSION)(23,35) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(23,26) - VyperVarLiteralImpl(VAR_LITERAL)(23,26) - PsiElement(Identifier)('max')(23,26) - VyperFunctionCallArgumentsImpl(FUNCTION_CALL_ARGUMENTS)(26,35) - PsiElement(()('(')(26,27) - VyperFunctionCallArgumentImpl(FUNCTION_CALL_ARGUMENT)(27,34) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(27,34) - VyperTypeImpl(TYPE)(27,34) - VyperValueTypeImpl(VALUE_TYPE)(27,34) - PsiElement(uintM)('uint256')(27,34) - PsiElement())(')')(34,35) - PsiWhiteSpace('\n')(35,36) - VyperImmutableDefinitionExpressionImpl(IMMUTABLE_DEFINITION_EXPRESSION)(36,57) - PsiElement(Identifier)('y')(36,37) - PsiElement(:)(':')(37,38) - PsiWhiteSpace(' ')(38,39) - PsiElement(immutable)('immutable')(39,48) - PsiElement(()('(')(48,49) - VyperTypeImpl(TYPE)(49,56) - VyperValueTypeImpl(VALUE_TYPE)(49,56) - PsiElement(address)('address')(49,56) - PsiElement())(')')(56,57) - PsiWhiteSpace('\n\n')(57,59) - VyperFunctionDefinitionImpl(FUNCTION_DEFINITION)(59,112) - VyperFunctionModifierImpl(FUNCTION_MODIFIER)(59,68) - PsiElement(@)('@')(59,60) - VyperFunctionDecoratorImpl(FUNCTION_DECORATOR)(60,68) - PsiElement(external)('external')(60,68) - PsiWhiteSpace('\n')(68,69) - PsiElement(def)('def')(69,72) - PsiWhiteSpace(' ')(72,73) - PsiElement(Identifier)('__init__')(73,81) - VyperFunctionArgsImpl(FUNCTION_ARGS)(81,83) - PsiElement(()('(')(81,82) - PsiElement())(')')(82,83) - PsiElement(:)(':')(83,84) - PsiWhiteSpace('\n ')(84,89) - VyperFunctionBodyImpl(FUNCTION_BODY)(89,112) - VyperFunctionImplementationImpl(FUNCTION_IMPLEMENTATION)(89,112) - VyperStatementImpl(STATEMENT)(89,112) - VyperAssignmentExpressionImpl(ASSIGNMENT_EXPRESSION)(89,112) - VyperMemberAccessExpressionImpl(MEMBER_ACCESS_EXPRESSION)(89,95) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(89,93) - VyperVarLiteralImpl(VAR_LITERAL)(89,93) - PsiElement(Identifier)('self')(89,93) - PsiElement(.)('.')(93,94) - VyperVarLiteralImpl(VAR_LITERAL)(94,95) - PsiElement(Identifier)('y')(94,95) - PsiWhiteSpace(' ')(95,96) - PsiElement(=)('=')(96,97) - PsiWhiteSpace(' ')(97,98) - VyperCallExpressionImpl(CALL_EXPRESSION)(98,112) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(98,103) - VyperVarLiteralImpl(VAR_LITERAL)(98,103) - PsiElement(Identifier)('empty')(98,103) - VyperFunctionCallArgumentsImpl(FUNCTION_CALL_ARGUMENTS)(103,112) - PsiElement(()('(')(103,104) - VyperFunctionCallArgumentImpl(FUNCTION_CALL_ARGUMENT)(104,111) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(104,111) - VyperTypeImpl(TYPE)(104,111) - VyperValueTypeImpl(VALUE_TYPE)(104,111) - PsiElement(address)('address')(104,111) - PsiElement())(')')(111,112) - PsiWhiteSpace('\n\n')(112,114) - VyperFunctionDefinitionImpl(FUNCTION_DEFINITION)(114,157) - VyperFunctionModifierImpl(FUNCTION_MODIFIER)(114,123) - PsiElement(@)('@')(114,115) - VyperFunctionDecoratorImpl(FUNCTION_DECORATOR)(115,123) - PsiElement(external)('external')(115,123) - PsiWhiteSpace('\n')(123,124) - PsiElement(def)('def')(124,127) - PsiWhiteSpace(' ')(127,128) - PsiElement(Identifier)('test')(128,132) - VyperFunctionArgsImpl(FUNCTION_ARGS)(132,134) - PsiElement(()('(')(132,133) - PsiElement())(')')(133,134) - VyperFunTypeAnnotationImpl(FUN_TYPE_ANNOTATION)(134,140) - PsiElement(-)('-')(134,135) - PsiElement(>)('>')(135,136) - VyperTypeImpl(TYPE)(136,140) - VyperValueTypeImpl(VALUE_TYPE)(136,140) - PsiElement(bool)('bool')(136,140) - PsiElement(:)(':')(140,141) - PsiWhiteSpace('\n ')(141,146) - VyperFunctionBodyImpl(FUNCTION_BODY)(146,157) - VyperFunctionImplementationImpl(FUNCTION_IMPLEMENTATION)(146,157) - VyperStatementImpl(STATEMENT)(146,157) - PsiElement(return)('return')(146,152) - PsiWhiteSpace(' ')(152,153) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(153,157) - PsiElement(booleanLiteral)('True')(153,157) - PsiWhiteSpace('\n\n')(157,159) - VyperFunctionDefinitionImpl(FUNCTION_DEFINITION)(159,245) - VyperFunctionModifierImpl(FUNCTION_MODIFIER)(159,168) - PsiElement(@)('@')(159,160) - VyperFunctionDecoratorImpl(FUNCTION_DECORATOR)(160,168) - PsiElement(external)('external')(160,168) - PsiWhiteSpace('\n')(168,169) - PsiElement(def)('def')(169,172) - PsiWhiteSpace(' ')(172,173) - PsiElement(Identifier)('ternary')(173,180) - VyperFunctionArgsImpl(FUNCTION_ARGS)(180,204) - PsiElement(()('(')(180,181) - VyperParamDefImpl(PARAM_DEF)(181,191) - PsiElement(Identifier)('a')(181,182) - PsiElement(:)(':')(182,183) - PsiWhiteSpace(' ')(183,184) - VyperTypeImpl(TYPE)(184,191) - VyperValueTypeImpl(VALUE_TYPE)(184,191) - PsiElement(uintM)('uint256')(184,191) - PsiElement(,)(',')(191,192) - PsiWhiteSpace(' ')(192,193) - VyperParamDefImpl(PARAM_DEF)(193,203) - PsiElement(Identifier)('b')(193,194) - PsiElement(:)(':')(194,195) - PsiWhiteSpace(' ')(195,196) - VyperTypeImpl(TYPE)(196,203) - VyperValueTypeImpl(VALUE_TYPE)(196,203) - PsiElement(uintM)('uint256')(196,203) - PsiElement())(')')(203,204) - PsiWhiteSpace(' ')(204,205) - VyperFunTypeAnnotationImpl(FUN_TYPE_ANNOTATION)(205,215) - PsiElement(-)('-')(205,206) - PsiElement(>)('>')(206,207) - PsiWhiteSpace(' ')(207,208) - VyperTypeImpl(TYPE)(208,215) - VyperValueTypeImpl(VALUE_TYPE)(208,215) - PsiElement(uintM)('uint256')(208,215) - PsiElement(:)(':')(215,216) - PsiWhiteSpace('\n ')(216,221) - VyperFunctionBodyImpl(FUNCTION_BODY)(221,245) - VyperFunctionImplementationImpl(FUNCTION_IMPLEMENTATION)(221,245) - VyperStatementImpl(STATEMENT)(221,245) - PsiElement(return)('return')(221,227) - PsiWhiteSpace(' ')(227,228) - VyperTernaryExpressionImpl(TERNARY_EXPRESSION)(228,245) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(228,229) - VyperVarLiteralImpl(VAR_LITERAL)(228,229) - PsiElement(Identifier)('a')(228,229) - PsiWhiteSpace(' ')(229,230) - PsiElement(if)('if')(230,232) - PsiWhiteSpace(' ')(232,233) - VyperCompExpressionImpl(COMP_EXPRESSION)(233,238) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(233,234) - VyperVarLiteralImpl(VAR_LITERAL)(233,234) - PsiElement(Identifier)('a')(233,234) - PsiWhiteSpace(' ')(234,235) - PsiElement(>)('>')(235,236) - PsiWhiteSpace(' ')(236,237) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(237,238) - VyperVarLiteralImpl(VAR_LITERAL)(237,238) - PsiElement(Identifier)('b')(237,238) - PsiWhiteSpace(' ')(238,239) - PsiElement(else)('else')(239,243) - PsiWhiteSpace(' ')(243,244) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(244,245) - VyperVarLiteralImpl(VAR_LITERAL)(244,245) - PsiElement(Identifier)('b')(244,245) - PsiWhiteSpace('\n\n')(245,247) - VyperFunctionDefinitionImpl(FUNCTION_DEFINITION)(247,368) - VyperFunctionModifierImpl(FUNCTION_MODIFIER)(247,256) - PsiElement(@)('@')(247,248) - VyperFunctionDecoratorImpl(FUNCTION_DECORATOR)(248,256) - PsiElement(external)('external')(248,256) - PsiWhiteSpace('\n')(256,257) - PsiElement(def)('def')(257,260) - PsiWhiteSpace(' ')(260,261) - PsiElement(Identifier)('nested_constant_list_accessor')(261,290) - VyperFunctionArgsImpl(FUNCTION_ARGS)(290,292) - PsiElement(()('(')(290,291) - PsiElement())(')')(291,292) - PsiWhiteSpace(' ')(292,293) - VyperFunTypeAnnotationImpl(FUN_TYPE_ANNOTATION)(293,300) - PsiElement(-)('-')(293,294) - PsiElement(>)('>')(294,295) - PsiWhiteSpace(' ')(295,296) - VyperTypeImpl(TYPE)(296,300) - VyperValueTypeImpl(VALUE_TYPE)(296,300) - PsiElement(bool)('bool')(296,300) - PsiElement(:)(':')(300,301) - PsiWhiteSpace('\n ')(301,306) - VyperFunctionBodyImpl(FUNCTION_BODY)(306,368) - VyperFunctionImplementationImpl(FUNCTION_IMPLEMENTATION)(306,368) - VyperStatementImpl(STATEMENT)(306,320) - VyperLocalVariableDefinitionImpl(LOCAL_VARIABLE_DEFINITION)(306,320) - PsiElement(Identifier)('f')(306,307) - PsiElement(:)(':')(307,308) - PsiWhiteSpace(' ')(308,309) - VyperTypeImpl(TYPE)(309,316) - VyperValueTypeImpl(VALUE_TYPE)(309,316) - PsiElement(uintM)('uint256')(309,316) - PsiWhiteSpace(' ')(316,317) - PsiElement(=)('=')(317,318) - PsiWhiteSpace(' ')(318,319) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(319,320) - PsiElement(decimalNumber)('1')(319,320) - PsiWhiteSpace('\n ')(320,325) - VyperStatementImpl(STATEMENT)(325,355) - VyperLocalVariableDefinitionImpl(LOCAL_VARIABLE_DEFINITION)(325,355) - PsiElement(Identifier)('a')(325,326) - PsiElement(:)(':')(326,327) - PsiWhiteSpace(' ')(327,328) - VyperTypeImpl(TYPE)(328,332) - VyperValueTypeImpl(VALUE_TYPE)(328,332) - PsiElement(bool)('bool')(328,332) - PsiWhiteSpace(' ')(332,333) - PsiElement(=)('=')(333,334) - PsiWhiteSpace(' ')(334,335) - VyperEqExpressionImpl(EQ_EXPRESSION)(335,355) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(335,336) - PsiElement(decimalNumber)('1')(335,336) - PsiWhiteSpace(' ')(336,337) - PsiElement(==)('==')(337,339) - PsiWhiteSpace(' ')(339,340) - VyperPlusMinExpressionImpl(PLUS_MIN_EXPRESSION)(340,355) - VyperIndexAccessExpressionImpl(INDEX_ACCESS_EXPRESSION)(340,350) - VyperInlineArrayExpressionImpl(INLINE_ARRAY_EXPRESSION)(340,347) - PsiElement([)('[')(340,341) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(341,342) - PsiElement(decimalNumber)('1')(341,342) - PsiElement(,)(',')(342,343) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(343,344) - PsiElement(decimalNumber)('2')(343,344) - PsiElement(,)(',')(344,345) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(345,346) - PsiElement(decimalNumber)('4')(345,346) - PsiElement(])(']')(346,347) - PsiElement([)('[')(347,348) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(348,349) - VyperVarLiteralImpl(VAR_LITERAL)(348,349) - PsiElement(Identifier)('f')(348,349) - PsiElement(])(']')(349,350) - PsiWhiteSpace(' ')(350,351) - PsiElement(+)('+')(351,352) - PsiWhiteSpace(' ')(352,353) - VyperUnaryExpressionImpl(UNARY_EXPRESSION)(353,355) - PsiElement(-)('-')(353,354) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(354,355) - PsiElement(decimalNumber)('1')(354,355) - PsiWhiteSpace('\n ')(355,360) - VyperStatementImpl(STATEMENT)(360,368) - PsiElement(return)('return')(360,366) - PsiWhiteSpace(' ')(366,367) - VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(367,368) - VyperVarLiteralImpl(VAR_LITERAL)(367,368) - PsiElement(Identifier)('a')(367,368) \ No newline at end of file +Vyper(0,408) + PsiComment(comment)('# pragma version ^0.3.0')(0,23) + PsiWhiteSpace('\n\n')(23,25) + VyperConstantDefinitionExpressionImpl(CONSTANT_DEFINITION_EXPRESSION)(25,66) + PsiElement(Identifier)('x')(25,26) + PsiElement(:)(':')(26,27) + PsiWhiteSpace(' ')(27,28) + PsiElement(constant)('constant')(28,36) + PsiElement(()('(')(36,37) + VyperTypeImpl(TYPE)(37,44) + VyperValueTypeImpl(VALUE_TYPE)(37,44) + PsiElement(uintM)('uint256')(37,44) + PsiElement())(')')(44,45) + PsiWhiteSpace(' ')(45,46) + PsiElement(=)('=')(46,47) + PsiWhiteSpace(' ')(47,48) + VyperCallExpressionImpl(CALL_EXPRESSION)(48,66) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(48,57) + VyperVarLiteralImpl(VAR_LITERAL)(48,57) + PsiElement(Identifier)('max_value')(48,57) + VyperFunctionCallArgumentsImpl(FUNCTION_CALL_ARGUMENTS)(57,66) + PsiElement(()('(')(57,58) + VyperFunctionCallArgumentImpl(FUNCTION_CALL_ARGUMENT)(58,65) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(58,65) + VyperTypeImpl(TYPE)(58,65) + VyperValueTypeImpl(VALUE_TYPE)(58,65) + PsiElement(uintM)('uint256')(58,65) + PsiElement())(')')(65,66) + PsiWhiteSpace('\n')(66,67) + VyperImmutableDefinitionExpressionImpl(IMMUTABLE_DEFINITION_EXPRESSION)(67,88) + PsiElement(Identifier)('y')(67,68) + PsiElement(:)(':')(68,69) + PsiWhiteSpace(' ')(69,70) + PsiElement(immutable)('immutable')(70,79) + PsiElement(()('(')(79,80) + VyperTypeImpl(TYPE)(80,87) + VyperValueTypeImpl(VALUE_TYPE)(80,87) + PsiElement(address)('address')(80,87) + PsiElement())(')')(87,88) + PsiWhiteSpace('\n\n')(88,90) + VyperFunctionDefinitionImpl(FUNCTION_DEFINITION)(90,143) + VyperFunctionModifierImpl(FUNCTION_MODIFIER)(90,99) + PsiElement(@)('@')(90,91) + VyperFunctionDecoratorImpl(FUNCTION_DECORATOR)(91,99) + PsiElement(external)('external')(91,99) + PsiWhiteSpace('\n')(99,100) + PsiElement(def)('def')(100,103) + PsiWhiteSpace(' ')(103,104) + PsiElement(Identifier)('__init__')(104,112) + VyperFunctionArgsImpl(FUNCTION_ARGS)(112,114) + PsiElement(()('(')(112,113) + PsiElement())(')')(113,114) + PsiElement(:)(':')(114,115) + PsiWhiteSpace('\n ')(115,120) + VyperFunctionBodyImpl(FUNCTION_BODY)(120,143) + VyperFunctionImplementationImpl(FUNCTION_IMPLEMENTATION)(120,143) + VyperStatementImpl(STATEMENT)(120,143) + VyperAssignmentExpressionImpl(ASSIGNMENT_EXPRESSION)(120,143) + VyperMemberAccessExpressionImpl(MEMBER_ACCESS_EXPRESSION)(120,126) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(120,124) + PsiElement(self)('self')(120,124) + PsiElement(.)('.')(124,125) + VyperVarLiteralImpl(VAR_LITERAL)(125,126) + PsiElement(Identifier)('y')(125,126) + PsiWhiteSpace(' ')(126,127) + PsiElement(=)('=')(127,128) + PsiWhiteSpace(' ')(128,129) + VyperCallExpressionImpl(CALL_EXPRESSION)(129,143) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(129,134) + VyperVarLiteralImpl(VAR_LITERAL)(129,134) + PsiElement(Identifier)('empty')(129,134) + VyperFunctionCallArgumentsImpl(FUNCTION_CALL_ARGUMENTS)(134,143) + PsiElement(()('(')(134,135) + VyperFunctionCallArgumentImpl(FUNCTION_CALL_ARGUMENT)(135,142) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(135,142) + VyperTypeImpl(TYPE)(135,142) + VyperValueTypeImpl(VALUE_TYPE)(135,142) + PsiElement(address)('address')(135,142) + PsiElement())(')')(142,143) + PsiWhiteSpace('\n\n')(143,145) + VyperFunctionDefinitionImpl(FUNCTION_DEFINITION)(145,188) + VyperFunctionModifierImpl(FUNCTION_MODIFIER)(145,154) + PsiElement(@)('@')(145,146) + VyperFunctionDecoratorImpl(FUNCTION_DECORATOR)(146,154) + PsiElement(external)('external')(146,154) + PsiWhiteSpace('\n')(154,155) + PsiElement(def)('def')(155,158) + PsiWhiteSpace(' ')(158,159) + PsiElement(Identifier)('test')(159,163) + VyperFunctionArgsImpl(FUNCTION_ARGS)(163,165) + PsiElement(()('(')(163,164) + PsiElement())(')')(164,165) + VyperFunTypeAnnotationImpl(FUN_TYPE_ANNOTATION)(165,171) + PsiElement(-)('-')(165,166) + PsiElement(>)('>')(166,167) + VyperTypeImpl(TYPE)(167,171) + VyperValueTypeImpl(VALUE_TYPE)(167,171) + PsiElement(bool)('bool')(167,171) + PsiElement(:)(':')(171,172) + PsiWhiteSpace('\n ')(172,177) + VyperFunctionBodyImpl(FUNCTION_BODY)(177,188) + VyperFunctionImplementationImpl(FUNCTION_IMPLEMENTATION)(177,188) + VyperStatementImpl(STATEMENT)(177,188) + PsiElement(return)('return')(177,183) + PsiWhiteSpace(' ')(183,184) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(184,188) + PsiElement(booleanLiteral)('True')(184,188) + PsiWhiteSpace('\n\n')(188,190) + VyperFunctionDefinitionImpl(FUNCTION_DEFINITION)(190,276) + VyperFunctionModifierImpl(FUNCTION_MODIFIER)(190,199) + PsiElement(@)('@')(190,191) + VyperFunctionDecoratorImpl(FUNCTION_DECORATOR)(191,199) + PsiElement(external)('external')(191,199) + PsiWhiteSpace('\n')(199,200) + PsiElement(def)('def')(200,203) + PsiWhiteSpace(' ')(203,204) + PsiElement(Identifier)('ternary')(204,211) + VyperFunctionArgsImpl(FUNCTION_ARGS)(211,235) + PsiElement(()('(')(211,212) + VyperParamDefImpl(PARAM_DEF)(212,222) + PsiElement(Identifier)('a')(212,213) + PsiElement(:)(':')(213,214) + PsiWhiteSpace(' ')(214,215) + VyperTypeImpl(TYPE)(215,222) + VyperValueTypeImpl(VALUE_TYPE)(215,222) + PsiElement(uintM)('uint256')(215,222) + PsiElement(,)(',')(222,223) + PsiWhiteSpace(' ')(223,224) + VyperParamDefImpl(PARAM_DEF)(224,234) + PsiElement(Identifier)('b')(224,225) + PsiElement(:)(':')(225,226) + PsiWhiteSpace(' ')(226,227) + VyperTypeImpl(TYPE)(227,234) + VyperValueTypeImpl(VALUE_TYPE)(227,234) + PsiElement(uintM)('uint256')(227,234) + PsiElement())(')')(234,235) + PsiWhiteSpace(' ')(235,236) + VyperFunTypeAnnotationImpl(FUN_TYPE_ANNOTATION)(236,246) + PsiElement(-)('-')(236,237) + PsiElement(>)('>')(237,238) + PsiWhiteSpace(' ')(238,239) + VyperTypeImpl(TYPE)(239,246) + VyperValueTypeImpl(VALUE_TYPE)(239,246) + PsiElement(uintM)('uint256')(239,246) + PsiElement(:)(':')(246,247) + PsiWhiteSpace('\n ')(247,252) + VyperFunctionBodyImpl(FUNCTION_BODY)(252,276) + VyperFunctionImplementationImpl(FUNCTION_IMPLEMENTATION)(252,276) + VyperStatementImpl(STATEMENT)(252,276) + PsiElement(return)('return')(252,258) + PsiWhiteSpace(' ')(258,259) + VyperTernaryExpressionImpl(TERNARY_EXPRESSION)(259,276) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(259,260) + VyperVarLiteralImpl(VAR_LITERAL)(259,260) + PsiElement(Identifier)('a')(259,260) + PsiWhiteSpace(' ')(260,261) + PsiElement(if)('if')(261,263) + PsiWhiteSpace(' ')(263,264) + VyperCompExpressionImpl(COMP_EXPRESSION)(264,269) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(264,265) + VyperVarLiteralImpl(VAR_LITERAL)(264,265) + PsiElement(Identifier)('a')(264,265) + PsiWhiteSpace(' ')(265,266) + PsiElement(>)('>')(266,267) + PsiWhiteSpace(' ')(267,268) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(268,269) + VyperVarLiteralImpl(VAR_LITERAL)(268,269) + PsiElement(Identifier)('b')(268,269) + PsiWhiteSpace(' ')(269,270) + PsiElement(else)('else')(270,274) + PsiWhiteSpace(' ')(274,275) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(275,276) + VyperVarLiteralImpl(VAR_LITERAL)(275,276) + PsiElement(Identifier)('b')(275,276) + PsiWhiteSpace('\n\n')(276,278) + VyperFunctionDefinitionImpl(FUNCTION_DEFINITION)(278,408) + VyperFunctionModifierImpl(FUNCTION_MODIFIER)(278,287) + PsiElement(@)('@')(278,279) + VyperFunctionDecoratorImpl(FUNCTION_DECORATOR)(279,287) + PsiElement(external)('external')(279,287) + PsiWhiteSpace('\n')(287,288) + PsiElement(def)('def')(288,291) + PsiWhiteSpace(' ')(291,292) + PsiElement(Identifier)('nested_constant_list_accessor')(292,321) + VyperFunctionArgsImpl(FUNCTION_ARGS)(321,323) + PsiElement(()('(')(321,322) + PsiElement())(')')(322,323) + PsiWhiteSpace(' ')(323,324) + VyperFunTypeAnnotationImpl(FUN_TYPE_ANNOTATION)(324,331) + PsiElement(-)('-')(324,325) + PsiElement(>)('>')(325,326) + PsiWhiteSpace(' ')(326,327) + VyperTypeImpl(TYPE)(327,331) + VyperValueTypeImpl(VALUE_TYPE)(327,331) + PsiElement(bool)('bool')(327,331) + PsiElement(:)(':')(331,332) + PsiWhiteSpace('\n ')(332,337) + VyperFunctionBodyImpl(FUNCTION_BODY)(337,408) + VyperFunctionImplementationImpl(FUNCTION_IMPLEMENTATION)(337,408) + VyperStatementImpl(STATEMENT)(337,351) + VyperLocalVariableDefinitionImpl(LOCAL_VARIABLE_DEFINITION)(337,351) + PsiElement(Identifier)('f')(337,338) + PsiElement(:)(':')(338,339) + PsiWhiteSpace(' ')(339,340) + VyperTypeImpl(TYPE)(340,347) + VyperValueTypeImpl(VALUE_TYPE)(340,347) + PsiElement(uintM)('uint256')(340,347) + PsiWhiteSpace(' ')(347,348) + PsiElement(=)('=')(348,349) + PsiWhiteSpace(' ')(349,350) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(350,351) + PsiElement(decimalNumber)('1')(350,351) + PsiWhiteSpace('\n ')(351,356) + VyperStatementImpl(STATEMENT)(356,395) + VyperLocalVariableDefinitionImpl(LOCAL_VARIABLE_DEFINITION)(356,395) + PsiElement(Identifier)('a')(356,357) + PsiElement(:)(':')(357,358) + PsiWhiteSpace(' ')(358,359) + VyperTypeImpl(TYPE)(359,363) + VyperValueTypeImpl(VALUE_TYPE)(359,363) + PsiElement(bool)('bool')(359,363) + PsiWhiteSpace(' ')(363,364) + PsiElement(=)('=')(364,365) + PsiWhiteSpace(' ')(365,366) + VyperPlusMinExpressionImpl(PLUS_MIN_EXPRESSION)(366,395) + VyperIndexAccessExpressionImpl(INDEX_ACCESS_EXPRESSION)(366,390) + VyperEqExpressionImpl(EQ_EXPRESSION)(366,378) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(366,367) + PsiElement(decimalNumber)('1')(366,367) + PsiWhiteSpace(' ')(367,368) + PsiElement(==)('==')(368,370) + PsiWhiteSpace(' ')(370,371) + VyperInlineArrayExpressionImpl(INLINE_ARRAY_EXPRESSION)(371,378) + PsiElement([)('[')(371,372) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(372,373) + PsiElement(decimalNumber)('1')(372,373) + PsiElement(,)(',')(373,374) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(374,375) + PsiElement(decimalNumber)('2')(374,375) + PsiElement(,)(',')(375,376) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(376,377) + PsiElement(decimalNumber)('4')(376,377) + PsiElement(])(']')(377,378) + PsiElement([)('[')(378,379) + VyperPlusMinExpressionImpl(PLUS_MIN_EXPRESSION)(379,389) + VyperMemberAccessExpressionImpl(MEMBER_ACCESS_EXPRESSION)(379,385) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(379,383) + PsiElement(self)('self')(379,383) + PsiElement(.)('.')(383,384) + VyperVarLiteralImpl(VAR_LITERAL)(384,385) + PsiElement(Identifier)('x')(384,385) + PsiWhiteSpace(' ')(385,386) + PsiElement(+)('+')(386,387) + PsiWhiteSpace(' ')(387,388) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(388,389) + VyperVarLiteralImpl(VAR_LITERAL)(388,389) + PsiElement(Identifier)('f')(388,389) + PsiElement(])(']')(389,390) + PsiWhiteSpace(' ')(390,391) + PsiElement(+)('+')(391,392) + PsiWhiteSpace(' ')(392,393) + VyperUnaryExpressionImpl(UNARY_EXPRESSION)(393,395) + PsiElement(-)('-')(393,394) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(394,395) + PsiElement(decimalNumber)('1')(394,395) + PsiWhiteSpace('\n ')(395,400) + VyperStatementImpl(STATEMENT)(400,408) + PsiElement(return)('return')(400,406) + PsiWhiteSpace(' ')(406,407) + VyperPrimaryExpressionImpl(PRIMARY_EXPRESSION)(407,408) + VyperVarLiteralImpl(VAR_LITERAL)(407,408) + PsiElement(Identifier)('a')(407,408) \ No newline at end of file diff --git a/src/test/resources/TestParse/ParsingTestData.vy b/src/test/resources/TestParse/ParsingTestData.vy index 75c6e57..6c04e1e 100644 --- a/src/test/resources/TestParse/ParsingTestData.vy +++ b/src/test/resources/TestParse/ParsingTestData.vy @@ -1,5 +1,6 @@ +# pragma version ^0.3.0 -x: constant(uint256) = max(uint256) +x: constant(uint256) = max_value(uint256) y: immutable(address) @external @@ -17,5 +18,5 @@ def ternary(a: uint256, b: uint256) -> uint256: @external def nested_constant_list_accessor() -> bool: f: uint256 = 1 - a: bool = 1 == [1,2,4][f] + -1 + a: bool = 1 == [1,2,4][self.x + f] + -1 return a diff --git a/src/test/resources/examples/example.vy b/src/test/resources/examples/example.vy index 10ae943..e389727 100644 --- a/src/test/resources/examples/example.vy +++ b/src/test/resources/examples/example.vy @@ -1,7 +1,5 @@ # pragma version 0.3.10 # Blind Auction # Adapted to Vyper from [Solidity by Example](https://github.com/ethereum/solidity/blob/develop/docs/solidity-by-example.rst#blind-auction-1) -import Test - struct Bid: blindedBid: bytes32 deposit: uint256 diff --git a/src/test/resources/examples/test.vy b/src/test/resources/examples/test.vy index d5179fe..5b5c813 100644 --- a/src/test/resources/examples/test.vy +++ b/src/test/resources/examples/test.vy @@ -1,5 +1,7 @@ # pragma version 0.4.0 ### Press F or not to press F contract example +import example + initial_distribution: constant(int128) = 100 test_calc: uint256[initial_distribution + 1] @@ -70,6 +72,14 @@ def finish_vote(): def get_current_proposal()->Bytes[100]: return self.current_proposal +@external +def get_proposal(test:uint256)->Bytes[100]: + res: int8 = self.current_proposal[test - 1] + log example.AuctionEnded(self, convert( + res, uint256 + )) + return res + @external def test_trailing_comma() -> uint256[1]: return [