diff --git a/CHANGELOG.md b/CHANGELOG.md index b71ab9e..6fb5672 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ # RON Extended Support Changelog ## [Unreleased] +### Fixed +- Fixed char literal parsing. Now we support simple char literals. + ## [0.2.6] ### Fixed - Updated plugin to support new versions of IDE diff --git a/gradle.properties b/gradle.properties index 8644655..e018b5c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ pluginGroup = com.github.madwareru.intellijronremix pluginName = RON Extended Support -pluginVersion = 0.2.6 +pluginVersion = 0.2.7 pluginSinceBuild = 203 pluginUntilBuild = 213.* diff --git a/src/main/gen/com/github/madwareru/intellijronremix/language/__RONLexer.java b/src/main/gen/com/github/madwareru/intellijronremix/language/__RONLexer.java index 716db86..6031a6e 100644 --- a/src/main/gen/com/github/madwareru/intellijronremix/language/__RONLexer.java +++ b/src/main/gen/com/github/madwareru/intellijronremix/language/__RONLexer.java @@ -58,12 +58,12 @@ public static int ZZ_CMAP(int ch) { /* The ZZ_CMAP_A table has 640 entries */ static final char ZZ_CMAP_A[] = zzUnpackCMap( - "\11\0\1\3\1\2\2\1\1\2\22\0\1\34\1\70\1\36\1\67\3\33\1\32\1\55\1\56\1\71\1"+ - "\17\1\64\1\17\1\30\1\4\1\20\1\25\6\27\2\16\1\63\6\33\1\50\1\37\1\42\1\22\1"+ - "\31\1\22\1\54\1\15\1\53\1\15\1\43\1\40\1\44\1\45\1\41\2\15\1\47\1\52\1\46"+ - "\2\15\1\51\3\15\1\57\1\35\1\60\1\33\1\23\1\33\1\12\1\24\2\22\1\10\1\11\5\15"+ - "\1\13\1\65\1\66\1\26\2\15\1\6\1\14\1\5\1\7\2\15\1\21\2\15\1\61\1\33\1\62\1"+ - "\33\6\0\1\1\32\0\1\3\337\0\1\3\177\0\13\3\35\0\2\1\5\0\1\3\57\0\1\3\40\0"); + "\11\0\1\3\1\2\2\1\1\2\22\0\1\42\1\67\1\33\1\66\3\0\1\32\1\54\1\55\1\70\1\17"+ + "\1\63\1\17\1\30\1\4\1\20\1\25\6\27\2\16\1\62\6\0\1\47\1\35\1\40\1\22\1\31"+ + "\1\22\1\53\1\15\1\52\1\15\1\41\1\36\1\43\1\44\1\37\2\15\1\46\1\51\1\45\2\15"+ + "\1\50\3\15\1\56\1\34\1\57\1\0\1\23\1\0\1\12\1\24\2\22\1\10\1\11\5\15\1\13"+ + "\1\64\1\65\1\26\2\15\1\6\1\14\1\5\1\7\2\15\1\21\2\15\1\60\1\0\1\61\7\0\1\1"+ + "\32\0\1\3\337\0\1\3\177\0\13\3\35\0\2\1\5\0\1\3\57\0\1\3\40\0"); /** * Translates DFA states to action switch labels. @@ -72,16 +72,16 @@ public static int ZZ_CMAP(int ch) { private static final String ZZ_ACTION_PACKED_0 = "\4\0\1\1\1\2\1\1\5\3\1\4\1\1\1\4"+ - "\1\1\1\5\2\1\4\3\1\6\1\7\1\10\1\11"+ - "\1\12\1\13\1\14\1\15\1\1\1\16\1\17\1\20"+ - "\1\16\1\21\1\22\1\3\1\23\1\0\2\3\1\4"+ - "\1\24\3\0\1\5\3\0\1\25\4\3\1\0\1\26"+ - "\3\3\1\0\3\4\1\25\4\3\1\27\1\30\1\3"+ - "\1\24\1\3\1\31\1\0\1\32\2\3\1\0\1\33"+ - "\11\0\1\34\2\0\1\35"; + "\3\1\4\3\1\5\1\6\1\7\1\10\1\11\1\12"+ + "\1\13\1\14\1\1\1\15\1\16\1\17\1\15\1\20"+ + "\1\21\1\3\1\22\1\0\2\3\1\4\1\23\6\0"+ + "\1\24\1\0\4\3\1\0\1\25\3\3\1\0\3\4"+ + "\2\26\1\24\4\3\1\27\1\30\1\3\1\23\1\3"+ + "\1\31\1\0\1\32\2\3\1\0\1\33\11\0\1\34"+ + "\2\0\1\35"; private static int [] zzUnpackAction() { - int [] result = new int[96]; + int [] result = new int[97]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -106,21 +106,22 @@ 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\72\0\164\0\256\0\350\0\u0122\0\u015c\0\u0196"+ - "\0\u01d0\0\u020a\0\u0244\0\u027e\0\u02b8\0\u02f2\0\u032c\0\u0366"+ - "\0\u03a0\0\u03da\0\u0414\0\u044e\0\u0488\0\u04c2\0\u04fc\0\350"+ - "\0\350\0\350\0\350\0\350\0\350\0\350\0\350\0\u0536"+ - "\0\350\0\u0570\0\350\0\u05aa\0\u05e4\0\350\0\u061e\0\350"+ - "\0\u0658\0\u0692\0\u06cc\0\u0706\0\u0740\0\u077a\0\u07b4\0\u07ee"+ - "\0\350\0\u0828\0\u0414\0\u0862\0\350\0\u089c\0\u08d6\0\u0910"+ - "\0\u094a\0\u0984\0\350\0\u09be\0\u09f8\0\u0a32\0\u0a6c\0\u0aa6"+ - "\0\u0ae0\0\u0b1a\0\u0414\0\u0b54\0\u0b8e\0\u0bc8\0\u0c02\0\350"+ - "\0\u020a\0\u0c3c\0\u0a6c\0\u0c76\0\u020a\0\u0cb0\0\u020a\0\u0cea"+ - "\0\u0d24\0\u0d5e\0\u020a\0\u0d98\0\u0dd2\0\u0e0c\0\u0e46\0\u0e80"+ - "\0\u0eba\0\u0ef4\0\u0f2e\0\u0f68\0\350\0\u0fa2\0\u0fdc\0\350"; + "\0\0\0\71\0\162\0\253\0\344\0\u011d\0\u0156\0\u018f"+ + "\0\u01c8\0\u0201\0\u023a\0\u0273\0\u02ac\0\u02e5\0\u031e\0\u0357"+ + "\0\u0390\0\u03c9\0\u0402\0\u043b\0\u0474\0\u04ad\0\344\0\344"+ + "\0\344\0\344\0\344\0\344\0\344\0\344\0\u04e6\0\344"+ + "\0\u051f\0\344\0\u0558\0\u0591\0\344\0\u05ca\0\344\0\u0603"+ + "\0\u063c\0\u0675\0\u06ae\0\u06e7\0\u0720\0\u0759\0\u0792\0\u07cb"+ + "\0\u0804\0\u03c9\0\344\0\u083d\0\u0876\0\u08af\0\u08e8\0\u0921"+ + "\0\u095a\0\344\0\u0993\0\u09cc\0\u0a05\0\u0a3e\0\u0a77\0\u0ab0"+ + "\0\u0ae9\0\344\0\u07cb\0\u03c9\0\u0b22\0\u0b5b\0\u0b94\0\u0bcd"+ + "\0\344\0\u0201\0\u0c06\0\u0a3e\0\u0c3f\0\u0201\0\u0c78\0\u0201"+ + "\0\u0cb1\0\u0cea\0\u0d23\0\u0201\0\u0d5c\0\u0d95\0\u0dce\0\u0e07"+ + "\0\u0e40\0\u0e79\0\u0eb2\0\u0eeb\0\u0f24\0\344\0\u0f5d\0\u0f96"+ + "\0\344"; private static int [] zzUnpackRowMap() { - int [] result = new int[96]; + int [] result = new int[97]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -145,79 +146,86 @@ private static int zzUnpackRowMap(String packed, int offset, int [] result) { private static final String ZZ_TRANS_PACKED_0 = "\1\5\3\6\1\7\1\10\1\11\1\12\1\13\1\14"+ "\4\12\1\15\1\16\1\17\4\12\1\15\1\12\1\15"+ - "\1\20\1\12\1\21\1\5\1\6\1\22\1\23\1\24"+ - "\5\12\1\25\1\12\1\26\2\12\1\27\2\12\1\30"+ - "\1\31\1\32\1\33\1\34\1\35\1\36\1\37\2\12"+ - "\1\40\2\5\36\41\1\42\33\41\72\43\71\41\1\44"+ - "\73\0\3\6\30\0\1\6\41\0\1\45\64\0\1\46"+ - "\5\0\1\12\1\47\10\12\1\0\10\12\1\0\1\12"+ - "\5\0\16\12\10\0\2\12\10\0\12\12\1\0\10\12"+ - "\1\0\1\12\4\0\1\50\16\12\10\0\2\12\1\51"+ - "\7\0\12\12\1\0\10\12\1\0\1\12\5\0\16\12"+ + "\1\20\1\12\1\21\1\22\1\5\1\23\4\12\1\6"+ + "\1\12\1\24\1\12\1\25\2\12\1\26\2\12\1\27"+ + "\1\30\1\31\1\32\1\33\1\34\1\35\1\36\2\12"+ + "\1\37\2\5\33\40\1\41\35\40\71\42\70\40\1\43"+ + "\72\0\3\6\36\0\1\6\32\0\1\44\63\0\1\45"+ + "\5\0\1\12\1\46\10\12\1\0\10\12\1\0\1\12"+ + "\3\0\5\12\1\0\11\12\10\0\2\12\10\0\12\12"+ + "\1\0\10\12\1\0\1\12\1\0\1\47\1\0\5\12"+ + "\1\0\11\12\10\0\2\12\1\50\7\0\12\12\1\0"+ + "\10\12\1\0\1\12\3\0\5\12\1\0\11\12\10\0"+ + "\2\12\10\0\12\12\1\0\10\12\1\0\1\12\3\0"+ + "\5\12\1\0\11\12\10\0\1\12\1\51\10\0\5\12"+ + "\1\52\4\12\1\0\10\12\1\0\1\12\3\0\5\12"+ + "\1\0\11\12\10\0\2\12\21\0\1\15\1\0\1\15"+ + "\2\0\1\53\1\0\1\15\1\0\1\15\1\54\56\0"+ + "\1\15\1\0\1\17\4\0\1\15\1\0\1\15\57\0"+ + "\1\15\1\0\1\15\1\55\1\0\1\53\1\56\1\15"+ + "\1\57\1\15\1\54\56\0\1\54\1\0\1\54\4\0"+ + "\1\54\1\0\1\54\41\0\2\60\1\0\30\60\1\0"+ + "\1\61\34\60\2\62\1\0\30\62\1\63\1\64\34\62"+ + "\5\0\12\12\1\0\10\12\1\0\1\12\3\0\1\12"+ + "\1\65\3\12\1\0\11\12\10\0\2\12\10\0\12\12"+ + "\1\0\6\12\1\66\1\12\1\0\1\12\3\0\5\12"+ + "\1\0\11\12\10\0\2\12\10\0\12\12\1\0\10\12"+ + "\1\0\1\12\3\0\5\12\1\0\4\12\1\67\4\12"+ + "\10\0\2\12\10\0\12\12\1\0\6\12\1\70\1\12"+ + "\1\0\1\12\3\0\5\12\1\0\11\12\10\0\2\12"+ + "\72\0\1\71\67\0\1\41\6\0\1\72\64\0\1\44"+ + "\2\0\66\44\5\0\2\12\1\73\7\12\1\0\10\12"+ + "\1\0\1\12\3\0\5\12\1\0\11\12\10\0\2\12"+ + "\36\0\1\47\32\0\1\50\7\0\5\12\1\74\4\12"+ + "\1\0\10\12\1\0\1\12\3\0\5\12\1\0\11\12"+ + "\10\0\2\12\10\0\6\12\1\75\3\12\1\0\10\12"+ + "\1\0\1\12\3\0\5\12\1\0\11\12\10\0\2\12"+ + "\21\0\1\53\1\0\1\53\2\0\1\53\1\0\1\53"+ + "\1\0\1\53\51\0\1\76\5\0\1\54\1\0\1\54"+ + "\4\0\1\54\1\0\1\54\1\0\1\76\47\0\3\77"+ + "\3\0\1\77\1\0\1\77\1\0\1\77\1\0\2\77"+ + "\1\0\1\77\1\0\1\77\3\0\1\77\2\0\1\77"+ + "\6\0\1\77\41\0\1\100\4\0\1\100\63\0\1\101"+ + "\4\0\1\101\1\0\1\101\73\0\1\102\36\0\1\60"+ + "\3\0\26\60\1\103\7\60\1\0\26\60\2\62\1\0"+ + "\30\62\1\104\1\64\34\62\5\0\12\12\1\0\10\12"+ + "\1\0\1\12\3\0\2\12\1\105\2\12\1\0\11\12"+ "\10\0\2\12\10\0\12\12\1\0\10\12\1\0\1\12"+ - "\5\0\16\12\10\0\1\12\1\52\10\0\5\12\1\53"+ - "\4\12\1\0\10\12\1\0\1\12\5\0\16\12\10\0"+ - "\2\12\21\0\1\15\1\0\1\15\2\0\1\54\1\0"+ - "\1\15\1\0\1\15\1\55\57\0\1\15\1\0\1\17"+ - "\4\0\1\15\1\0\1\15\60\0\1\15\1\0\1\15"+ - "\1\56\1\0\1\54\1\57\1\15\1\60\1\15\1\55"+ - "\57\0\1\55\1\0\1\55\4\0\1\55\1\0\1\55"+ - "\46\0\26\61\1\0\2\61\1\0\34\61\35\0\1\62"+ - "\34\0\2\63\1\0\32\63\1\64\1\65\33\63\5\0"+ - "\12\12\1\0\10\12\1\0\1\12\5\0\1\12\1\66"+ - "\14\12\10\0\2\12\10\0\12\12\1\0\6\12\1\67"+ - "\1\12\1\0\1\12\5\0\16\12\10\0\2\12\10\0"+ - "\12\12\1\0\10\12\1\0\1\12\5\0\11\12\1\70"+ - "\4\12\10\0\2\12\10\0\12\12\1\0\6\12\1\71"+ - "\1\12\1\0\1\12\5\0\16\12\10\0\2\12\73\0"+ - "\1\72\70\0\1\42\6\0\1\73\65\0\1\45\2\0"+ - "\67\45\5\0\2\12\1\74\7\12\1\0\10\12\1\0"+ - "\1\12\5\0\16\12\10\0\2\12\41\0\1\50\30\0"+ - "\1\51\7\0\5\12\1\75\4\12\1\0\10\12\1\0"+ - "\1\12\5\0\16\12\10\0\2\12\10\0\6\12\1\76"+ - "\3\12\1\0\10\12\1\0\1\12\5\0\16\12\10\0"+ - "\2\12\21\0\1\54\1\0\1\54\2\0\1\54\1\0"+ - "\1\54\1\0\1\54\52\0\1\77\5\0\1\55\1\0"+ - "\1\55\4\0\1\55\1\0\1\55\1\0\1\77\50\0"+ - "\3\100\3\0\1\100\1\0\1\100\1\0\1\100\1\0"+ - "\2\100\1\0\1\100\1\0\1\100\5\0\1\100\2\0"+ - "\1\100\5\0\1\100\41\0\1\101\4\0\1\101\64\0"+ - "\1\102\4\0\1\102\1\0\1\102\74\0\1\61\37\0"+ - "\2\63\1\0\32\63\1\64\1\103\33\63\5\0\12\12"+ - "\1\0\10\12\1\0\1\12\5\0\2\12\1\104\13\12"+ + "\3\0\5\12\1\0\11\12\10\0\1\12\1\106\10\0"+ + "\12\12\1\0\10\12\1\0\1\12\3\0\5\12\1\0"+ + "\5\12\1\107\3\12\10\0\2\12\10\0\12\12\1\0"+ + "\10\12\1\0\1\12\3\0\5\12\1\0\11\12\10\0"+ + "\1\110\1\12\61\0\1\111\17\0\3\12\1\112\6\12"+ + "\1\0\10\12\1\0\1\12\3\0\5\12\1\0\11\12"+ + "\10\0\2\12\10\0\12\12\1\0\4\12\1\113\3\12"+ + "\1\0\1\12\3\0\5\12\1\0\11\12\10\0\2\12"+ + "\10\0\7\12\1\73\2\12\1\0\10\12\1\0\1\12"+ + "\3\0\5\12\1\0\11\12\10\0\2\12\21\0\1\114"+ + "\1\0\1\114\4\0\1\114\1\0\1\114\51\0\3\77"+ + "\3\0\1\77\1\0\1\77\1\0\4\77\1\0\1\77"+ + "\1\0\1\77\3\0\1\77\2\0\1\77\6\0\1\77"+ + "\41\0\1\100\2\0\1\100\1\0\1\100\63\0\1\101"+ + "\2\0\1\101\1\0\1\101\1\0\1\101\46\0\12\12"+ + "\1\0\10\12\1\0\1\12\3\0\3\12\1\115\1\12"+ + "\1\0\11\12\10\0\2\12\10\0\3\12\1\116\6\12"+ + "\1\0\10\12\1\0\1\12\3\0\5\12\1\0\11\12"+ "\10\0\2\12\10\0\12\12\1\0\10\12\1\0\1\12"+ - "\5\0\16\12\10\0\1\12\1\105\10\0\12\12\1\0"+ - "\10\12\1\0\1\12\5\0\12\12\1\106\3\12\10\0"+ - "\2\12\10\0\12\12\1\0\10\12\1\0\1\12\5\0"+ - "\16\12\10\0\1\107\1\12\62\0\1\110\17\0\3\12"+ - "\1\111\6\12\1\0\10\12\1\0\1\12\5\0\16\12"+ - "\10\0\2\12\10\0\12\12\1\0\4\12\1\112\3\12"+ - "\1\0\1\12\5\0\16\12\10\0\2\12\10\0\7\12"+ - "\1\74\2\12\1\0\10\12\1\0\1\12\5\0\16\12"+ - "\10\0\2\12\21\0\1\113\1\0\1\113\4\0\1\113"+ - "\1\0\1\113\52\0\3\100\3\0\1\100\1\0\1\100"+ - "\1\0\4\100\1\0\1\100\1\0\1\100\5\0\1\100"+ - "\2\0\1\100\5\0\1\100\41\0\1\101\2\0\1\101"+ - "\1\0\1\101\64\0\1\102\2\0\1\102\1\0\1\102"+ - "\1\0\1\102\47\0\12\12\1\0\10\12\1\0\1\12"+ - "\5\0\3\12\1\114\12\12\10\0\2\12\10\0\3\12"+ - "\1\115\6\12\1\0\10\12\1\0\1\12\5\0\16\12"+ + "\3\0\5\12\1\117\11\12\10\0\2\12\10\0\3\12"+ + "\1\120\6\12\1\0\10\12\1\0\1\12\3\0\5\12"+ + "\1\0\11\12\10\0\2\12\10\0\6\12\1\121\3\12"+ + "\1\0\10\12\1\0\1\12\3\0\5\12\1\0\11\12"+ "\10\0\2\12\10\0\12\12\1\0\10\12\1\0\1\12"+ - "\2\0\1\116\2\0\16\12\10\0\2\12\10\0\3\12"+ - "\1\117\6\12\1\0\10\12\1\0\1\12\5\0\16\12"+ - "\10\0\2\12\10\0\6\12\1\120\3\12\1\0\10\12"+ - "\1\0\1\12\5\0\16\12\10\0\2\12\10\0\12\12"+ - "\1\0\10\12\1\0\1\12\5\0\4\12\1\121\11\12"+ - "\10\0\2\12\55\0\1\122\24\0\3\12\1\123\6\12"+ - "\1\0\10\12\1\0\1\12\5\0\16\12\10\0\2\12"+ - "\10\0\12\12\1\0\10\12\1\0\1\12\2\0\1\124"+ - "\2\0\16\12\10\0\2\12\51\0\1\125\65\0\1\126"+ - "\76\0\1\127\63\0\1\130\103\0\1\131\62\0\1\132"+ - "\72\0\1\133\70\0\1\134\101\0\1\135\46\0\1\136"+ - "\105\0\1\137\72\0\1\140\23\0"; + "\3\0\4\12\1\122\1\0\11\12\10\0\2\12\54\0"+ + "\1\123\24\0\3\12\1\124\6\12\1\0\10\12\1\0"+ + "\1\12\3\0\5\12\1\0\11\12\10\0\2\12\10\0"+ + "\12\12\1\0\10\12\1\0\1\12\3\0\5\12\1\125"+ + "\11\12\10\0\2\12\50\0\1\126\63\0\1\127\76\0"+ + "\1\130\61\0\1\131\103\0\1\132\61\0\1\133\71\0"+ + "\1\134\67\0\1\135\100\0\1\136\46\0\1\137\103\0"+ + "\1\140\71\0\1\141\23\0"; private static int [] zzUnpackTrans() { - int [] result = new int[4118]; + int [] result = new int[4047]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -255,14 +263,14 @@ private static int zzUnpackTrans(String packed, int offset, int [] result) { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\4\0\1\11\22\1\10\11\1\1\1\11\1\1\1\11"+ - "\2\1\1\11\1\1\1\11\1\0\4\1\3\0\1\11"+ - "\3\0\1\11\4\1\1\0\1\11\3\1\1\0\10\1"+ - "\1\11\5\1\1\0\3\1\1\0\1\1\11\0\1\11"+ - "\2\0\1\11"; + "\4\0\1\11\21\1\10\11\1\1\1\11\1\1\1\11"+ + "\2\1\1\11\1\1\1\11\1\0\4\1\6\0\1\11"+ + "\1\0\4\1\1\0\1\11\3\1\1\0\3\1\1\11"+ + "\6\1\1\11\5\1\1\0\3\1\1\0\1\1\11\0"+ + "\1\11\2\0\1\11"; private static int [] zzUnpackAttribute() { - int [] result = new int[96]; + int [] result = new int[97]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -588,15 +596,15 @@ else if (zzAtEOF) { case IN_RAW_STRING: { return imbueRawLiteral(); } // fall though - case 97: break; + case 98: break; case IN_RAW_STRING_SUFFIX: { return imbueRawLiteral(); } // fall though - case 98: break; + case 99: break; case IN_BLOCK_COMMENT: { return imbueBlockComment(); } // fall though - case 99: break; + case 100: break; default: return null; } @@ -624,56 +632,51 @@ else if (zzAtEOF) { // fall through case 33: break; case 5: - { return CHAR; + { return PARENTHESISL; } // fall through case 34: break; case 6: - { return PARENTHESISL; + { return PARENTHESISR; } // fall through case 35: break; case 7: - { return PARENTHESISR; + { return BRACKETL; } // fall through case 36: break; case 8: - { return BRACKETL; + { return BRACKETR; } // fall through case 37: break; case 9: - { return BRACKETR; + { return BRACEL; } // fall through case 38: break; case 10: - { return BRACEL; + { return BRACER; } // fall through case 39: break; case 11: - { return BRACER; + { return COLON; } // fall through case 40: break; case 12: - { return COLON; + { return COMMA; } // fall through case 41: break; case 13: - { return COMMA; + { } // fall through case 42: break; case 14: - { - } - // fall through - case 43: break; - case 15: { int shaExcess = yylength() - 1 - zzShaStride; if (shaExcess >= 0) { yybegin(IN_RAW_STRING_SUFFIX); @@ -681,43 +684,48 @@ else if (zzAtEOF) { } } // fall through - case 44: break; - case 16: + case 43: break; + case 15: { yypushback(1); return imbueRawLiteral(); } // fall through - case 45: break; - case 17: + case 44: break; + case 16: { return COMMENT; } // fall through - case 46: break; - case 18: + case 45: break; + case 17: { yybegin(IN_BLOCK_COMMENT); yypushback(2); } // fall through - case 47: break; - case 19: + case 46: break; + case 18: { yybegin(IN_RAW_STRING); zzPostponedMarkedPos = zzStartRead; zzShaStride = yylength() - 2; } // fall through + case 47: break; + case 19: + { return FLOAT; + } + // fall through case 48: break; case 20: - { return FLOAT; + { return STRING; } // fall through case 49: break; case 21: - { return STRING; + { return imbueBlockComment(); } // fall through case 50: break; case 22: - { return imbueBlockComment(); + { return CHAR; } // fall through case 51: break; diff --git a/src/main/gen/com/github/madwareru/intellijronremix/language/psi/RONMapKey.java b/src/main/gen/com/github/madwareru/intellijronremix/language/psi/RONMapKey.java index 8018247..1070d50 100644 --- a/src/main/gen/com/github/madwareru/intellijronremix/language/psi/RONMapKey.java +++ b/src/main/gen/com/github/madwareru/intellijronremix/language/psi/RONMapKey.java @@ -13,16 +13,10 @@ public interface RONMapKey extends PsiElement { @Nullable RONEnum getEnum(); - @Nullable - PsiElement getChar(); - @Nullable PsiElement getFloat(); @Nullable PsiElement getInteger(); - @Nullable - PsiElement getString(); - } diff --git a/src/main/gen/com/github/madwareru/intellijronremix/language/psi/RONValue.java b/src/main/gen/com/github/madwareru/intellijronremix/language/psi/RONValue.java index 650fccd..5f94f40 100644 --- a/src/main/gen/com/github/madwareru/intellijronremix/language/psi/RONValue.java +++ b/src/main/gen/com/github/madwareru/intellijronremix/language/psi/RONValue.java @@ -25,16 +25,10 @@ public interface RONValue extends PsiElement { @Nullable RONOption getOption(); - @Nullable - PsiElement getChar(); - @Nullable PsiElement getFloat(); @Nullable PsiElement getInteger(); - @Nullable - PsiElement getString(); - } diff --git a/src/main/gen/com/github/madwareru/intellijronremix/language/psi/impl/RONMapKeyImpl.java b/src/main/gen/com/github/madwareru/intellijronremix/language/psi/impl/RONMapKeyImpl.java index 9c68362..b667798 100644 --- a/src/main/gen/com/github/madwareru/intellijronremix/language/psi/impl/RONMapKeyImpl.java +++ b/src/main/gen/com/github/madwareru/intellijronremix/language/psi/impl/RONMapKeyImpl.java @@ -39,12 +39,6 @@ public RONEnum getEnum() { return findChildByClass(RONEnum.class); } - @Override - @Nullable - public PsiElement getChar() { - return findChildByType(CHAR); - } - @Override @Nullable public PsiElement getFloat() { @@ -57,10 +51,4 @@ public PsiElement getInteger() { return findChildByType(INTEGER); } - @Override - @Nullable - public PsiElement getString() { - return findChildByType(STRING); - } - } diff --git a/src/main/gen/com/github/madwareru/intellijronremix/language/psi/impl/RONValueImpl.java b/src/main/gen/com/github/madwareru/intellijronremix/language/psi/impl/RONValueImpl.java index f0100bd..32a5509 100644 --- a/src/main/gen/com/github/madwareru/intellijronremix/language/psi/impl/RONValueImpl.java +++ b/src/main/gen/com/github/madwareru/intellijronremix/language/psi/impl/RONValueImpl.java @@ -63,12 +63,6 @@ public RONOption getOption() { return findChildByClass(RONOption.class); } - @Override - @Nullable - public PsiElement getChar() { - return findChildByType(CHAR); - } - @Override @Nullable public PsiElement getFloat() { @@ -81,10 +75,4 @@ public PsiElement getInteger() { return findChildByType(INTEGER); } - @Override - @Nullable - public PsiElement getString() { - return findChildByType(STRING); - } - } diff --git a/src/main/kotlin/com/github/madwareru/intellijronremix/ide/RONSyntaxHighlighter.kt b/src/main/kotlin/com/github/madwareru/intellijronremix/ide/RONSyntaxHighlighter.kt index 48d41b7..408ff27 100644 --- a/src/main/kotlin/com/github/madwareru/intellijronremix/ide/RONSyntaxHighlighter.kt +++ b/src/main/kotlin/com/github/madwareru/intellijronremix/ide/RONSyntaxHighlighter.kt @@ -35,7 +35,7 @@ class RONSyntaxHighlighter : SyntaxHighlighterBase() { RONTypes.BRACKETL, RONTypes.BRACKETR -> RONColor.BRACKETS RONTypes.BRACEL, RONTypes.BRACER -> RONColor.BRACES RONTypes.INTEGER, RONTypes.FLOAT -> RONColor.NUMBER - RONTypes.STRING, RONTypes.RAW_STRING -> RONColor.STRING + RONTypes.STRING, RONTypes.RAW_STRING, RONTypes.CHAR -> RONColor.STRING RONTypes.SOME, RONTypes.NONE -> RONColor.OPTION RONTypes.COMMENT, RONTypes.BLOCK_COMMENT -> RONColor.COMMENT else -> null diff --git a/src/main/kotlin/com/github/madwareru/intellijronremix/language/RON.bnf b/src/main/kotlin/com/github/madwareru/intellijronremix/language/RON.bnf index 3371b4e..f6a1248 100644 --- a/src/main/kotlin/com/github/madwareru/intellijronremix/language/RON.bnf +++ b/src/main/kotlin/com/github/madwareru/intellijronremix/language/RON.bnf @@ -26,8 +26,8 @@ INTEGER = "regexp:[+-]?((0x[0-9A-Fa-f][0-9A-Fa-f_]*)|((0[bo]?)?[0-9][0-9_]*))" FLOAT = "regexp:([+-]?[0-9]+\.[0-9]*([Ee][0-9]+)?)|(\.[0-9]+([Ee][0-9]+)?)" - CHAR = "regexp:'([ -&(-\[\]-~])|(\\')|(\\\\)'" - STRING = "regexp:\"([^\r\n\"]|(\\[\S]))*\"" + CHAR = "CHAR" + STRING = "STRING" RAW_STRING = "RAW STRING" EXT_PREFIX = "#![" diff --git a/src/main/kotlin/com/github/madwareru/intellijronremix/language/RONParserDefinition.kt b/src/main/kotlin/com/github/madwareru/intellijronremix/language/RONParserDefinition.kt index e995a2d..a67367d 100644 --- a/src/main/kotlin/com/github/madwareru/intellijronremix/language/RONParserDefinition.kt +++ b/src/main/kotlin/com/github/madwareru/intellijronremix/language/RONParserDefinition.kt @@ -34,7 +34,7 @@ class RONParserDefinition : ParserDefinition { companion object { val COMMENTS = TokenSet.create(RONTypes.COMMENT, RONTypes.BLOCK_COMMENT) - val STRING_LITERALS = TokenSet.create(RONTypes.STRING) + val STRING_LITERALS = TokenSet.create(RONTypes.STRING, RONTypes.RAW_STRING) val FILE = IFileElementType(RONLanguage.INSTANCE) } } diff --git a/src/main/kotlin/com/github/madwareru/intellijronremix/language/__RONLexer.flex b/src/main/kotlin/com/github/madwareru/intellijronremix/language/__RONLexer.flex index af9ec59..b88d3d2 100644 --- a/src/main/kotlin/com/github/madwareru/intellijronremix/language/__RONLexer.flex +++ b/src/main/kotlin/com/github/madwareru/intellijronremix/language/__RONLexer.flex @@ -63,7 +63,7 @@ BOOLEAN=true|false IDENT=[A-Za-z_][A-Za-z0-9_]* INTEGER=[+-]?((0x[0-9A-Fa-f][0-9A-Fa-f_]*)|(0b[0-1][0-1_]*)|(0o[0-7][0-7_]*)|([0-9][0-9_]*)) FLOAT=([+-]?[0-9]+\.[0-9]*([Ee][0-9]+)?)|(\.[0-9]+([Ee][0-9]+)?) -CHAR='([ -&(-\[\]-~])|(\')|(\\\\)' +CHAR='([^\r\n\"] | (\\[\S]))' STRING=\"([^\r\n\"]|(\\[\S]))*\" %%