diff options
Diffstat (limited to 'subprojects/frontend/src/xtext/SemanticsService.ts')
-rw-r--r-- | subprojects/frontend/src/xtext/SemanticsService.ts | 12 |
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 | } |