Class: Twig::ExpressionParser::InfixExpressionParser
- Inherits:
-
Base
- Object
- Base
- Twig::ExpressionParser::InfixExpressionParser
show all
- Defined in:
- lib/twig/expression_parser/infix_expression_parser.rb
Constant Summary
collapse
- LEFT =
'left'
- RIGHT =
'right'
Instance Method Summary
collapse
Methods inherited from Base
#aliases, #name, #precedence, #to_s
Instance Method Details
#associativity ⇒ Object
17
18
19
|
# File 'lib/twig/expression_parser/infix_expression_parser.rb', line 17
def associativity
raise NotImplementedError
end
|
#left? ⇒ Boolean
21
22
23
|
# File 'lib/twig/expression_parser/infix_expression_parser.rb', line 21
def left?
associativity == LEFT
end
|
13
14
15
|
# File 'lib/twig/expression_parser/infix_expression_parser.rb', line 13
def parse(parser, left, token)
raise NotImplementedError
end
|
#right? ⇒ Boolean
25
26
27
|
# File 'lib/twig/expression_parser/infix_expression_parser.rb', line 25
def right?
associativity == RIGHT
end
|
#type ⇒ Object
29
30
31
|
# File 'lib/twig/expression_parser/infix_expression_parser.rb', line 29
def type
:infix
end
|