Code example for LinkedList

Methods: push

0
    private String[] textOnlyTags = {"script", "style"};
    private Integer _spaces = null;
    private final TemplateLoader templateLoader;
    private Parser extending;
    private final String filename;
    private LinkedList<Parser> contexts = new LinkedList<Parser>();
 
    public Parser(String filename, TemplateLoader templateLoader) throws IOException {
        this.filename = filename;
        this.templateLoader = templateLoader;
        lexer = new Lexer(filename, templateLoader);
        getContexts().push(this);
    } 
 
    public Node parse() {
        BlockNode block = new BlockNode();
        block.setLineNumber(lexer.getLineno());
        block.setFileName(filename);
        while (!(peek() instanceof Eos)) { 
            if (peek() instanceof Newline) { 
                nextToken();