class Crinja::Tag::ArgumentsParser
- Crinja::Tag::ArgumentsParser
- Crinja::Parser::ExpressionParser
- Reference
- Object
Overview
This is a helper class for Tag
implementations to parse tag arguments. It can either be used
directly or be subclassed for more complex parsing.
Included Modules
- Crinja::Parser::ParserHelper
Defined in:
lib/tag.crConstructors
Instance Method Summary
- #expect_identifier(names : Array(String))
- #expect_identifier(name)
- #expect_identifier
- #if_identifier(names : Array(String), &)
- #if_identifier(name, &)
Instance methods inherited from module Crinja::Parser::ParserHelper
close
close,
current_token(*args, **options)current_token(*args, **options, &) current_token, next_token(*args, **options)
next_token(*args, **options, &) next_token, next_token?(*args, **options)
next_token?(*args, **options, &) next_token?, peek_token(*args, **options)
peek_token(*args, **options, &) peek_token, peek_token?(*args, **options)
peek_token?(*args, **options, &) peek_token?, raise(message : String) raise, token_stream token_stream
Constructor methods inherited from module Crinja::Parser::ParserHelper
new(lexer : BaseLexer)new(token_stream : TokenStream) new
Instance methods inherited from class Crinja::Parser::ExpressionParser
config : Crinja::Config
config,
parse(expected_end_token : Kind = Kind::EOF)
parse,
parse_expression
parse_expression,
parse_expressions(expected_end_token : Kind = Kind::EOF)
parse_expressions,
parse_keyword_list(end_tokens : Array(Kind) = [Kind::EOF], keyword_separator_token : Kind = Kind::KW_ASSIGN, keyword = nil)
parse_keyword_list
Constructor methods inherited from class Crinja::Parser::ExpressionParser
new(stream, config : Crinja::Config = Config.new)
new
Instance methods inherited from module Crinja::Parser::ParserHelper
close
close,
current_token(*args, **options)current_token(*args, **options, &) current_token, next_token(*args, **options)
next_token(*args, **options, &) next_token, next_token?(*args, **options)
next_token?(*args, **options, &) next_token?, peek_token(*args, **options)
peek_token(*args, **options, &) peek_token, peek_token?(*args, **options)
peek_token?(*args, **options, &) peek_token?, raise(message : String) raise, token_stream token_stream
Constructor methods inherited from module Crinja::Parser::ParserHelper
new(lexer : BaseLexer)new(token_stream : TokenStream) new