Search in sources :

Example 6 with TokenStream

use of com.mitchellbosecke.pebble.lexer.TokenStream in project Orchid by JavaEden.

the class SimpleTagParser method parse.

public RenderableNode parse(Token token, Parser parser) throws ParserException {
    TokenStream stream = parser.getStream();
    int lineNumber = token.getLineNumber();
    // skip over the tag name token
    stream.next();
    // parameter expressions will be added here
    paramExpressionMap = parseParams(parameters, true, tagClass, stream, parser);
    // end parsing now
    stream.expect(Token.Type.EXECUTE_END);
    return new PebbleWrapperTemplateTag.TemplateTagNode(lineNumber, this);
}
Also used : TokenStream(com.mitchellbosecke.pebble.lexer.TokenStream)

Aggregations

TokenStream (com.mitchellbosecke.pebble.lexer.TokenStream)6 Expression (com.mitchellbosecke.pebble.node.expression.Expression)2 PebbleEngine (com.mitchellbosecke.pebble.PebbleEngine)1 NoOpMethodAccessValidator (com.mitchellbosecke.pebble.attributes.methodaccess.NoOpMethodAccessValidator)1 ParserException (com.mitchellbosecke.pebble.error.ParserException)1 PebbleException (com.mitchellbosecke.pebble.error.PebbleException)1 NodeVisitorFactory (com.mitchellbosecke.pebble.extension.NodeVisitorFactory)1 LexerImpl (com.mitchellbosecke.pebble.lexer.LexerImpl)1 Token (com.mitchellbosecke.pebble.lexer.Token)1 RootNode (com.mitchellbosecke.pebble.node.RootNode)1 Parser (com.mitchellbosecke.pebble.parser.Parser)1 ParserImpl (com.mitchellbosecke.pebble.parser.ParserImpl)1 ParserOptions (com.mitchellbosecke.pebble.parser.ParserOptions)1 PebbleTemplateImpl (com.mitchellbosecke.pebble.template.PebbleTemplateImpl)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 OutputStreamWriter (java.io.OutputStreamWriter)1 StringReader (java.io.StringReader)1 StringWriter (java.io.StringWriter)1 Writer (java.io.Writer)1 ArrayList (java.util.ArrayList)1