From a2a92561f7b612b472b5b7e49a2d5ca86802092f Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 31 Jan 2024 17:10:28 +0100 Subject: feat(language): validate module isolation --- subprojects/frontend/src/language/problem.grammar | 4 ++-- subprojects/frontend/src/language/problemLanguageSupport.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'subprojects/frontend/src/language') 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 { // RuleBody { ":" sep "==>" sep "." } //} | AtomDeclaration { - ckw<"atom"> sep<",", AtomNodeName> "." + kw<"declare">? ckw<"atom"> sep<",", AtomNodeName> "." } | NodeDeclaration { - (ckw<"node"> | ckw<"multi">) sep<",", NodeName> "." + (kw<"declare"> | kw<"declare">? ckw<"multi">) sep<",", NodeName> "." } | ScopeDeclaration { 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({ LineComment: t.lineComment, BlockComment: t.blockComment, 'module problem class enum pred fn scope': t.definitionKeyword, - 'node atom multi': t.definitionKeyword, + 'declare atom multi': t.definitionKeyword, 'abstract extends refers contains container opposite': t.modifier, 'default error contained containment': t.modifier, 'true false unknown error': t.keyword, -- cgit v1.2.3-54-g00ecf