Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
Fixed #48, changed easyDialog autocompletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed Apr 25, 2016
1 parent 5470420 commit c9cdb0b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
10 changes: 9 additions & 1 deletion Pawn.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,14 @@
<key>1</key> <dict> <key>name</key> <string>storage.modifier.c</string> </dict>
</dict>
</dict>
<dict>
<key>match</key>
<string>case\s*(([a-zA-Z_@0-9])*([\s,\.]))*(([a-zA-Z_@0-9])*\:)</string>
<key>captures</key>
<dict>
<key>1</key> <dict> <key>name</key> <string>storage.type.c</string> </dict>
</dict>
</dict>
<dict>
<key>match</key> <string>\s*\b(public|forward|native|char|const|static|stock)\b</string>
<key>captures</key>
Expand All @@ -949,7 +957,7 @@
</dict>
<dict>
<key>match</key>
<string>\s*\b([A-Za-z_]\w*)\:\s*\b</string>
<string>^(?!case.*)\s*\b([A-Za-z_]\w*)\:\s*\b</string>
<key>name</key>
<string>storage.modifier.c</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion easyDialog.inc.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -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})"}
]
}
19 changes: 18 additions & 1 deletion misc/syntax_test-1
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit c9cdb0b

Please sign in to comment.