(childSet: ChildSet, nodeList: ASTNode[], createExpressions = false)
| 43 | import { VariableReference } from '../types/js/variable_reference' |
| 44 | |
| 45 | function populateChildSetFromAst(childSet: ChildSet, nodeList: ASTNode[], createExpressions = false) { |
| 46 | nodeList.forEach((astNode: ASTNode) => { |
| 47 | if (createExpressions) { |
| 48 | const expr = new SplootExpression(childSet.getParentRef()) |
| 49 | populateExpressionNodeFromAst(expr, astNode) |
| 50 | childSet.addChild(expr) |
| 51 | } else { |
| 52 | childSet.addChild(createNodeFromAst(childSet.getParentRef(), astNode)) |
| 53 | } |
| 54 | }) |
| 55 | } |
| 56 | |
| 57 | function getSingleTokenFromExpression(astNode: ASTNode): SplootNode { |
| 58 | const tempExp = new SplootExpression(null) |
no test coverage detected