MCPcopy Create free account
hub / github.com/ShaderFrog/glsl-parser / visit

Function visit

src/preprocessor/preprocessor.ts:140–149  ·  view source on GitHub ↗
(node: PreprocessorAstNode)

Source from the content-addressed store, hash-verified

138
139const evaluate = (ast: PreprocessorAstNode, evaluators: NodeEvaluators) => {
140 const visit = (node: PreprocessorAstNode) => {
141 const evaluator = evaluators[node.type];
142 if (!evaluator) {
143 throw new Error(`No evaluate() evaluator for ${node.type}`);
144 }
145
146 // I can't figure out why evalutor has node type never here
147 // @ts-ignore
148 return evaluator(node, visit);
149 };
150 return visit(ast);
151};
152

Callers 3

evaluateFunction · 0.70
evaluteExpressionFunction · 0.70
parse.test.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected