// var tok = this.expect('code') // , node = new nodes.Code(tok.val, tok.buffer, tok.escape) // , block // , i = 1; // node.line = this.line(); // while (this.lookahead(i) && 'newline' == this.lookahead(i).type) ++i; // block = 'indent' == this.lookahead(i).type; // if (block) { // this.skip(i-1); // node.block = this.block(); // } // return node; private Node parseFilter() { Token token = expect(GetType()) ; Filter filterToken = (Filter) token; Attribute attr = (Attribute) accept(typeof (Attribute)) ; _jadeLexer.setPipeless(true); Node tNode = parseTextBlock(); _jadeLexer.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; }
private Node parseASTFilter() { Token token = expect(GetType()); Filter filterToken = (Filter) token; Attribute attr = (Attribute) accept(typeof (Attribute)); token = expect(typeof (Colon)); FilterNode node = new FilterNode(); node.setValue(filterToken.getValue()); node.setBlock(block()); node.setLineNumber(line()); node.setFileName(filename); node.setAttributes(attr.getAttributes()); return node; }