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

#include <statement.h>

Inheritance diagram for Print:
Inheritance graph
Collaboration diagram for Print:
Collaboration graph

Public Member Functions

 Print (Expression *e)
 
 ~Print ()
 
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 111 of file statement.h.

Constructor & Destructor Documentation

◆ Print()

Print::Print ( Expression e)
inline

Definition at line 113 of file statement.h.

113 : exp(e) { }

◆ ~Print()

Print::~Print ( )

Definition at line 75 of file statement.cpp.

75  {
76  delete exp;
77 }

Member Function Documentation

◆ eval()

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

Implements Statement.

Definition at line 79 of file statement.cpp.

79  {
80  Number n(exp->eval(st, ft));
81  cout << ">> " << n << endl;
82 }
virtual Number eval(const SymbolTable &, const FunctionTable &) const =0
Definition: number.h:21

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