Zen
A cross-platform functional programming language

GrammarToken Class Reference

AST representing a single lexer token. More...

#include <Ast.hpp>

Inheritance diagram for GrammarToken:
Node

List of all members.

Public Member Functions

 GrammarToken (const z::string &name, const z::string &txt, const bool &isRex, const bool &isNot)
 Default constructor.
const z::stringgetName () const
 Returns the name of the lexer token.
const z::stringgetText () const
 Returns the text of the lexer token.
const bool & isRex () const
 Returns true if lexer token is a regular expression.
const bool & isNot () const
 Returns true if lexer token should not be included in scanned string.

Private Attributes

const z::string _name
 Name of lexer token.
const z::string _txt
 Text of lexer token.
const bool _isRex
 True if lexer token is a regular expression, else false.
const bool _isNot
 True if lexer token should not be included in scanned string, else false.

Detailed Description

AST representing a single lexer token.

Todo:
Rename to LexerToken

Constructor & Destructor Documentation

GrammarToken ( const z::string name,
const z::string txt,
const bool &  isRex,
const bool &  isNot 
) [inline]

Default constructor.

Parameters:
nameName of the lexer token
txtText of the lexer token
isRexTrue if token is a regular expression
isNotTrue if token should not be included in scanned token string

Member Function Documentation

const z::string& getName ( ) const [inline]

Returns the name of the lexer token.

Returns:
Name of lexer token
const z::string& getText ( ) const [inline]

Returns the text of the lexer token.

Returns:
Text of lexer token
const bool& isNot ( ) const [inline]

Returns true if lexer token should not be included in scanned string.

Returns:
True if lexer token should not be included in scanned string, else false
const bool& isRex ( ) const [inline]

Returns true if lexer token is a regular expression.

Returns:
True if lexer token is a regular expression, else false

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines