Piethon  1.0
A Python-like interpreter using flex and bison.
Public Member Functions | List of all members
While Class Reference

#include <statement.h>

Inheritance diagram for While:
Inheritance graph
Collaboration diagram for While:
Collaboration graph

Public Member Functions

 While (Expression *cond, StatementList *sList)
 
 ~While ()
 
void eval (SymbolTable &, FunctionTable &) const
 
- Public Member Functions inherited from Statement
virtual ~Statement ()
 
virtual int getLineNumber () const
 

Additional Inherited Members

- Protected Member Functions inherited from Statement
 Statement ()
 
 Statement (int i)
 
- Protected Attributes inherited from Statement
int lineNumber
 

Detailed Description

Definition at line 98 of file statement.h.

Constructor & Destructor Documentation

◆ While()

While::While ( Expression cond,
StatementList sList 
)
inline

Definition at line 100 of file statement.h.

100 : condition(cond), stmtList(sList) { }

◆ ~While()

While::~While ( )

Definition at line 64 of file statement.cpp.

64  {
65  delete condition;
66  delete stmtList;
67 }

Member Function Documentation

◆ eval()

void While::eval ( SymbolTable st,
FunctionTable ft 
) const
virtual

Implements Statement.

Definition at line 69 of file statement.cpp.

69  {
70  while (condition->eval(st, ft) > 0) {
71  stmtList->eval(st, ft);
72  }
73 }
virtual Number eval(const SymbolTable &, const FunctionTable &) const =0
void eval(SymbolTable &, FunctionTable &) const
Definition: statement.cpp:103

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