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 *& operator[](const string &)