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

#include <statement.h>

Inheritance diagram for FunctionDef:
Inheritance graph
Collaboration diagram for FunctionDef:
Collaboration graph

Public Member Functions

 FunctionDef (const string &n, Function *fun)
 
 ~FunctionDef ()
 
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 70 of file statement.h.

Constructor & Destructor Documentation

◆ FunctionDef()

FunctionDef::FunctionDef ( const string &  n,
Function fun 
)
inline

Definition at line 72 of file statement.h.

72 : name(n), function(fun) { }

◆ ~FunctionDef()

FunctionDef::~FunctionDef ( )

Definition at line 42 of file statement.cpp.

42  {
43  delete function;
44 }

Member Function Documentation

◆ eval()

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

Implements Statement.

Definition at line 46 of file statement.cpp.

46  {
47  ft[name] = function;
48 }

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