diff --git a/package.json b/package.json index 082e184..76d4d6b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "argon-v3", "displayName": "The Argon Programming Language", "description": "Syntax highlighting and other features for the Argon programming language.", - "version": "2.0.5", + "version": "2.0.6", "publisher": "Open-Argon", "engines": { "vscode": "^1.60.0" diff --git a/syntaxes/argon.tmLanguage.json b/syntaxes/argon.tmLanguage.json index 9fd5ac5..dcabdd6 100644 --- a/syntaxes/argon.tmLanguage.json +++ b/syntaxes/argon.tmLanguage.json @@ -5,6 +5,9 @@ { "include": "#keywords" }, + { + "include": "#templates" + }, { "include": "#strings" }, @@ -19,6 +22,51 @@ } ], "repository": { + "templates": { + "patterns": [ + { + "name": "string.template.argon", + "begin": "`", + "beginCaptures": { + "0": { "name": "punctuation.definition.string.begin.argon" } + }, + "end": "`", + "endCaptures": { + "0": { "name": "punctuation.definition.string.end.argon" } + }, + "patterns": [ + { + "include": "#interpolation" + } + ] + } + ] + }, + "interpolation": { + "patterns": [ + { + "name": "meta.interpolation.argon", + "begin": "\\$\\(", + "beginCaptures": { + "0": { + "name": "keyword.operator.argon" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "keyword.operator.argon" + } + }, + "patterns": [ + { "include": "#keywords" }, + { "include": "#numbers" }, + { "include": "#strings" }, + { "include": "#variables" } + ] + } + ] + }, "keywords": { "patterns": [ { diff --git a/test.ar b/test.ar index ea7923c..03ce28b 100644 --- a/test.ar +++ b/test.ar @@ -1,3 +1,5 @@ forever do term.log("hello world") - time.snooze(2) \ No newline at end of file + time.snooze(2) + +`hello $(world)` \ No newline at end of file