aboutsummaryrefslogtreecommitdiffstats
path: root/atk16-syntax-highlighting
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2023-04-11 14:41:59 +0300
committerJan Tuomi <jans.tuomi@gmail.com>2023-04-11 14:41:59 +0300
commite240ef3e9a2854cfe390b47fb0b3d519c095193b (patch)
tree7c479f3f2785f950a70a8f82080d08aa3264b7c5 /atk16-syntax-highlighting
parentdd3c90011ab33717e4c4175cd6804ae86582135f (diff)
Add syntax highlighting package
Diffstat (limited to 'atk16-syntax-highlighting')
-rw-r--r--atk16-syntax-highlighting/README.md9
-rw-r--r--atk16-syntax-highlighting/atk16-syntax-highlighting-0.0.1.vsixbin0 -> 2321 bytes
-rw-r--r--atk16-syntax-highlighting/language-configuration.json41
-rw-r--r--atk16-syntax-highlighting/package.json28
-rw-r--r--atk16-syntax-highlighting/syntaxes/atk16.tmLanguage.json48
5 files changed, 126 insertions, 0 deletions
diff --git a/atk16-syntax-highlighting/README.md b/atk16-syntax-highlighting/README.md
new file mode 100644
index 0000000..da81144
--- /dev/null
+++ b/atk16-syntax-highlighting/README.md
@@ -0,0 +1,9 @@
+# VSCode syntax highlighting extension for ATK16 assembly
+
+## Installation
+
+In `atk16-syntax-highlighting` directory, run:
+
+ npx @vscode/vsce package
+
+Then go to VSCode > Command Palette > Extensions: Install from VSIX and select the generated `.vsix` file.
diff --git a/atk16-syntax-highlighting/atk16-syntax-highlighting-0.0.1.vsix b/atk16-syntax-highlighting/atk16-syntax-highlighting-0.0.1.vsix
new file mode 100644
index 0000000..5d4a42d
--- /dev/null
+++ b/atk16-syntax-highlighting/atk16-syntax-highlighting-0.0.1.vsix
Binary files differ
diff --git a/atk16-syntax-highlighting/language-configuration.json b/atk16-syntax-highlighting/language-configuration.json
new file mode 100644
index 0000000..c186b1b
--- /dev/null
+++ b/atk16-syntax-highlighting/language-configuration.json
@@ -0,0 +1,41 @@
+{
+ "comments": {
+ "lineComment": ";"
+ },
+ "brackets": [
+ [
+ "{",
+ "}"
+ ],
+ [
+ "[",
+ "]"
+ ],
+ [
+ "(",
+ ")"
+ ]
+ ],
+ "autoClosingPairs": [
+ [
+ "{",
+ "}"
+ ],
+ [
+ "[",
+ "]"
+ ],
+ [
+ "(",
+ ")"
+ ],
+ [
+ "\"",
+ "\""
+ ],
+ [
+ "'",
+ "'"
+ ]
+ ]
+} \ No newline at end of file
diff --git a/atk16-syntax-highlighting/package.json b/atk16-syntax-highlighting/package.json
new file mode 100644
index 0000000..ff6be2b
--- /dev/null
+++ b/atk16-syntax-highlighting/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "atk16-syntax-highlighting",
+ "displayName": "ATK16 Syntax Highlighting",
+ "description": "Syntax highlighting for ATK16 assembly language",
+ "version": "0.0.1",
+ "publisher": "Jan Tuomi",
+ "engines": {
+ "vscode": "^1.60.0"
+ },
+ "categories": ["Programming Languages"],
+ "contributes": {
+ "languages": [
+ {
+ "id": "atk16",
+ "aliases": ["ATK16 Assembly", "atk16"],
+ "extensions": [".atk16"],
+ "configuration": "./language-configuration.json"
+ }
+ ],
+ "grammars": [
+ {
+ "language": "atk16",
+ "scopeName": "source.atk16",
+ "path": "./syntaxes/atk16.tmLanguage.json"
+ }
+ ]
+ }
+}
diff --git a/atk16-syntax-highlighting/syntaxes/atk16.tmLanguage.json b/atk16-syntax-highlighting/syntaxes/atk16.tmLanguage.json
new file mode 100644
index 0000000..6028be3
--- /dev/null
+++ b/atk16-syntax-highlighting/syntaxes/atk16.tmLanguage.json
@@ -0,0 +1,48 @@
+{
+ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
+ "name": "ATK16",
+ "patterns": [
+ {
+ "name": "comment.line.semicolon.atk16",
+ "match": ";.*"
+ },
+ {
+ "name": "keyword.control.directive.atk16",
+ "match": "@\\w+"
+ },
+ {
+ "name": "variable.other.register.atk16",
+ "match": "R\\w+"
+ },
+ {
+ "name": "constant.numeric.hex.atk16",
+ "match": "0x[0-9a-fA-F]+"
+ },
+ {
+ "name": "constant.numeric.binary.atk16",
+ "match": "0b[01]+"
+ },
+ {
+ "name": "constant.numeric.decimal.atk16",
+ "match": "[0-9]+"
+ },
+ {
+ "name": "entity.name.function.atk16",
+ "match": "\\w+(?=\\s*\\()"
+ },
+ {
+ "name": "entity.name.label.atk16",
+ "match": "\\w+(?=\\s*:)"
+ },
+ {
+ "name": "keyword.control.instruction.atk16",
+ "match": "^\\s+[a-zA-Z]+"
+ },
+ {
+ "name": "constant.language.flag.atk16",
+ "match": "\\b(carry|overflow|zero|sign)\\b"
+ }
+ ],
+ "repository": {},
+ "scopeName": "source.atk16"
+}