Piethon
1.0
A Python-like interpreter using flex and bison.
functionTable.cpp
Go to the documentation of this file.
1
#include "
exception.h
"
2
#include "
functionTable.h
"
3
4
Function
*
FunctionTable::operator[]
(
const
string
& ident)
const
{
5
// ensure function is defined
6
if
(funcTable.count(ident) == 0) {
7
throw
UndefinedFunction
();
8
}
9
// return value
10
return
funcTable.find(ident)->second;
11
}
12
13
Function
*&
FunctionTable::operator[]
(
const
string
& ident) {
14
// return reference to entry in funcTable
15
return
funcTable[ident];
16
}
17
Function
Definition:
function.h:29
exception.h
functionTable.h
FunctionTable::operator[]
Function *& operator[](const string &)
Definition:
functionTable.cpp:13
UndefinedFunction
Definition:
exception.h:56
Generated on Tue Jan 19 2021 23:43:11 for Piethon by
1.8.13