Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | Protected Member Functions | List of all members
om::scripting::mir::lang::Expression Class Reference

A class that represents an expression within the source code. More...

#include <omScriptingMirExpressions.h>

Inheritance diagram for om::scripting::mir::lang::Expression:
om::scripting::mir::lang::ASTNode om::scripting::mir::lang::ArrayAccessExpression om::scripting::mir::lang::BinaryExpression om::scripting::mir::lang::CastExpression om::scripting::mir::lang::ExpressionRange om::scripting::mir::lang::FunctionCallExpression om::scripting::mir::lang::IsaExpression om::scripting::mir::lang::LiteralExpression om::scripting::mir::lang::NewArrayExpression om::scripting::mir::lang::NewObjectExpression om::scripting::mir::lang::ReferenceExpression om::scripting::mir::lang::UnaryExpression om::scripting::mir::lang::VariableDeclarationExpression

Public Types

enum  Type {
  LITERAL, UNARY, BINARY, NEW_ARRAY,
  NEW_OBJECT, CAST, FUNCTION_CALL, ARRAY_ACCESS,
  ISA, REFERENCE, VARIABLE_DECLARATION, RANGE
}
 An enum that specifies the different kinds of visiblity for member declarations. More...
 

Public Member Functions

Type getExpressionType () const
 Return the type of this expression. More...
 
- Public Member Functions inherited from om::scripting::mir::lang::ASTNode
 ASTNode ()
 Create a new AST node with no node position specified. More...
 
 ASTNode (const Position &newPosition)
 Create a new AST node which corresponds to a token starting at the specified source code position. More...
 
virtual ~ASTNode ()
 Destroy this AST node object. More...
 
const PositiongetPosition () const
 Return an object representing the position of this AST node in the source code. More...
 
void setPosition (const Position &newPosition)
 Set the position of this AST node in the source code. More...
 

Protected Member Functions

 Expression (Type newType)
 Create a new expression with the specified expression type enum value. More...
 

Detailed Description

A class that represents an expression within the source code.

Member Enumeration Documentation

An enum that specifies the different kinds of visiblity for member declarations.

Enumerator
LITERAL 

An expression that consists of a literal constant value in the source code.

UNARY 

An expression that consists of an operator which effects another sub-expression.

BINARY 

An expression that consists of an operator which effects two sub-expressions.

NEW_ARRAY 

An expression where an array of a certain type is constructed.

NEW_OBJECT 

An expression where an object of a certain type is constructed.

CAST 

An expression where the result of an expression is being cast to another type.

FUNCTION_CALL 

An expression where a function is being called.

ARRAY_ACCESS 

An expression where an element of an array is being accessed.

ISA 

An expression where the inheritance relationship of an expression to a type is determined.

REFERENCE 

A terminal expression representing the name of an object or value.

VARIABLE_DECLARATION 

An expression which declares a local variable.

RANGE 

A range within the master token list which should be later parsed as an expression.

Constructor & Destructor Documentation

om::scripting::mir::lang::Expression::Expression ( Type  newType)
inlineprotected

Create a new expression with the specified expression type enum value.

Member Function Documentation

Type om::scripting::mir::lang::Expression::getExpressionType ( ) const
inline

Return the type of this expression.


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