Class: Code::Parser::Negation
Instance Method Summary
collapse
Methods inherited from Language
<<, >>, absent, aka, #any, ignore, #inspect, maybe, parse, #parse, repeat, #str, then, #to_s, |
Instance Method Details
#exclamation_point ⇒ Object
4
5
6
|
# File 'lib/code/parser/negation.rb', line 4
def exclamation_point
str("!")
end
|
20
21
22
|
# File 'lib/code/parser/negation.rb', line 20
def negation
::Code::Parser::Negation
end
|
16
17
18
|
# File 'lib/code/parser/negation.rb', line 16
def operator
exclamation_point | tilde | plus
end
|
12
13
14
|
# File 'lib/code/parser/negation.rb', line 12
def plus
str("+")
end
|
24
25
26
27
|
# File 'lib/code/parser/negation.rb', line 24
def root
(operator.aka(:operator) << negation.aka(:right)).aka(:negation) |
::Code::Parser::Function
end
|
8
9
10
|
# File 'lib/code/parser/negation.rb', line 8
def tilde
str("~")
end
|