Class: Language::Atom::Ignore
Instance Method Summary
collapse
#<<, #>>, #absent, #aka, #any, #ignore, #inspect, #maybe, #repeat, #str, #then, #|
Constructor Details
#initialize(parent:) ⇒ Ignore
6
7
8
|
# File 'lib/language/atom/ignore.rb', line 6
def initialize(parent:)
@parent = parent
end
|
Instance Method Details
#parse(parser) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/language/atom/ignore.rb', line 10
def parse(parser)
clone =
Parser.new(
root: self,
input: parser.input,
cursor: parser.cursor,
buffer: parser.buffer
)
@parent.parse(clone)
parser.cursor = clone.cursor
end
|
#to_s ⇒ Object
22
23
24
|
# File 'lib/language/atom/ignore.rb', line 22
def to_s
"#{@parent}.ignore"
end
|