diff --git a/Pawn.tmLanguage b/Pawn.tmLanguage index 5cb3bf1..e7ae543 100644 --- a/Pawn.tmLanguage +++ b/Pawn.tmLanguage @@ -940,6 +940,14 @@ 1 name storage.modifier.c + + match + case\s*(([a-zA-Z_@0-9])*([\s,\.]))*(([a-zA-Z_@0-9])*\:) + captures + + 1 name storage.type.c + + match \s*\b(public|forward|native|char|const|static|stock)\b captures @@ -949,7 +957,7 @@ match - \s*\b([A-Za-z_]\w*)\:\s*\b + ^(?!case.*)\s*\b([A-Za-z_]\w*)\:\s*\b name storage.modifier.c diff --git a/easyDialog.inc.sublime-completions b/easyDialog.inc.sublime-completions index be6bb9d..b8de1b0 100644 --- a/easyDialog.inc.sublime-completions +++ b/easyDialog.inc.sublime-completions @@ -5,7 +5,7 @@ {"trigger": "OnDialogPerformed", "contents": "OnDialogPerformed(${1:playerid}, ${2:dialog[]}, ${3:response}, ${4:success})"}, {"trigger": "Dialog_Opened", "contents": "Dialog_Opened(${1:playerid})"}, {"trigger": "Dialog_Close", "contents": "Dialog_Close(${1:playerid})"}, - {"trigger": "Dialog_Show", "contents": "Dialog_Open(${1:playerid}, ${2:function[]}, ${3:style}, ${4:caption[]}, ${5:info[]}, ${6:button1[]}, ${7:button2[]}, ${8:...})"}, + {"trigger": "Dialog_Show", "contents": "Dialog_Show(${1:playerid}, ${2:function[]}, ${3:style}, ${4:caption[]}, ${5:info[]}, ${6:button1[]}, ${7:button2[]}, ${8:...})"}, {"trigger": "Dialog", "contents": "Dialog:${1:name}(${2:params})"} ] } diff --git a/misc/syntax_test-1 b/misc/syntax_test-1 index 6e85a12..8ad67e1 100644 --- a/misc/syntax_test-1 +++ b/misc/syntax_test-1 @@ -250,7 +250,24 @@ testFunction3() testfunction4() //^source.pawn meta.function.c entity.name.function.definition.c { - // + Tag:variable; + Briefcase:variable; + + switch(x) + { + case CONST_ONE, CONST_TWO, CONST_THREE, CONST_FOUR .. CONST_RANGE_5, CONST_6: return 2; +// ^source.pawn meta.function.c meta.block.c meta.block.c +// ^-source.pawn meta.function.c meta.block.c meta.block.c storage.modifier.c + } + + switch(x) + { + case CONST_ONE, CONST_TWO, CONST_THREE: + some_variable = 4; + + case CONST_FOUR .. CONST_RANGE_5, CONST_6: + some_variable = 4; + } return c; }