From 753bb81125e7455e64e78b1215c2462f2f667e5d Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 31 Mar 2013 21:28:48 -0400 Subject: [PATCH] mpw improvements --- Preferences/Comments.tmPreferences | 2 +- Preferences/MPW Folding.tmPreferences | 2 +- Syntaxes/MPW Asm IIgs.tmLanguage | 216 +++++++++++++++++++++++++- Syntaxes/ORCA:M.tmLanguage | 2 +- 4 files changed, 216 insertions(+), 6 deletions(-) diff --git a/Preferences/Comments.tmPreferences b/Preferences/Comments.tmPreferences index 5f780ff..c704722 100644 --- a/Preferences/Comments.tmPreferences +++ b/Preferences/Comments.tmPreferences @@ -14,7 +14,7 @@ name TM_COMMENT_START value - ; + ; name diff --git a/Preferences/MPW Folding.tmPreferences b/Preferences/MPW Folding.tmPreferences index 6de555a..7b9177c 100644 --- a/Preferences/MPW Folding.tmPreferences +++ b/Preferences/MPW Folding.tmPreferences @@ -9,7 +9,7 @@ settings foldingStartMarker - \b(?i:FUNC|INIT|PROC|RECORD|STACKDP|WITH|MACRO)\b + \b(?i:FUNC|INIT|PROC|PROCNAME|RECORD|STACKDP|WITH|MACRO)\b foldingStopMarker \b(?i:ENDF|ENDFUNC|ENDI|ENDP|ENDPROC|ENDR|ENDSTACK|ENDWITH|ENDM|ENDMACRO|MEND)\b diff --git a/Syntaxes/MPW Asm IIgs.tmLanguage b/Syntaxes/MPW Asm IIgs.tmLanguage index 032f11f..0bb0a5f 100644 --- a/Syntaxes/MPW Asm IIgs.tmLanguage +++ b/Syntaxes/MPW Asm IIgs.tmLanguage @@ -48,6 +48,63 @@ name keyword.mnemonic.other + + captures + + 1 + + name + entity.name.function + + 2 + + name + keyword.directive + + + match + ^([A-Za-z@_~][A-Za-z0-9@_~%$#]*)\s+((?i)PROC|PROCNAME|FUNC|INIT|STACKDP)\b + name + meta.function + + + captures + + 1 + + name + keyword.directive + + 2 + + name + entity.name.function + + + match + \b((?i)ENTRY)\s+([A-Za-z@_~][A-Za-z0-9@_~%$#]*)\b + name + meta.entry + + + captures + + 1 + + name + entity.name.record + + 2 + + name + keyword.directive + + + match + ^([A-Za-z@_~][A-Za-z0-9@_~%$#]*)\s+((?i)RECORD)\b + name + meta.record + match ^[A-Za-z@_~][A-Za-z0-9@_~%$#]*\b @@ -143,16 +200,169 @@ + captures + + 1 + + name + keyword.directive + + 2 + + name + constant.language + + + comment + eg: LONGA ON match - \b(?i:ALIGN|BLANKS|CASE|CODE|CODECHK|DATACHK|DIRECT|DUMP|EJECT|END|ENDF|ENDFUNC|ENDI|ENDP|ENDPROC|END_PROC|ENDR|ENDSTACK|ENDWITH|ENTRY|EQU|EXPORT|FUNC|IMPORT|INCLUDE|INIT|LOAD|LONGA|LONGI|MACHINE|MSB|ORG|PAGESIZE|PRINT|PROC|RECORD|SEG|SEGATTR|SET|SPACE|STACKDP|STRING|TITLE|WITH)\b + \b((?i)CODECHK|DATACHK|LONGA|LONGI|MSB)\s+((?i)ON|OFF)\b + name + meta.onoff.directive + + + captures + + 1 + + name + keyword.directive + + 2 + + name + constant.language + + + match + \b((?i)STRING)\s+((?i)ASIS|PASCAL|C|GS/OS)\b + name + meta.string.directive + + + captures + + 1 + + name + keyword.directive + + 2 + + name + constant.language + + + match + \b((?i)BLANKS)\s+((?i)ON|OFF|YES|NO|Y|N)\b + name + meta.blanks.directive + + + captures + + 1 + + name + keyword.directive + + 2 + + name + constant.language + + + match + \b((?i)BLANKS)\s+((?i)ON|OFF|YES|NO|Y|N|OBJECT|OBJ)\b + name + meta.case.directive + + + captures + + 1 + + name + keyword.directive + + 2 + + name + constant.language + + + match + \b((?i)MACHINE)\s+((?i)M65816|M6502|M65C02|M65CX02|M740)\b + name + meta.machine.directive + + + begin + \b((?i)PRINT)\b + beginCaptures + + 1 + + name + keyword.directive + + + end + $ + name + meta.print.directive + patterns + + + match + ;.* + name + comment.line + + + match + \b(?i:ON|OFF|PUSH|POP)\b + name + constant.language + + + match + \b(?i:NO)?(?i:GEN|PAGE|WARN|MCALL|OBJ|DATA|MDIR|HDR|LITS|STAT|SYM)\b + name + constant.language + + + match + [^,\t ] + name + invalid.illegal.operand + + + + + match + \b(?i:ALIGN|BLANKS|CASE|CODE|CODECHK|DATACHK|DIRECT|DUMP|EJECT|END|ENDF|ENDFUNC|ENDI|ENDP|ENDPROC|END_PROC|ENDR|ENDSTACK|ENDS|ENDWITH|ENTRY|EQU|EXPORT|FUNC|IMPORT|INCLUDE|INIT|LOAD|LONGA|LONGI|MACHINE|MSB|ORG|PAGESIZE|PRINT|PROC|RECORD|SEG|SEGATTR|SET|SPACE|STACKDP|STRING|TITLE|WITH)\b name keyword.directive + captures + + 1 + + name + keyword.directive.data + + 3 + + name + storage.type + + match - \b(?i:(DC|DCB|DS))([.].)?\b + \b((?i)DC|DCB|DS)([.](.))?\b name - keyword.directive.data + meta.dc.directive match diff --git a/Syntaxes/ORCA:M.tmLanguage b/Syntaxes/ORCA:M.tmLanguage index 72161dd..693b299 100644 --- a/Syntaxes/ORCA:M.tmLanguage +++ b/Syntaxes/ORCA:M.tmLanguage @@ -93,7 +93,7 @@ comment eg: LONGA ON match - \b((?i)ABSADDR|CASE|CODECHK|DATACHECK|DYNCHK|ERR|EXPAND|IEEE|INSTIME|LIST|LONGA|LONGI|MSB|NUMSEX|OBJCASE|PRINTER|SYMBOL|65C02|65816)\s+((?i)ON|OFF) + \b((?i)ABSADDR|CASE|CODECHK|DATACHECK|DYNCHK|ERR|EXPAND|IEEE|INSTIME|LIST|LONGA|LONGI|MSB|NUMSEX|OBJCASE|PRINTER|SYMBOL|65C02|65816)\s+((?i)ON|OFF)\b name meta.onoff.directive