diff options
author | 2021-10-11 01:42:22 +0200 | |
---|---|---|
committer | 2021-10-31 19:26:10 +0100 | |
commit | e1d6802843960e911f19c7e9c4a4b626ae854b90 (patch) | |
tree | e62d4d3fa0bc4f3ce1582eb2edb35b2d0d030994 /language-web/src/main/js/editor/problemLanguageSupport.ts | |
parent | fix(web): a11y issue reported by Lighthouse (diff) | |
download | refinery-e1d6802843960e911f19c7e9c4a4b626ae854b90.tar.gz refinery-e1d6802843960e911f19c7e9c4a4b626ae854b90.tar.zst refinery-e1d6802843960e911f19c7e9c4a4b626ae854b90.zip |
feat(web): simplify contextual parsing
* More relaxted parsing in the browser for stable variable/node
identifier classification.
* String support in the browser.
* contains, refers, and opposite keywords are no longer contextual,
which simplifies parsing in the browser.
Diffstat (limited to 'language-web/src/main/js/editor/problemLanguageSupport.ts')
-rw-r--r-- | language-web/src/main/js/editor/problemLanguageSupport.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/language-web/src/main/js/editor/problemLanguageSupport.ts b/language-web/src/main/js/editor/problemLanguageSupport.ts index 2bf7c7a4..c9e61b31 100644 --- a/language-web/src/main/js/editor/problemLanguageSupport.ts +++ b/language-web/src/main/js/editor/problemLanguageSupport.ts | |||
@@ -26,7 +26,7 @@ const parserWithMetadata = (parser as LRParser).configure({ | |||
26 | LineComment: t.lineComment, | 26 | LineComment: t.lineComment, |
27 | BlockComment: t.blockComment, | 27 | BlockComment: t.blockComment, |
28 | 'problem class enum pred unique scope': t.definitionKeyword, | 28 | 'problem class enum pred unique scope': t.definitionKeyword, |
29 | 'abstract refers contains opposite error default': t.modifier, | 29 | 'abstract extends refers contains opposite error default': t.modifier, |
30 | 'true false unknown error': t.keyword, | 30 | 'true false unknown error': t.keyword, |
31 | NotOp: t.keyword, | 31 | NotOp: t.keyword, |
32 | UnknownOp: t.keyword, | 32 | UnknownOp: t.keyword, |
@@ -34,6 +34,7 @@ const parserWithMetadata = (parser as LRParser).configure({ | |||
34 | StarArgument: t.keyword, | 34 | StarArgument: t.keyword, |
35 | 'IntMult StarMult Real': t.number, | 35 | 'IntMult StarMult Real': t.number, |
36 | StarMult: t.number, | 36 | StarMult: t.number, |
37 | String: t.string, | ||
37 | 'RelationName/QualifiedName': t.typeName, | 38 | 'RelationName/QualifiedName': t.typeName, |
38 | 'UniqueNodeName/QualifiedName': t.atom, | 39 | 'UniqueNodeName/QualifiedName': t.atom, |
39 | 'VariableName/QualifiedName': t.variableName, | 40 | 'VariableName/QualifiedName': t.variableName, |