diff options
| author | 2025-08-11 11:34:18 +0330 | |
|---|---|---|
| committer | 2025-08-11 11:34:18 +0330 | |
| commit | 2fc20ad0b11e60ecfacc653024f2b582acad6e86 (patch) | |
| tree | d7e3f793f32928e40a18c56d00875a5b8e74dc62 /pu1/pasm-syntax/syntaxes | |
| parent | vscode theme extension (diff) | |
ir2 initial release!
Diffstat (limited to 'pu1/pasm-syntax/syntaxes')
| -rw-r--r-- | pu1/pasm-syntax/syntaxes/pasm.tmLanguage.json | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/pu1/pasm-syntax/syntaxes/pasm.tmLanguage.json b/pu1/pasm-syntax/syntaxes/pasm.tmLanguage.json new file mode 100644 index 0000000..e0df85e --- /dev/null +++ b/pu1/pasm-syntax/syntaxes/pasm.tmLanguage.json @@ -0,0 +1,145 @@ +{ + "name": "PASM", + "scopeName": "source.pasm", + "fileTypes": [ + "pasm" + ], + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#macro" + }, + { + "include": "#instruction" + }, + { + "include": "#register" + }, + { + "include": "#number" + } + ], + "repository": { + "comment": { + "patterns": [ + { + "name": "comment.line.number-sign.pasm", + "match": "#.*$" + } + ] + }, + "macro": { + "patterns": [ + { + "name": "meta.macro.pasm", + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.definition.macro.begin.pasm" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.definition.macro.end.pasm" + } + }, + "patterns": [ + { + "include": "#instruction" + }, + { + "include": "#register" + }, + { + "include": "#number" + }, + { + "include": "#comment" + } + ] + }, + { + "name": "keyword.other.macro.pasm", + "match": "@\\d+" + } + ] + }, + "instruction": { + "patterns": [ + { + "name": "meta.instruction.ar.pasm", + "captures": { + "1": { + "name": "keyword.instruction.prefix.ar.pasm" + }, + "2": { + "name": "string.quoted.double.pasm" + } + }, + "match": "\\b(ar)([1-8])\\b" + }, + { + "name": "meta.instruction.r.pasm", + "captures": { + "1": { + "name": "keyword.instruction.prefix.r.pasm" + }, + "2": { + "name": "constant.numeric.instruction-number.r.pasm" + }, + "3": { + "name": "keyword.instruction.suffix.a.pasm" + } + }, + "match": "\\b(r)([1-8])(a)\\b" + }, + { + "name": "keyword.instruction.simple.pasm", + "match": "\\b(hlt|con|mem|aca|add|sub|not|clr)\\b" + } + ] + }, + "register": { + "patterns": [ + { + "name": "meta.register.ar.pasm", + "captures": { + "1": { + "name": "variable.other.register.prefix.ar.pasm" + }, + "2": { + "name": "constant.numeric.register-number.ar.pasm" + } + }, + "match": "\\b(ar)([1-8])\\b" + }, + { + "name": "meta.register.r.pasm", + "captures": { + "1": { + "name": "variable.other.register.prefix.r.pasm" + }, + "2": { + "name": "constant.numeric.register-number.r.pasm" + }, + "3": { + "name": "variable.other.register.suffix.a.pasm" + } + }, + "match": "\\b(r)([1-8])(a)\\b" + } + ] + }, + "number": { + "patterns": [ + { + "name": "constant.numeric.decimal.pasm", + "match": "\\b\\d+\\b" + } + ] + } + } +}
\ No newline at end of file |
