(Tree ast)
| 253 | } |
| 254 | |
| 255 | private static Tree validateAst(Tree ast) throws RecognitionException, ParserException { |
| 256 | CommonTreeNodeStream nodes = new CommonTreeNodeStream( ast ); |
| 257 | AstValidator walker = new AstValidator( nodes ); |
| 258 | AstValidator.query_return newResult = walker.query(); |
| 259 | Tree newAst = (Tree)newResult.getTree(); |
| 260 | |
| 261 | checkError( walker ); |
| 262 | |
| 263 | return newAst; |
| 264 | } |
| 265 | |
| 266 | Tree expandMacro(Tree ast) throws ParserException { |
| 267 | LOG.debug("Original macro AST:\n" + ast.toStringTree() + "\n"); |