aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/language/problemLanguageSupport.ts
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src/language/problemLanguageSupport.ts')
-rw-r--r--subprojects/frontend/src/language/problemLanguageSupport.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/subprojects/frontend/src/language/problemLanguageSupport.ts b/subprojects/frontend/src/language/problemLanguageSupport.ts
index a96b5402..cde8b157 100644
--- a/subprojects/frontend/src/language/problemLanguageSupport.ts
+++ b/subprojects/frontend/src/language/problemLanguageSupport.ts
@@ -21,11 +21,12 @@ const parserWithMetadata = parser.configure({
21 styleTags({ 21 styleTags({
22 LineComment: t.lineComment, 22 LineComment: t.lineComment,
23 BlockComment: t.blockComment, 23 BlockComment: t.blockComment,
24 'problem class enum pred indiv scope': t.definitionKeyword, 24 'problem class enum pred individual scope': t.definitionKeyword,
25 'abstract extends refers contains container opposite': t.modifier, 25 'abstract extends refers contains container opposite': t.modifier,
26 'default error contained containment': t.modifier, 26 'default error contained containment': t.modifier,
27 'true false unknown error': t.operatorKeyword, 27 'true false unknown error': t.operatorKeyword,
28 'may must current count': t.operatorKeyword, 28 'may must current': t.operatorKeyword,
29 'sum prod min max': t.operatorKeyword,
29 // 'new delete': t.keyword, 30 // 'new delete': t.keyword,
30 NotOp: t.operator, 31 NotOp: t.operator,
31 UnknownOp: t.operator, 32 UnknownOp: t.operator,
@@ -42,13 +43,14 @@ const parserWithMetadata = parser.configure({
42 '( )': t.paren, 43 '( )': t.paren,
43 '[ ]': t.squareBracket, 44 '[ ]': t.squareBracket,
44 '. .. , :': t.separator, 45 '. .. , :': t.separator,
45 '<-> ==>': t.definitionOperator, 46 '<-> = -> ==>': t.definitionOperator,
46 }), 47 }),
47 indentNodeProp.add({ 48 indentNodeProp.add({
48 ProblemDeclaration: indentDeclaration, 49 ProblemDeclaration: indentDeclaration,
49 UniqueDeclaration: indentDeclaration, 50 UniqueDeclaration: indentDeclaration,
50 ScopeDeclaration: indentDeclaration, 51 ScopeDeclaration: indentDeclaration,
51 PredicateBody: indentPredicateOrRule, 52 PredicateBody: indentPredicateOrRule,
53 FunctionBody: indentPredicateOrRule,
52 // RuleBody: indentPredicateOrRule, 54 // RuleBody: indentPredicateOrRule,
53 BlockComment: indentBlockComment, 55 BlockComment: indentBlockComment,
54 }), 56 }),
@@ -57,6 +59,7 @@ const parserWithMetadata = parser.configure({
57 EnumBody: foldInside, 59 EnumBody: foldInside,
58 ParameterList: foldInside, 60 ParameterList: foldInside,
59 PredicateBody: foldInside, 61 PredicateBody: foldInside,
62 FunctionBody: foldInside,
60 // RuleBody: foldInside, 63 // RuleBody: foldInside,
61 Conjunction: foldConjunction, 64 Conjunction: foldConjunction,
62 // Consequent: foldWholeNode, 65 // Consequent: foldWholeNode,
@@ -77,7 +80,7 @@ const problemLanguage = LRLanguage.define({
77 }, 80 },
78 line: '%', 81 line: '%',
79 }, 82 },
80 indentOnInput: /^\s*(?:\{|\}|\(|\)|;|\.)$/, 83 indentOnInput: /^\s*(?:\{|\}|\(|\)|->|;|\.)$/,
81 }, 84 },
82}); 85});
83 86