Class: Code::Parser::Nothing

Inherits:
Language show all
Defined in:
lib/code/parser/nothing.rb

Instance Method Summary collapse

Methods inherited from Language

<<, >>, absent, aka, #any, ignore, #inspect, maybe, parse, #parse, repeat, #str, then, #to_s, |

Instance Method Details

#nil_keywordObject



12
13
14
# File 'lib/code/parser/nothing.rb', line 12

def nil_keyword
  str("nil")
end

#nothing_keywordObject



4
5
6
# File 'lib/code/parser/nothing.rb', line 4

def nothing_keyword
  str("nothing")
end

#null_keywordObject



8
9
10
# File 'lib/code/parser/nothing.rb', line 8

def null_keyword
  str("null")
end

#rootObject



16
17
18
19
# File 'lib/code/parser/nothing.rb', line 16

def root
  (nothing_keyword | null_keyword | nil_keyword).aka(:nothing) |
    ::Code::Parser::Group
end