QScript  2.1.2
Expression and algorithm evaluator
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
org.qscript.Token Class Reference

Inherited by org.qscript.Argument, and org.qscript.operator.Operator.

Public Member Functions

void setTextPosition (int charStart, int charWidth)
 
void setTextPosition (int line, int charStart, int charWidth)
 
int getLine ()
 
int getCharStart ()
 
int getCharWidth ()
 
boolean isArgument ()
 
boolean isFlowAction ()
 
boolean isVariable ()
 
boolean isThing ()
 
boolean isOperator ()
 
boolean isFlowOperator ()
 
String forListing ()
 

Static Public Attributes

static final Token DUMMY = new Argument(null)
 

Protected Member Functions

 Token ()
 

Protected Attributes

int line
 
int charStart
 
int charWidth
 

Detailed Description

This is the base class for operators and arguments.
The attributes of this class are used to store the location and size of the 'characters' in the original text so they can to highlight errors and tokens if the script is being traced.

Author
Peter Lager

Constructor & Destructor Documentation

org.qscript.Token.Token ( )
protected

Default ctor

Member Function Documentation

String org.qscript.Token.forListing ( )

Used in Script and Parser classes when listing

int org.qscript.Token.getCharStart ( )

Get the start position in the script line for this token

int org.qscript.Token.getCharWidth ( )

Get the number of characters used by this token in the script line

int org.qscript.Token.getLine ( )

Get the line number for this token

void org.qscript.Token.setTextPosition ( int  charStart,
int  charWidth 
)

Used during parsing to record the text position of the ParseToken in the script.


The documentation for this class was generated from the following file: