diff options
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 | ||