From 62ed01a1078f499c93c70025342dd869bd277d39 Mon Sep 17 00:00:00 2001 From: veetaha Date: Thu, 2 Apr 2020 05:38:52 +0300 Subject: vscode: add highlighting of syntax tree --- editors/code/ra_syntax_tree.tmGrammar.json | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 editors/code/ra_syntax_tree.tmGrammar.json (limited to 'editors/code/ra_syntax_tree.tmGrammar.json') diff --git a/editors/code/ra_syntax_tree.tmGrammar.json b/editors/code/ra_syntax_tree.tmGrammar.json new file mode 100644 index 000000000..0d72a3e36 --- /dev/null +++ b/editors/code/ra_syntax_tree.tmGrammar.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + + "scopeName": "source.ra_syntax_tree", + "patterns": [ + { "include": "#node_type" }, + { "include": "#node_range_index" }, + { "include": "#token_text" } + ], + "repository": { + "node_type": { + "match": "^\\s*([A-Z_]+?)@", + "captures": { + "1": { + "name": "entity.name.class" + } + } + }, + "node_range_index": { + "match": "\\d+", + "name": "constant.numeric" + }, + "token_text": { + "match": "\".+\"", + "name": "string" + } + }, + "fileTypes": [ + "rast" + ] +} -- cgit v1.2.3