private Node parseInterpolation() { Token token = advance(); String name = token.getValue(); TagNode tagNode = new TagNode(); tagNode.setLineNumber(lexer.getLineno()); tagNode.setFileName(filename); tagNode.setName(name); tagNode.setBuffer(true); return this.tag(tagNode); }
private Node parseTag() { Token token = advance(); String name = token.getValue(); TagNode tagNode = new TagNode(); tagNode.setLineNumber(lexer.getLineno()); tagNode.setFileName(filename); tagNode.setName(name); tagNode.setValue(name); tagNode.setSelfClosing(token.isSelfClosing()); return this.tag(tagNode); }
private Node parseCall() { Token token = expect(Call.class); Call callToken = (Call) token; MixinNode mixin = new MixinNode(); mixin.setBlock(new BlockNode()); mixin.setName(callToken.getValue()); mixin.setLineNumber(callToken.getLineNumber()); mixin.setFileName(filename); mixin.setCall(true); if (StringUtils.isNotBlank(callToken.getArguments())) { mixin.setArguments(callToken.getArguments()); } this.tag(mixin); if(mixin.hasCodeNode()) { mixin.getBlock().push(mixin.getCodeNode()); mixin.setCodeNode(null); } if(mixin.hasBlock() && mixin.getBlock().getNodes().isEmpty()) mixin.setBlock(null); return mixin; }
private Node parseInterpolation() { Token token = advance(); String name = token.getValue(); TagNode tagNode = new TagNode(); tagNode.setLineNumber(lexer.getLineno()); tagNode.setFileName(filename); tagNode.setName(name); tagNode.setBuffer(true); return this.tag(tagNode); }
private Node parseTag() { Token token = advance(); String name = token.getValue(); TagNode tagNode = new TagNode(); tagNode.setLineNumber(lexer.getLineno()); tagNode.setFileName(filename); tagNode.setName(name); tagNode.setValue(name); tagNode.setSelfClosing(token.isSelfClosing()); return this.tag(tagNode); }
private Node parseCall() { Token token = expect(Call.class); Call callToken = (Call) token; MixinNode mixin = new MixinNode(); mixin.setBlock(new BlockNode()); mixin.setName(callToken.getValue()); mixin.setLineNumber(callToken.getLineNumber()); mixin.setFileName(filename); mixin.setCall(true); if (StringUtils.isNotBlank(callToken.getArguments())) { mixin.setArguments(callToken.getArguments()); } this.tag(mixin); if(mixin.hasCodeNode()) { mixin.getBlock().push(mixin.getCodeNode()); mixin.setCodeNode(null); } if(mixin.hasBlock() && mixin.getBlock().getNodes().isEmpty()) mixin.setBlock(null); return mixin; }