private Node parseASTFilter() { Token token = expect(Filter.class); Filter filterToken = (Filter) token; Attribute attr = (Attribute) accept(Attribute.class); token = expect(Colon.class); FilterNode node = new FilterNode(); node.setValue(filterToken.getValue()); node.setBlock(block()); node.setLineNumber(line()); node.setFileName(filename); node.setAttributes(attr.getAttributes()); return node; }
private Node parseFilter() { Token token = expect(Filter.class); Filter filterToken = (Filter) token; Attribute attr = (Attribute) accept(Attribute.class); lexer.setPipeless(true); Node tNode = parseTextBlock(); lexer.setPipeless(false); FilterNode node = new FilterNode(); node.setValue(filterToken.getValue()); node.setLineNumber(line()); node.setFileName(filename); node.setTextBlock(tNode); if (attr != null) { node.setAttributes(attr.getAttributes()); } return node; }