class Crinja::Tag::ArgumentsParser

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

Defined in:

lib/tag.cr

Constructors

Instance Method Summary

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

Constructor Detail

def self.new(arguments, config : Config) #

[View source]

Instance Method Detail

def expect_identifier(names : Array(String)) #

[View source]
def expect_identifier(name) #

[View source]
def expect_identifier #

[View source]
def if_identifier(names : Array(String), &) #

[View source]
def if_identifier(name, &) #

[View source]