Class: Code::Parser::Group
Instance Method Summary
collapse
Methods inherited from Language
<<, >>, absent, aka, #any, ignore, #inspect, maybe, parse, #parse, repeat, #str, then, #to_s, |
Instance Method Details
#closing_parenthesis ⇒ Object
12
13
14
|
# File 'lib/code/parser/group.rb', line 12
def closing_parenthesis
str(")")
end
|
4
5
6
|
# File 'lib/code/parser/group.rb', line 4
def code
::Code::Parser::Code
end
|
#opening_parenthesis ⇒ Object
8
9
10
|
# File 'lib/code/parser/group.rb', line 8
def opening_parenthesis
str("(")
end
|
16
17
18
19
|
# File 'lib/code/parser/group.rb', line 16
def root
(opening_parenthesis << code << closing_parenthesis.maybe).aka(:group) |
::Code::Parser::Call
end
|