Class: Code::Parser::Splat
Instance Method Summary
collapse
Methods inherited from Language
<<, >>, absent, aka, #any, ignore, #inspect, maybe, parse, #parse, repeat, #str, then, #to_s, |
Instance Method Details
#ampersand ⇒ Object
20
21
22
|
# File 'lib/code/parser/splat.rb', line 20
def ampersand
str("&")
end
|
24
25
26
27
28
|
# File 'lib/code/parser/splat.rb', line 24
def root
(ampersand.aka(:operator) << whitespace? << splat.aka(:right)).aka(
:splat
) | statement
end
|
8
9
10
|
# File 'lib/code/parser/splat.rb', line 8
def splat
::Code::Parser::Splat
end
|
#statement ⇒ Object
4
5
6
|
# File 'lib/code/parser/splat.rb', line 4
def statement
::Code::Parser::Class
end
|
#whitespace ⇒ Object
12
13
14
|
# File 'lib/code/parser/splat.rb', line 12
def whitespace
::Code::Parser::Whitespace
end
|
#whitespace? ⇒ Boolean
16
17
18
|
# File 'lib/code/parser/splat.rb', line 16
def whitespace?
whitespace.maybe
end
|