diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-08-23 03:36:25 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2023-08-23 03:36:25 +0200 |
commit | 0e54d399424374d497d08a8631c4761dece57ceb (patch) | |
tree | bd0873080b4bc3b81984852def5e435e51292d0d /subprojects/frontend/src/xtext/xtextServiceResults.ts | |
parent | fix: predicate value translation (diff) | |
download | refinery-0e54d399424374d497d08a8631c4761dece57ceb.tar.gz refinery-0e54d399424374d497d08a8631c4761dece57ceb.tar.zst refinery-0e54d399424374d497d08a8631c4761dece57ceb.zip |
feat: dot visualization
Diffstat (limited to 'subprojects/frontend/src/xtext/xtextServiceResults.ts')
-rw-r--r-- | subprojects/frontend/src/xtext/xtextServiceResults.ts | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/subprojects/frontend/src/xtext/xtextServiceResults.ts b/subprojects/frontend/src/xtext/xtextServiceResults.ts index cae95771..12f87b26 100644 --- a/subprojects/frontend/src/xtext/xtextServiceResults.ts +++ b/subprojects/frontend/src/xtext/xtextServiceResults.ts | |||
@@ -126,9 +126,20 @@ export const FormattingResult = DocumentStateResult.extend({ | |||
126 | 126 | ||
127 | export type FormattingResult = z.infer<typeof FormattingResult>; | 127 | export type FormattingResult = z.infer<typeof FormattingResult>; |
128 | 128 | ||
129 | export const SemanticsResult = z.object({ | 129 | export const SemanticsSuccessResult = z.object({ |
130 | error: z.string().optional(), | 130 | nodes: z.string().nullable().array(), |
131 | issues: Issue.array().optional(), | 131 | partialInterpretation: z.record( |
132 | z.string(), | ||
133 | z.union([z.number(), z.string()]).array().array(), | ||
134 | ), | ||
132 | }); | 135 | }); |
133 | 136 | ||
137 | export type SemanticsSuccessResult = z.infer<typeof SemanticsSuccessResult>; | ||
138 | |||
139 | export const SemanticsResult = z.union([ | ||
140 | z.object({ error: z.string() }), | ||
141 | z.object({ issues: Issue.array() }), | ||
142 | SemanticsSuccessResult, | ||
143 | ]); | ||
144 | |||
134 | export type SemanticsResult = z.infer<typeof SemanticsResult>; | 145 | export type SemanticsResult = z.infer<typeof SemanticsResult>; |