MCPcopy Index your code
hub / github.com/plotly/dash / toStructure

Function toStructure

components/dash-table/src/core/syntax-tree/index.ts:21–43  ·  view source on GitHub ↗
(tree: ISyntaxTree)

Source from the content-addressed store, hash-verified

19}
20
21function toStructure(tree: ISyntaxTree): IStructure {
22 const {block, left, lexeme, right, value} = tree;
23
24 const res: IStructure = {
25 subType: lexeme.subType,
26 type: lexeme.type,
27 value: lexeme.present ? lexeme.present(tree) : value
28 };
29
30 if (block) {
31 res.block = toStructure(block);
32 }
33
34 if (left) {
35 res.left = toStructure(left);
36 }
37
38 if (right) {
39 res.right = toStructure(right);
40 }
41
42 return res;
43}
44
45export default class SyntaxTree {
46 protected lexerResult: ILexerResult;

Callers 1

toStructureMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…