Class: Parser::ParserContext

Inherits:
Object
  • Object
show all
Defined in:
lib/appswarm/tools/parser/parser_lib.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str, pos) ⇒ ParserContext

Returns a new instance of ParserContext.



8
9
10
11
12
# File 'lib/appswarm/tools/parser/parser_lib.rb', line 8

def initialize(str,pos)
  @str=str
  @pos=pos
  @possible=[]
end

Instance Attribute Details

#posObject

Returns the value of attribute pos.



7
8
9
# File 'lib/appswarm/tools/parser/parser_lib.rb', line 7

def pos
  @pos
end

#possibleObject (readonly)

Returns the value of attribute possible.



6
7
8
# File 'lib/appswarm/tools/parser/parser_lib.rb', line 6

def possible
  @possible
end

Instance Method Details

#strObject



13
14
15
# File 'lib/appswarm/tools/parser/parser_lib.rb', line 13

def str
  @str[@pos..-1]
end