MCPcopy
hub / github.com/thesysdev/openui / isRuntimeExpr

Function isRuntimeExpr

packages/lang-core/src/parser/ast.ts:66–80  ·  view source on GitHub ↗
(node: ASTNode)

Source from the content-addressed store, hash-verified

64
65/** Type guard for runtime expression nodes that survive parser lowering. */
66export function isRuntimeExpr(node: ASTNode): node is RuntimeExprNode {
67 switch (node.k) {
68 case "StateRef":
69 case "RuntimeRef":
70 case "BinOp":
71 case "UnaryOp":
72 case "Ternary":
73 case "Member":
74 case "Index":
75 case "Assign":
76 return true;
77 default:
78 return false;
79 }
80}
81
82/** Valid AST discriminant values. */
83const AST_KINDS = new Set([

Callers 1

materializeValueFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected