Class: Code::Parser::Shift
Instance Method Summary
collapse
Methods inherited from Operation
#root, #whitespace, #whitespace?
Methods inherited from Language
<<, >>, absent, aka, #any, ignore, #inspect, maybe, parse, #parse, repeat, #str, then, #to_s, |
Instance Method Details
8
9
10
|
# File 'lib/code/parser/shift.rb', line 8
def greater
str(">")
end
|
12
13
14
|
# File 'lib/code/parser/shift.rb', line 12
def lesser
str("<")
end
|
16
17
18
|
# File 'lib/code/parser/shift.rb', line 16
def operator
(greater << greater) | (lesser << lesser)
end
|
#statement ⇒ Object
4
5
6
|
# File 'lib/code/parser/shift.rb', line 4
def statement
::Code::Parser::Addition
end
|