diff options
author | 2023-08-17 02:32:26 +0200 | |
---|---|---|
committer | 2023-08-17 02:43:55 +0200 | |
commit | eb5da232b5954895b449957c73e35d0b36e3a902 (patch) | |
tree | a8714116cfe3102659e9c5e5b90131e7ec248492 /subprojects/frontend/src/xtext | |
parent | chore(deps): bump dependencies (diff) | |
download | refinery-eb5da232b5954895b449957c73e35d0b36e3a902.tar.gz refinery-eb5da232b5954895b449957c73e35d0b36e3a902.tar.zst refinery-eb5da232b5954895b449957c73e35d0b36e3a902.zip |
feat: basic semantics mapping and visualization
Diffstat (limited to 'subprojects/frontend/src/xtext')
-rw-r--r-- | subprojects/frontend/src/xtext/XtextClient.ts | 5 | ||||
-rw-r--r-- | subprojects/frontend/src/xtext/xtextMessages.ts | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/subprojects/frontend/src/xtext/XtextClient.ts b/subprojects/frontend/src/xtext/XtextClient.ts index abdf8518..d145cd30 100644 --- a/subprojects/frontend/src/xtext/XtextClient.ts +++ b/subprojects/frontend/src/xtext/XtextClient.ts | |||
@@ -38,7 +38,7 @@ export default class XtextClient { | |||
38 | private readonly occurrencesService: OccurrencesService; | 38 | private readonly occurrencesService: OccurrencesService; |
39 | 39 | ||
40 | constructor( | 40 | constructor( |
41 | store: EditorStore, | 41 | private readonly store: EditorStore, |
42 | private readonly pwaStore: PWAStore, | 42 | private readonly pwaStore: PWAStore, |
43 | ) { | 43 | ) { |
44 | this.webSocketClient = new XtextWebSocketClient( | 44 | this.webSocketClient = new XtextWebSocketClient( |
@@ -114,6 +114,9 @@ export default class XtextClient { | |||
114 | case 'validate': | 114 | case 'validate': |
115 | this.validationService.onPush(push); | 115 | this.validationService.onPush(push); |
116 | return; | 116 | return; |
117 | case 'semantics': | ||
118 | this.store.setSemantics(push); | ||
119 | return; | ||
117 | default: | 120 | default: |
118 | throw new Error('Unknown service'); | 121 | throw new Error('Unknown service'); |
119 | } | 122 | } |
diff --git a/subprojects/frontend/src/xtext/xtextMessages.ts b/subprojects/frontend/src/xtext/xtextMessages.ts index bbbff064..971720e1 100644 --- a/subprojects/frontend/src/xtext/xtextMessages.ts +++ b/subprojects/frontend/src/xtext/xtextMessages.ts | |||
@@ -34,7 +34,11 @@ export const XtextWebErrorResponse = z.object({ | |||
34 | 34 | ||
35 | export type XtextWebErrorResponse = z.infer<typeof XtextWebErrorResponse>; | 35 | export type XtextWebErrorResponse = z.infer<typeof XtextWebErrorResponse>; |
36 | 36 | ||
37 | export const XtextWebPushService = z.enum(['highlight', 'validate']); | 37 | export const XtextWebPushService = z.enum([ |
38 | 'highlight', | ||
39 | 'validate', | ||
40 | 'semantics', | ||
41 | ]); | ||
38 | 42 | ||
39 | export type XtextWebPushService = z.infer<typeof XtextWebPushService>; | 43 | export type XtextWebPushService = z.infer<typeof XtextWebPushService>; |
40 | 44 | ||