1 #ifndef COMPILER_LOCALS_H_INCLUDED
2 #define COMPILER_LOCALS_H_INCLUDED
18 std::vector<std::string>&
get (
char type);
28 bool search (
char type,
const std::string&
name)
const;
34 const std::vector<std::string>&
get (
char type)
const;
36 void write (std::ostream& localFile)
const;
char getType(const std::string &name) const
's': short, 'l': long, 'f': float, ' ': does not exist.
Definition: locals.cpp:55
void write(std::ostream &localFile) const
write declarations to file.
Definition: locals.cpp:84
std::vector< std::string > mShorts
Definition: locals.hpp:14
void clear()
remove all declarations.
Definition: locals.cpp:104
std::vector< std::string > mLongs
Definition: locals.hpp:15
int getIndex(const std::string &name) const
return index for local variable name (-1: does not exist).
Definition: locals.cpp:69
void declare(char type, const std::string &name)
declares a variable.
Definition: locals.cpp:99
std::vector< std::string > mFloats
Definition: locals.hpp:16
Local variable declarations.
Definition: locals.hpp:12
int searchIndex(char type, const std::string &name) const
Definition: locals.cpp:25
bool search(char type, const std::string &name) const
Definition: locals.cpp:38
const char * name
Definition: crashcatcher.cpp:59