diff --git a/Syntaxes/GDL.YAML-tmLanguage b/Syntaxes/GDL.YAML-tmLanguage index db35868..dcc664f 100644 --- a/Syntaxes/GDL.YAML-tmLanguage +++ b/Syntaxes/GDL.YAML-tmLanguage @@ -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 @@ -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) diff --git a/Syntaxes/GDL.tmLanguage b/Syntaxes/GDL.tmLanguage index 02c70a7..c726e24 100644 --- a/Syntaxes/GDL.tmLanguage +++ b/Syntaxes/GDL.tmLanguage @@ -33,10 +33,16 @@ match - (?i)(\b[0-9]*:)(?=$|\s) + (?i)(?<=^)([0-9]*:)(?=$|\s) name entity.name.function.gdl + + 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|\() @@ -347,7 +353,7 @@ match - (?i)(?<=^|\s)([ABCDEFG]|ZZYZX|ac_\w+|ROOM_([a-z]|_)+)(?=$|\s|=) + (?i)(?<=^|\s|\+|\-|\^|\*|\*\*|\/|\=|<|>|<\=|>\=|<>|\#|=|%|&|\||\@)([ABCDEFG]|ZZYZX|ac_\w+|ROOM_([a-z]|_)+)(?=$|\s|\+|\-|\^|\*|\*\*|\/|\=|<|>|<\=|>\=|<>|\#|=|%|&|\||\@) name keyword.gdl.optionalparameters