Pol  Revision:4b29d2b
Pol::Bscript::Scope Class Reference

#include <compiler.h>

Public Member Functions

void addvalue ()
 
void addvar (const std::string &varname, const CompilerContext &ctx, bool warn_on_notused=true, bool unused=false)
 
const BlockDescblockdesc () const
 
bool inblock () const
 
unsigned int numVariables () const
 
unsigned numVarsInBlock () const
 
void popblock (bool varsOnly)
 
BlockDescpushblock ()
 
bool varexists (const std::string &varname, unsigned &idx) const
 
bool varexists (const std::string &varname) const
 

Private Attributes

std::vector< BlockDescblockdescs_
 
Variables variables_
 

Friends

class Compiler
 

Detailed Description

Definition at line 96 of file compiler.h.

Member Function Documentation

void Pol::Bscript::Scope::addvalue ( )

Definition at line 149 of file compiler.cpp.

References blockdescs_.

const BlockDesc& Pol::Bscript::Scope::blockdesc ( ) const
inline

Definition at line 106 of file compiler.h.

bool Pol::Bscript::Scope::inblock ( ) const
inline

Definition at line 104 of file compiler.h.

Referenced by Pol::Bscript::Compiler::inGlobalScope().

unsigned int Pol::Bscript::Scope::numVariables ( ) const
inline

Definition at line 109 of file compiler.h.

Referenced by Pol::Bscript::Compiler::handleVarDeclare().

unsigned Pol::Bscript::Scope::numVarsInBlock ( ) const
inline

Definition at line 105 of file compiler.h.

Referenced by Pol::Bscript::Compiler::handleVarDeclare().

BlockDesc & Pol::Bscript::Scope::pushblock ( )

Definition at line 102 of file compiler.cpp.

References blockdescs_.

bool Pol::Bscript::Scope::varexists ( const std::string &  varname) const

Definition at line 90 of file compiler.cpp.

References name, Pol::Clib::stringicmp(), and variables_.

Friends And Related Function Documentation

friend class Compiler
friend

Definition at line 117 of file compiler.h.

Member Data Documentation

std::vector<BlockDesc> Pol::Bscript::Scope::blockdescs_
private
Variables Pol::Bscript::Scope::variables_
private

Definition at line 112 of file compiler.h.

Referenced by addvar(), popblock(), and varexists().


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