aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/xtext/SemanticsService.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2023-08-23 03:36:25 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2023-08-23 03:36:25 +0200
commit0e54d399424374d497d08a8631c4761dece57ceb (patch)
treebd0873080b4bc3b81984852def5e435e51292d0d /subprojects/frontend/src/xtext/SemanticsService.ts
parentfix: predicate value translation (diff)
downloadrefinery-0e54d399424374d497d08a8631c4761dece57ceb.tar.gz
refinery-0e54d399424374d497d08a8631c4761dece57ceb.tar.zst
refinery-0e54d399424374d497d08a8631c4761dece57ceb.zip
feat: dot visualization
Diffstat (limited to 'subprojects/frontend/src/xtext/SemanticsService.ts')
-rw-r--r--subprojects/frontend/src/xtext/SemanticsService.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/subprojects/frontend/src/xtext/SemanticsService.ts b/subprojects/frontend/src/xtext/SemanticsService.ts
index 50ec371a..d68b87a9 100644
--- a/subprojects/frontend/src/xtext/SemanticsService.ts
+++ b/subprojects/frontend/src/xtext/SemanticsService.ts
@@ -17,11 +17,15 @@ export default class SemanticsService {
17 17
18 onPush(push: unknown): void { 18 onPush(push: unknown): void {
19 const result = SemanticsResult.parse(push); 19 const result = SemanticsResult.parse(push);
20 this.validationService.setSemanticsIssues(result.issues ?? []); 20 if ('issues' in result) {
21 if (result.error !== undefined) { 21 this.validationService.setSemanticsIssues(result.issues);
22 this.store.setSemanticsError(result.error);
23 } else { 22 } else {
24 this.store.setSemantics(push); 23 this.validationService.setSemanticsIssues([]);
24 if ('error' in result) {
25 this.store.setSemanticsError(result.error);
26 } else {
27 this.store.setSemantics(result);
28 }
25 } 29 }
26 this.store.analysisCompleted(); 30 this.store.analysisCompleted();
27 } 31 }