Skip to content

Commit

Permalink
problem fixed + new scopes
Browse files Browse the repository at this point in the history
highlighting problem with subroutines fixed.
new scopes for jump labels added
  • Loading branch information
runxel committed Mar 28, 2015
1 parent 08099a6 commit d63e4f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 6 additions & 2 deletions Syntaxes/GDL.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ patterns:
name: string.gdl

# Subroutines like 100:
- match: (?i)(\b[0-9]*:)(?=$|\s)
- match: (?i)(?<=^)([0-9]*:)(?=$|\s)
name: entity.name.function.gdl

# get GOTOs and GOSUBs
- match: (?i)(?<=GOSUB|GOTO)(\s+)([0-9]*)(?=$|\s|\+|\-|\*{1,2}|\^|\/)
name: entity.name.function.gdl.jump

- match: (?i)(\+|\-|\^|\*{1,2}|\/|\=|<|>|<\=|>\=|<>|\#)|(?<=^|\s)(MOD|%|AND|&|OR|\||EXOR|\@)(?=$|\s|\()
name: keyword.operator.gdl

Expand Down Expand Up @@ -177,7 +181,7 @@ patterns:
- match: (?i)(?<=")((BLUE|RED|GREEN)_OF_(PEN|MATERIAL)|GDL_VERSION|MODEL_SIZE|PEN_OF_RGB|PROGRAM|SERIAL_NUMBER|ANCESTRY_INFO|(ANGULAR_(LENGTH_)?|AREA_|RADIAL_|SILL_HEIGHT_)DIMENSION|(ASSOCEL|MATCHING)_PROPERTIES|ASSOCLP_(NAME|PARVALUE)|CALC_(ANGLE|AREA|LENGTH|VOLUME)_UNIT|CLEAN_INTERSECTIONS|CONSTR_FILLS_DISPLAY|CUSTOM_AUTO_LABEL|DATETIME|DOOR_SHOW_DIM|(ELEVATION|LEVEL|LINEAR)_DIMENSION|FONTNAMES_LIST|HEIGHT_OF_STYLE|HOME(_STORY|DB_INFO)|ID_OF_MAIN|INTERNAL_ID|NAME_OF_(FILL|LINE_TYPE|LISTED|MACRO|MAIN|MATERIAL|PLAN|PROGRAM|STYLE)|REFERENCE_DATA_LEVEL|RGB_OF_(MATERIAL|PEN)|STORY(_INFO)?|(STYLE|TEXTBLOCK)_INFO|WINDOW_(DOOR_(DIMENSION|SHOW_DIM|ZONE_RELEV)|SHOW_DIM)|WORKING_(ANGLE|LENGTH)_UNIT|ZONE_(CATEGORY|COLUS_AREA|RELATIONS)|MATERIAL_INFO)(?="|\s)
name: keyword.gdl.globals.request

- match: (?i)(?<=^|\s)([ABCDEFG]|ZZYZX|ac_\w+|ROOM_([a-z]|_)+)(?=$|\s|=)
- match: (?i)(?<=^|\s|\+|\-|\^|\*|\*\*|\/|\=|<|>|<\=|>\=|<>|\#|=|%|&|\||\@)([ABCDEFG]|ZZYZX|ac_\w+|ROOM_([a-z]|_)+)(?=$|\s|\+|\-|\^|\*|\*\*|\/|\=|<|>|<\=|>\=|<>|\#|=|%|&|\||\@)
name: keyword.gdl.optionalparameters

- match: (?i)(\b)(PUT|GET|USE|NSP)(\b)
Expand Down
10 changes: 8 additions & 2 deletions Syntaxes/GDL.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@
</dict>
<dict>
<key>match</key>
<string>(?i)(\b[0-9]*:)(?=$|\s)</string>
<string>(?i)(?&lt;=^)([0-9]*:)(?=$|\s)</string>
<key>name</key>
<string>entity.name.function.gdl</string>
</dict>
<dict>
<key>match</key>
<string>(?i)(?&lt;=GOSUB|GOTO)(\s+)([0-9]*)(?=$|\s|\+|\-|\*{1,2}|\^|\/)</string>
<key>name</key>
<string>entity.name.function.gdl.jump</string>
</dict>
<dict>
<key>match</key>
<string>(?i)(\+|\-|\^|\*{1,2}|\/|\=|&lt;|&gt;|&lt;\=|&gt;\=|&lt;&gt;|\#)|(?&lt;=^|\s)(MOD|%|AND|&amp;|OR|\||EXOR|\@)(?=$|\s|\()</string>
Expand Down Expand Up @@ -347,7 +353,7 @@
</dict>
<dict>
<key>match</key>
<string>(?i)(?&lt;=^|\s)([ABCDEFG]|ZZYZX|ac_\w+|ROOM_([a-z]|_)+)(?=$|\s|=)</string>
<string>(?i)(?&lt;=^|\s|\+|\-|\^|\*|\*\*|\/|\=|&lt;|&gt;|&lt;\=|&gt;\=|&lt;&gt;|\#|=|%|&amp;|\||\@)([ABCDEFG]|ZZYZX|ac_\w+|ROOM_([a-z]|_)+)(?=$|\s|\+|\-|\^|\*|\*\*|\/|\=|&lt;|&gt;|&lt;\=|&gt;\=|&lt;&gt;|\#|=|%|&amp;|\||\@)</string>
<key>name</key>
<string>keyword.gdl.optionalparameters</string>
</dict>
Expand Down

0 comments on commit d63e4f0

Please sign in to comment.