Skip to content

Commit

Permalink
Fixed an include bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavlo Malynin committed Sep 1, 2015
1 parent 22842a1 commit 2db8982
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Assembly x86.JSON-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
{ "name": "support.function.directive.assembly",
"match": "^%endmacro"
},
{
"name": "comment.assembly",
"begin": "^%comment",
"end" : "^%endcomment"
},
{
"match": "\\s*(?i)(%define|%ifndef|%xdefine|%idefine|%undef|%assign|%defstr|%strcat|%strlen|%substr|%00|%0|%rotate|%rep|%endrep|%include|\\$\\$|\\$|%unmacro|%if|%elif|%else|%endif|%(el)?ifdef|%(el)?ifmacro|%(el)?ifctx|%(el)?ifidn|%(el)?ifidni|%(el)?ifid|%(el)?ifnum|%(el)?ifstr|%(el)?iftoken|%(el)?ifempty|%(el)?ifenv|%pathsearch|%depend|%use|%push|%pop|%repl|%arg|%stacksize|%local|%error|%warning|%fatal|%line|%!|%comment|%endcomment|__NASM_VERSION_ID__|__NASM_VER__|__FILE__|__LINE__|__BITS__|__OUTPUT_FORMAT__|__DATE__|__TIME__|__DATE_NUM__|_TIME__NUM__|__UTC_DATE__|__UTC_TIME__|__UTC_DATE_NUM__|__UTC_TIME_NUM__|__POSIX_TIME__|__PASS__|ISTRUC|AT|IEND|BITS 16|BITS 32|BITS 64|USE16|USE32|__SECT__|ABSOLUTE|EXTERN|GLOBAL|COMMON|CPU|FLOAT)\\b ?([_a-zA-Z][_a-zA-Z0-9]*)?",
"captures": {
Expand Down
8 changes: 8 additions & 0 deletions Assembly x86.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@
<key>name</key>
<string>support.function.directive.assembly</string>
</dict>
<dict>
<key>begin</key>
<string>^%comment</string>
<key>end</key>
<string>^%endcomment</string>
<key>name</key>
<string>comment.assembly</string>
</dict>
<dict>
<key>captures</key>
<dict>
Expand Down
1 change: 1 addition & 0 deletions code/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def rescan(self):
scanRequests.add(fName)
sublime.active_window().open_file(fName)
else:
newView.set_syntax_file("Packages/NASM x86 Assembly/Assembly x86.tmLanguage")
context = Context(newView)
context.rescan()
self.includes.add(fName)
Expand Down

0 comments on commit 2db8982

Please sign in to comment.