diff options
Diffstat (limited to 'pu1/pasm-syntax')
| -rw-r--r-- | pu1/pasm-syntax/package.json | 26 | ||||
| -rw-r--r-- | pu1/pasm-syntax/pasm-syntax-0.0.1.vsix | bin | 0 -> 2163 bytes | |||
| -rw-r--r-- | pu1/pasm-syntax/syntaxes/pasm.tmLanguage.json | 145 |
3 files changed, 171 insertions, 0 deletions
diff --git a/pu1/pasm-syntax/package.json b/pu1/pasm-syntax/package.json new file mode 100644 index 0000000..d287cc2 --- /dev/null +++ b/pu1/pasm-syntax/package.json @@ -0,0 +1,26 @@ +{ + "name": "pasm-syntax", + "displayName": "PASM Syntax", + "description": "Syntax highlighting for PASM custom assembly", + "version": "0.0.1", + "engines": { + "vscode": "^1.50.0" + }, + "categories": ["Programming Languages"], + "contributes": { + "languages": [ + { + "id": "pasm", + "aliases": ["PASM", "pasm"], + "extensions": [".pasm"] + } + ], + "grammars": [ + { + "language": "pasm", + "scopeName": "source.pasm", + "path": "./syntaxes/pasm.tmLanguage.json" + } + ] + } +} diff --git a/pu1/pasm-syntax/pasm-syntax-0.0.1.vsix b/pu1/pasm-syntax/pasm-syntax-0.0.1.vsix Binary files differnew file mode 100644 index 0000000..e94bb8b --- /dev/null +++ b/pu1/pasm-syntax/pasm-syntax-0.0.1.vsix 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 |
