Skip to content

Commit

Permalink
Update viewer of include
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel committed Sep 30, 2024
1 parent 34c57d5 commit 2bdaa1d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pdl-live/src/pdl_viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function show_array(array: PdlBlocks) {
match(array)
.with(P.array(P._), data => {
for (const doc of data) {
const child = show_blocks('lastOf', doc);
const child = show_lastOf(doc);
doc_fragment.appendChild(child);
doc_fragment.appendChild(comma);
}
Expand Down Expand Up @@ -183,9 +183,12 @@ export function show_block(data: PdlBlock) {
body.appendChild(show_result_or_code(data));
})
.with({kind: 'include'}, data => {
// TODO
body.classList.add('pdl_include');
body.appendChild(show_result_or_code(data));
if (data.trace) {
body.appendChild(show_program(data.trace));
} else {
body.appendChild(show_result_or_code(data));
}
})
.with({kind: 'function'}, _ => {
// TODO
Expand Down

0 comments on commit 2bdaa1d

Please sign in to comment.