better looks

This commit is contained in:
Joeri Exelmans 2025-10-19 19:21:17 +02:00
parent f992dcb5f6
commit 20a36825d4
7 changed files with 71 additions and 22 deletions

View file

@ -25,7 +25,7 @@ export function ShowExpr(props: {expr: Expression}) {
export function ShowAction(props: {action: Action}) {
if (props.action.kind === "raise") {
return <>^{props.action.event}</>;
return <>^<span className="outputEvent">{props.action.event}</span></>;
}
else if (props.action.kind === "assignment") {
return <>{props.action.lhs} = <ShowExpr expr={props.action.rhs}/>;</>;
@ -59,3 +59,12 @@ export function ShowAST(props: {root: ConcreteState | PseudoState, transitions:
}
</details>
}
export function ShowOutputEvents(props: {outputEvents: Set<string>}) {
return <div style={{whiteSpace: 'wrap'}}>
out:
{[...props.outputEvents].map(eventName => {
return <><span className="outputEvent">{eventName}</span> </>;
})}
</div>;
}