NuriaProject Framework  0.1
The NuriaProject Framework
Public Member Functions | Public Attributes | List of all members
Nuria::Token Struct Reference

Token as returned by Nuria::Tokenizer. More...

#include <tokenizer.hpp>

Public Member Functions

 Token (int tokenId=-1, int row=0, int column=0, const QVariant &value=QVariant())
 
bool operator< (const Token &right) const
 

Public Attributes

int column
 
int row
 
int tokenId
 
QVariant value
 

Detailed Description

Token as returned by Nuria::Tokenizer.

This plain structure is used by Nuria::Tokenizer to store token data, such as location, the token id and the value.

The structure is flat, meaning you directly access the fields. This was chosen due to the runtime overhead of shared structures to avoid performance issues while tokenizing and subsequent parsing applications.

Both the row and column begin counting from zero.

Note
You can also output this structure on QDebug and Nuria::Debug streams.

Member Function Documentation

bool Nuria::Token::operator< ( const Token right) const

Returns true if this instance comes before right.

Member Data Documentation

int Nuria::Token::column

Column

int Nuria::Token::row

Row

int Nuria::Token::tokenId

The token id

QVariant Nuria::Token::value

The value of this token


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