class TaskJuggler::TextParser::TokenDoc

Utility class to store a name and a textual description of the meaning of a token used by the parser syntax tree. A specification of the variable type and a reference to a specific pattern are optional.

Attributes

name[RW]
pattern[RW]
text[R]
typeSpec[RW]

Public Class Methods

new(name, arg) click to toggle source

Construct a ParserTokenDoc object. name and text are Strings that hold the name and textual description of the parser token.

# File lib/taskjuggler/TextParser/TokenDoc.rb, line 25
def initialize(name, arg)
  @name = name
  if arg.is_a?(String)
    @text = arg
  else
    @pattern = arg
  end
  @typeSpec = nil
  @pattern = nil
end