Zen
A cross-platform functional programming language

SelectStatement Class Reference

AST Node representing a select statement. More...

#include <Ast.hpp>

Inheritance diagram for SelectStatement:
Statement Node

List of all members.

Public Member Functions

 SelectStatement (const Ast::SwitchLabelList &list)
 Default constructor.
const Ast::SwitchLabelListgetList () const
 Returns a reference to the list of case labels in this switch statement.

Private Member Functions

virtual void visit (Statement::Visitor &visitor) const
 Abstract visitor function.

Private Attributes

const Ast::SwitchLabelList_list
 The case label list.

Detailed Description

AST Node representing a select statement.

A select statement is a multiple condition statement that can have arbitrary expressions as case labels For example:

        select {
          case (a > 10): {
          }
          case (a < 5): {
          }
        }

Here, the case labels are expressions.

Todo:
Merge SelectStatement and SwitchStatement

Constructor & Destructor Documentation

SelectStatement ( const Ast::SwitchLabelList list) [inline]

Default constructor.

Parameters:
listThe list of case labels for this statement

Member Function Documentation

const Ast::SwitchLabelList& getList ( ) const [inline]

Returns a reference to the list of case labels in this switch statement.

Returns:
Case label list.
void visit ( Statement::Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements Statement.


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