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.ts21
1 files changed, 8 insertions, 13 deletions
diff --git a/subprojects/frontend/src/language/problemLanguageSupport.ts b/subprojects/frontend/src/language/problemLanguageSupport.ts
index 03a7c4cc..a96b5402 100644
--- a/subprojects/frontend/src/language/problemLanguageSupport.ts
+++ b/subprojects/frontend/src/language/problemLanguageSupport.ts
@@ -8,12 +8,7 @@ import {
8} from '@codemirror/language'; 8} from '@codemirror/language';
9import { styleTags, tags as t } from '@lezer/highlight'; 9import { styleTags, tags as t } from '@lezer/highlight';
10 10
11import { 11import { foldBlockComment, foldConjunction, foldDeclaration } from './folding';
12 foldBlockComment,
13 foldConjunction,
14 foldDeclaration,
15 foldWholeNode,
16} from './folding';
17import { 12import {
18 indentBlockComment, 13 indentBlockComment,
19 indentDeclaration, 14 indentDeclaration,
@@ -26,12 +21,12 @@ const parserWithMetadata = parser.configure({
26 styleTags({ 21 styleTags({
27 LineComment: t.lineComment, 22 LineComment: t.lineComment,
28 BlockComment: t.blockComment, 23 BlockComment: t.blockComment,
29 'problem class enum pred rule indiv scope': t.definitionKeyword, 24 'problem class enum pred indiv scope': t.definitionKeyword,
30 'abstract extends refers contains container opposite': t.modifier, 25 'abstract extends refers contains container opposite': t.modifier,
31 'default error contained containment': t.modifier, 26 'default error contained containment': t.modifier,
32 'true false unknown error': t.operatorKeyword, 27 'true false unknown error': t.operatorKeyword,
33 'may must current count': t.operatorKeyword, 28 'may must current count': t.operatorKeyword,
34 'new delete': t.keyword, 29 // 'new delete': t.keyword,
35 NotOp: t.operator, 30 NotOp: t.operator,
36 UnknownOp: t.operator, 31 UnknownOp: t.operator,
37 OrOp: t.separator, 32 OrOp: t.separator,
@@ -40,7 +35,7 @@ const parserWithMetadata = parser.configure({
40 StarMult: t.number, 35 StarMult: t.number,
41 String: t.string, 36 String: t.string,
42 'RelationName/QualifiedName': t.typeName, 37 'RelationName/QualifiedName': t.typeName,
43 'RuleName/QualifiedName': t.typeName, 38 // 'RuleName/QualifiedName': t.typeName,
44 'IndividualNodeName/QualifiedName': t.atom, 39 'IndividualNodeName/QualifiedName': t.atom,
45 'VariableName/QualifiedName': t.variableName, 40 'VariableName/QualifiedName': t.variableName,
46 '{ }': t.brace, 41 '{ }': t.brace,
@@ -54,7 +49,7 @@ const parserWithMetadata = parser.configure({
54 UniqueDeclaration: indentDeclaration, 49 UniqueDeclaration: indentDeclaration,
55 ScopeDeclaration: indentDeclaration, 50 ScopeDeclaration: indentDeclaration,
56 PredicateBody: indentPredicateOrRule, 51 PredicateBody: indentPredicateOrRule,
57 RuleBody: indentPredicateOrRule, 52 // RuleBody: indentPredicateOrRule,
58 BlockComment: indentBlockComment, 53 BlockComment: indentBlockComment,
59 }), 54 }),
60 foldNodeProp.add({ 55 foldNodeProp.add({
@@ -62,9 +57,9 @@ const parserWithMetadata = parser.configure({
62 EnumBody: foldInside, 57 EnumBody: foldInside,
63 ParameterList: foldInside, 58 ParameterList: foldInside,
64 PredicateBody: foldInside, 59 PredicateBody: foldInside,
65 RuleBody: foldInside, 60 // RuleBody: foldInside,
66 Conjunction: foldConjunction, 61 Conjunction: foldConjunction,
67 Consequent: foldWholeNode, 62 // Consequent: foldWholeNode,
68 UniqueDeclaration: foldDeclaration, 63 UniqueDeclaration: foldDeclaration,
69 ScopeDeclaration: foldDeclaration, 64 ScopeDeclaration: foldDeclaration,
70 BlockComment: foldBlockComment, 65 BlockComment: foldBlockComment,
@@ -82,7 +77,7 @@ const problemLanguage = LRLanguage.define({
82 }, 77 },
83 line: '%', 78 line: '%',
84 }, 79 },
85 indentOnInput: /^\s*(?:\{|\}|\(|\)|;|\.|==>)$/, 80 indentOnInput: /^\s*(?:\{|\}|\(|\)|;|\.)$/,
86 }, 81 },
87}); 82});
88 83