aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-13 20:39:27 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-14 12:10:43 +0200
commit748bf89911359bffbfafe354e522f7d656488146 (patch)
tree555fe86e0a068eda1f84538faaca8d6e76fd3bd8 /subprojects/frontend/src
parentchore(deps): bump dependencies (diff)
downloadrefinery-748bf89911359bffbfafe354e522f7d656488146.tar.gz
refinery-748bf89911359bffbfafe354e522f7d656488146.tar.zst
refinery-748bf89911359bffbfafe354e522f7d656488146.zip
refactor(language): clarify containment hierarchy
Diffstat (limited to 'subprojects/frontend/src')
-rw-r--r--subprojects/frontend/src/language/problem.grammar21
-rw-r--r--subprojects/frontend/src/language/problemLanguageSupport.ts3
-rw-r--r--subprojects/frontend/src/theme/ThemeProvider.tsx10
3 files changed, 22 insertions, 12 deletions
diff --git a/subprojects/frontend/src/language/problem.grammar b/subprojects/frontend/src/language/problem.grammar
index 95861110..7feb6bfe 100644
--- a/subprojects/frontend/src/language/problem.grammar
+++ b/subprojects/frontend/src/language/problem.grammar
@@ -18,7 +18,10 @@ statement {
18 (EnumBody { "{" sep<",", IndividualNodeName> "}" } | ".") 18 (EnumBody { "{" sep<",", IndividualNodeName> "}" } | ".")
19 } | 19 } |
20 PredicateDefinition { 20 PredicateDefinition {
21 (ckw<"error"> ckw<"pred">? | ckw<"pred">) 21 (
22 (ckw<"error"> | ckw<"contained"> | ckw<"containment">) ckw<"pred">? |
23 ckw<"pred">
24 )
22 RelationName ParameterList<Parameter>? 25 RelationName ParameterList<Parameter>?
23 PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." } 26 PredicateBody { ("<->" sep<OrOp, Conjunction>)? "." }
24 } | 27 } |
@@ -28,23 +31,29 @@ statement {
28 RuleBody { ":" sep<OrOp, Conjunction> "==>" sep<OrOp, Consequent> "." } 31 RuleBody { ":" sep<OrOp, Conjunction> "==>" sep<OrOp, Consequent> "." }
29 } | 32 } |
30 Assertion { 33 Assertion {
31 kw<"default">? (NotOp | UnknownOp)? RelationName 34 ckw<"default">? (NotOp | UnknownOp)? RelationName
32 ParameterList<AssertionArgument> (":" LogicValue)? "." 35 ParameterList<AssertionArgument> (":" LogicValue)? "."
33 } | 36 } |
34 NodeValueAssertion { 37 NodeValueAssertion {
35 IndividualNodeName ":" Constant "." 38 QualifiedName ":" Constant "."
36 } | 39 } |
37 IndividualDeclaration { 40 IndividualDeclaration {
38 ckw<"indiv"> sep<",", IndividualNodeName> "." 41 ckw<"indiv"> sep<",", IndividualNodeName> "."
39 } | 42 } |
40 ScopeDeclaration { 43 ScopeDeclaration {
41 kw<"scope"> sep<",", ScopeElement> "." 44 ckw<"scope"> sep<",", ScopeElement> "."
42 } 45 }
43} 46}
44 47
45ReferenceDeclaration { 48ReferenceDeclaration {
46 (kw<"refers"> | kw<"contains">)? 49 (
47 RelationName 50 ExplicitContainmentReference[@dynamicPrecedence=1] {
51 (ckw<"refers"> | ckw<"contains"> | ckw<"container">) RelationName ~containment
52 } |
53 ImplicitContainmentReference {
54 RelationName ~containment
55 }
56 )
48 ("[" Multiplicity? "]")? 57 ("[" Multiplicity? "]")?
49 RelationName 58 RelationName
50 (kw<"opposite"> RelationName)? 59 (kw<"opposite"> RelationName)?
diff --git a/subprojects/frontend/src/language/problemLanguageSupport.ts b/subprojects/frontend/src/language/problemLanguageSupport.ts
index 07a884e7..03a7c4cc 100644
--- a/subprojects/frontend/src/language/problemLanguageSupport.ts
+++ b/subprojects/frontend/src/language/problemLanguageSupport.ts
@@ -27,7 +27,8 @@ const parserWithMetadata = parser.configure({
27 LineComment: t.lineComment, 27 LineComment: t.lineComment,
28 BlockComment: t.blockComment, 28 BlockComment: t.blockComment,
29 'problem class enum pred rule indiv scope': t.definitionKeyword, 29 'problem class enum pred rule indiv scope': t.definitionKeyword,
30 'abstract extends refers contains opposite error default': t.modifier, 30 'abstract extends refers contains container opposite': t.modifier,
31 'default error contained containment': t.modifier,
31 'true false unknown error': t.operatorKeyword, 32 'true false unknown error': t.operatorKeyword,
32 'may must current count': t.operatorKeyword, 33 'may must current count': t.operatorKeyword,
33 'new delete': t.keyword, 34 'new delete': t.keyword,
diff --git a/subprojects/frontend/src/theme/ThemeProvider.tsx b/subprojects/frontend/src/theme/ThemeProvider.tsx
index ffb18a06..550b3b30 100644
--- a/subprojects/frontend/src/theme/ThemeProvider.tsx
+++ b/subprojects/frontend/src/theme/ThemeProvider.tsx
@@ -70,8 +70,8 @@ const typography: TypographyVariantsOptions = {
70 fontFamily: 70 fontFamily:
71 '"InterVariable", "Inter", "Roboto", "Helvetica", "Arial", sans-serif', 71 '"InterVariable", "Inter", "Roboto", "Helvetica", "Arial", sans-serif',
72 fontWeightMedium: 600, 72 fontWeightMedium: 600,
73 fontWeightEditorNormal: 450, 73 fontWeightEditorNormal: 400,
74 fontWeightEditorBold: 650, 74 fontWeightEditorBold: 700,
75 editor: { 75 editor: {
76 fontFamily: 76 fontFamily:
77 '"JetBrains MonoVariable", "JetBrains Mono", "Cascadia Code", "Fira Code", monospace', 77 '"JetBrains MonoVariable", "JetBrains Mono", "Cascadia Code", "Fira Code", monospace',
@@ -173,7 +173,7 @@ const lightTheme = createResponsiveTheme({
173 divider: alpha('#19202b', 0.16), 173 divider: alpha('#19202b', 0.16),
174 outer: { 174 outer: {
175 background: '#f5f5f5', 175 background: '#f5f5f5',
176 border: '#d6d7d9', 176 border: '#c8c8c8',
177 }, 177 },
178 highlight: { 178 highlight: {
179 number: '#0084bc', 179 number: '#0084bc',
@@ -200,8 +200,8 @@ const lightTheme = createResponsiveTheme({
200const darkTheme = createResponsiveTheme({ 200const darkTheme = createResponsiveTheme({
201 typography: { 201 typography: {
202 ...typography, 202 ...typography,
203 fontWeightEditorNormal: 400, 203 fontWeightEditorNormal: 350,
204 fontWeightEditorBold: 600, 204 fontWeightEditorBold: 650,
205 }, 205 },
206 components: { 206 components: {
207 ...components, 207 ...components,