diff --git a/CHANGELOG.md b/CHANGELOG.md index 50b25b0..485b890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## 1.0.3 +- Fixed not handling enums and flags correctly + ## 1.0.2 - Fixed not higlighting record extensions correctly diff --git a/package.json b/package.json index 0e0150a..8bec5ea 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "djinni-syntax-highlighting", "displayName": "Djinni Syntax Highlighting", "description": "Syntax highlighting for djinni interface files", - "version": "1.0.2", + "version": "1.0.3", "publisher": "patrikminder", "author": { "name": "Patrik Minder" diff --git a/syntaxes/djinni.tmLanguage.json b/syntaxes/djinni.tmLanguage.json index 08c103e..74626af 100644 --- a/syntaxes/djinni.tmLanguage.json +++ b/syntaxes/djinni.tmLanguage.json @@ -74,12 +74,19 @@ "end": "}", "patterns": [ { - "begin": "(\\w+)(;)", + "begin": "(\\w+)", "beginCaptures": { - "1": { "name": "variable.name" }, - "2": { "name": "keyword.operator.djinni" } + "1": { "name": "variable.name" } }, - "end": "" + "end": "(;)", + "endCaptures": { + "1": { "name": "keyword.operator.djinni" } + }, + "patterns": [ + { + "include": "#comment" + } + ] }, { "include": "#comment" @@ -104,13 +111,20 @@ }, "patterns": [ { - "begin": "(\\w+)(\\s*(=)\\s*(none|all))?(;)", + "begin": "(\\w+)(\\s*(=)\\s*(none|all))?", "beginCaptures": { "1": { "name": "variable.name" }, - "3": { "name": "keyword.operator.djinni" }, - "4": { "name": "keyword.control.djinni" } + "3": { "name": "keyword.operator.djinni" } + }, + "end": "(;)", + "endCaptures": { + "1": { "name": "keyword.control.djinni" } }, - "end": "" + "patterns": [ + { + "include": "#comment" + } + ] }, { "include": "#comment" @@ -304,7 +318,7 @@ ] }, "numbers": { - "name": "", + "name": "constant.numeric.djinni", "patterns": [ { "match": "\\d+",