File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,10 @@ export function map_block_children(
217217 . with ( { kind : "include" } , ( block ) => block )
218218 . with ( { kind : "import" } , ( block ) => block )
219219 . with ( { kind : "aggregator" } , ( block ) => block )
220+ . with ( { kind : "factor" } , ( block ) => {
221+ const factor = f_expr ( block . factor )
222+ return { ...block , factor }
223+ } )
220224 . with ( { kind : P . nullish } , ( block ) => block )
221225 // @ts -expect-error: TODO
222226 . exhaustive ( )
@@ -313,6 +317,9 @@ export function iter_block_children(
313317 . with ( { kind : "include" } , ( ) => { } )
314318 . with ( { kind : "import" } , ( ) => { } )
315319 . with ( { kind : "aggregator" } , ( ) => { } )
320+ . with ( { kind : "factor" } , ( block ) => {
321+ if ( block . factor ) f ( block . factor )
322+ } )
316323 . with ( { kind : undefined } , ( ) => { } )
317324 // @ts -expect-error: TODO
318325 . exhaustive ( )
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ export function childrenOf(block: NonScalarPdlBlock) {
152152 . with ( { kind : "empty" } , ( data ) =>
153153 data . defs ? Object . values ( data . defs ) : [ ] ,
154154 )
155+ . with ( { kind : "factor" } , ( ) => [ ] )
155156 . with ( { kind : "error" } , ( ) => [ ] ) // TODO show errors in trace
156157 . with ( { kind : P . nullish } , ( ) => [ ] )
157158 // @ts -expect-error: TODO
You can’t perform that action at this time.
0 commit comments