diff options
author | 2024-01-31 17:10:28 +0100 | |
---|---|---|
committer | 2024-01-31 18:45:13 +0100 | |
commit | a2a92561f7b612b472b5b7e49a2d5ca86802092f (patch) | |
tree | b5124c3936cfaba4d046cfc3f4676af5b940d19c /subprojects/frontend/src/language | |
parent | refactor(language): module and node declarations (diff) | |
download | refinery-a2a92561f7b612b472b5b7e49a2d5ca86802092f.tar.gz refinery-a2a92561f7b612b472b5b7e49a2d5ca86802092f.tar.zst refinery-a2a92561f7b612b472b5b7e49a2d5ca86802092f.zip |
feat(language): validate module isolation
Diffstat (limited to 'subprojects/frontend/src/language')
-rw-r--r-- | subprojects/frontend/src/language/problem.grammar | 4 | ||||
-rw-r--r-- | subprojects/frontend/src/language/problemLanguageSupport.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/subprojects/frontend/src/language/problem.grammar b/subprojects/frontend/src/language/problem.grammar index b08a9c36..ac451e7a 100644 --- a/subprojects/frontend/src/language/problem.grammar +++ b/subprojects/frontend/src/language/problem.grammar | |||
@@ -57,10 +57,10 @@ statement { | |||
57 | // RuleBody { ":" sep<OrOp, Conjunction> "==>" sep<OrOp, Consequent> "." } | 57 | // RuleBody { ":" sep<OrOp, Conjunction> "==>" sep<OrOp, Consequent> "." } |
58 | //} | | 58 | //} | |
59 | AtomDeclaration { | 59 | AtomDeclaration { |
60 | ckw<"atom"> sep<",", AtomNodeName> "." | 60 | kw<"declare">? ckw<"atom"> sep<",", AtomNodeName> "." |
61 | } | | 61 | } | |
62 | NodeDeclaration { | 62 | NodeDeclaration { |
63 | (ckw<"node"> | ckw<"multi">) sep<",", NodeName> "." | 63 | (kw<"declare"> | kw<"declare">? ckw<"multi">) sep<",", NodeName> "." |
64 | } | | 64 | } | |
65 | ScopeDeclaration { | 65 | ScopeDeclaration { |
66 | kw<"scope"> sep<",", ScopeElement> "." | 66 | kw<"scope"> sep<",", ScopeElement> "." |
diff --git a/subprojects/frontend/src/language/problemLanguageSupport.ts b/subprojects/frontend/src/language/problemLanguageSupport.ts index 3847fdd8..2483c2e3 100644 --- a/subprojects/frontend/src/language/problemLanguageSupport.ts +++ b/subprojects/frontend/src/language/problemLanguageSupport.ts | |||
@@ -28,7 +28,7 @@ const parserWithMetadata = parser.configure({ | |||
28 | LineComment: t.lineComment, | 28 | LineComment: t.lineComment, |
29 | BlockComment: t.blockComment, | 29 | BlockComment: t.blockComment, |
30 | 'module problem class enum pred fn scope': t.definitionKeyword, | 30 | 'module problem class enum pred fn scope': t.definitionKeyword, |
31 | 'node atom multi': t.definitionKeyword, | 31 | 'declare atom multi': t.definitionKeyword, |
32 | 'abstract extends refers contains container opposite': t.modifier, | 32 | 'abstract extends refers contains container opposite': t.modifier, |
33 | 'default error contained containment': t.modifier, | 33 | 'default error contained containment': t.modifier, |
34 | 'true false unknown error': t.keyword, | 34 | 'true false unknown error': t.keyword, |