From 34850ac2b189b992687292945bf8f8ef25bf94d1 Mon Sep 17 00:00:00 2001 From: Yvan Lussaud Date: Thu, 22 Feb 2024 11:23:37 +0100 Subject: [PATCH] Added enum literal coloration to AQL expressions. --- .../grammar/acceleo.tmLanguage.json | 40 +++++++++++++++++++ .../themes/Acceleo-Theme-Eclipse-Light.css | 1 + 2 files changed, 41 insertions(+) diff --git a/plugins/org.eclipse.acceleo.aql.tm/grammar/acceleo.tmLanguage.json b/plugins/org.eclipse.acceleo.aql.tm/grammar/acceleo.tmLanguage.json index f597dbf5f..4b4ca8f63 100644 --- a/plugins/org.eclipse.acceleo.aql.tm/grammar/acceleo.tmLanguage.json +++ b/plugins/org.eclipse.acceleo.aql.tm/grammar/acceleo.tmLanguage.json @@ -288,6 +288,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -453,6 +456,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -497,6 +503,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -557,6 +566,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -581,6 +593,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -667,6 +682,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -691,6 +709,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -731,6 +752,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -773,6 +797,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -842,6 +869,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -891,6 +921,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -948,6 +981,9 @@ { "include": "#expression-real" }, + { + "include": "#expression-enum" + }, { "include": "#expression-type" } @@ -965,6 +1001,10 @@ "name": "meta.expression.aql.real.acceleo", "match": "[0-9]+(\\.[0-9]+)*" }, + "expression-real": { + "name": "meta.expression.aql.enum.acceleo", + "match": "\\w+(::\\w+)(::\\w+)" + }, "expression-type": { "name": "meta.expression.aql.type.acceleo", "match": "((Sequence|OrderedSet)\\((String|Integer|Real|Boolean|(\\w+(::\\w+))|(\\{(\\w+(::\\w+))(,\\s*(\\w+(::\\w+)))*\\}))\\))|String|Integer|Real|Boolean|(\\w+(::\\w+))|(\\{(\\w+(::\\w+))(,\\s*(\\w+(::\\w+)))*\\})" diff --git a/plugins/org.eclipse.acceleo.aql.tm/themes/Acceleo-Theme-Eclipse-Light.css b/plugins/org.eclipse.acceleo.aql.tm/themes/Acceleo-Theme-Eclipse-Light.css index 2809bcdc0..dd7f48382 100644 --- a/plugins/org.eclipse.acceleo.aql.tm/themes/Acceleo-Theme-Eclipse-Light.css +++ b/plugins/org.eclipse.acceleo.aql.tm/themes/Acceleo-Theme-Eclipse-Light.css @@ -26,6 +26,7 @@ .meta.expression.aql.keyword { color: #7F0055; } .meta.expression.aql.string { color: #2A00FF; } .meta.expression.aql.real { color: #2A00FF; } +.meta.expression.aql.enum { color: #2A00FF; } .meta.expression.aql.type { font-style: italic; color: #6b6b6b; } .meta.documentation.tag.value { font-style: italic; color: #3F7F5F; }