![]() |
Zen
A cross-platform functional programming language
|
AST Node for a splice. More...
#include <Ast.hpp>
Public Member Functions | |
| Splice (const Expr &start, const Expr &stop, const Expr &step) | |
| Default constructor. | |
| const Expr & | getStart () const |
| Returns the expression representing the first index. | |
| const Expr & | getStop () const |
| Returns the expression representing the last index. | |
| const Expr & | getStep () 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. | |
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.
Default constructor.
| start | First index of splice |
| stop | Last index of splice |
| step | Splice increment |
| const Expr& getStart | ( | ) | const [inline] |
Returns the expression representing the first index.
| const Expr& getStep | ( | ) | const [inline] |
Returns the expression representing the increment.
| const Expr& getStop | ( | ) | const [inline] |
Returns the expression representing the last index.