Class: Code::Parser::NotKeyword
Instance Method Summary
collapse
Methods inherited from Language
<<, >>, absent, aka, #any, ignore, #inspect, maybe, parse, #parse, repeat, #str, then, #to_s, |
Instance Method Details
#not_class ⇒ Object
4
5
6
|
# File 'lib/code/parser/not_keyword.rb', line 4
def not_class
::Code::Parser::NotKeyword
end
|
#not_keyword ⇒ Object
12
13
14
|
# File 'lib/code/parser/not_keyword.rb', line 12
def not_keyword
str("not")
end
|
16
17
18
19
20
|
# File 'lib/code/parser/not_keyword.rb', line 16
def root
(not_keyword.aka(:operator) << whitespace << not_class.aka(:right)).aka(
:not
) | ::Code::Parser::Equal
end
|
#whitespace ⇒ Object
8
9
10
|
# File 'lib/code/parser/not_keyword.rb', line 8
def whitespace
::Code::Parser::Whitespace
end
|