Class: Kaiseki::CustomParser

Inherits:
BasicParser show all
Defined in:
lib/parser_custom.rb

Constant Summary collapse

NODE =
Node.subclass [:stream, :options]

Instance Attribute Summary

Attributes inherited from BasicParser

#expected

Instance Method Summary collapse

Methods inherited from BasicParser

#eql?, #to_s

Methods included from Parseable

#&, #action, #and?, #cast, #filter, #list, #merge, #not!, #one_or_more, #optional, #override, #parse, #protect, #repeat, #set, #skip, #tag_error, #tag_result, #to_parseable, #validate, #zero_or_more, #|

Constructor Details

#initialize(is_predicate = false, &block) ⇒ CustomParser

Returns a new instance of CustomParser.



5
6
7
8
# File 'lib/parser_custom.rb', line 5

def initialize is_predicate = false, &block
	super block
	@is_predicate = is_predicate
end

Instance Method Details

#predicate?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/parser_custom.rb', line 10

def predicate?
	@is_predicate
end