Zen
A cross-platform functional programming language

Splice Class Reference

AST Node for a splice. More...

#include <Ast.hpp>

Inheritance diagram for Splice:
Node

List of all members.

Public Member Functions

 Splice (const Expr &start, const Expr &stop, const Expr &step)
 Default constructor.
const ExprgetStart () const
 Returns the expression representing the first index.
const ExprgetStop () const
 Returns the expression representing the last index.
const ExprgetStep () const
 Returns the expression representing the increment.

Private Attributes

const Expr_start
 The first index expression.
const Expr_stop
 The last index expression.
const Expr_step
 The increment expression.

Detailed Description

AST Node for a splice.

An splice represents a subset of a list. For example:

        local y = x[2:23:3];

Here, the Splice AST Node represents the values inside the square brackets. 2 is the start index, 23 is the stop index, and 3 is the increment.


Constructor & Destructor Documentation

Splice ( const Expr start,
const Expr stop,
const Expr step 
) [inline]

Default constructor.

Parameters:
startFirst index of splice
stopLast index of splice
stepSplice increment

Member Function Documentation

const Expr& getStart ( ) const [inline]

Returns the expression representing the first index.

Returns:
The first index expression
const Expr& getStep ( ) const [inline]

Returns the expression representing the increment.

Returns:
The increment
const Expr& getStop ( ) const [inline]

Returns the expression representing the last index.

Returns:
The last index expression

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