(List<CommonTree> inlineNodes,
List<PigMacro> macroDefs)
| 295 | } |
| 296 | |
| 297 | private void inlineMacro(List<CommonTree> inlineNodes, |
| 298 | List<PigMacro> macroDefs) throws ParserException { |
| 299 | for (CommonTree t : inlineNodes) { |
| 300 | Set<String> macroStack = new HashSet<String>(); |
| 301 | CommonTree newTree = PigMacro.macroInline(t, macroDefs, macroStack, pigContext); |
| 302 | |
| 303 | List<CommonTree> nodes = new ArrayList<CommonTree>(); |
| 304 | traverseInline(newTree, nodes); |
| 305 | |
| 306 | if (nodes.isEmpty()) { |
| 307 | QueryParserUtils.replaceNodeWithNodeList(t, newTree, null); |
| 308 | } else { |
| 309 | inlineMacro(nodes, macroDefs); |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | private void applyRegisters(Tree t) throws ExecException, ParserException { |
| 315 | if (t.getText().equalsIgnoreCase(REGISTER_DEF)) { |
no test coverage detected