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

#include <compctx.h>

Public Member Functions

 CompilerContext ()
 
 CompilerContext (const std::string &filename, int dbg_filenum, const char *s)
 
 CompilerContext (const CompilerContext &)
 
CompilerContextoperator= (const CompilerContext &)
 
void printOn (std::ostream &os) const
 
void printOn (fmt::Writer &writer) const
 
void printOnShort (std::ostream &os) const
 
void printOnShort (fmt::Writer &writer) const
 
int skipcomments ()
 
void skipws ()
 

Public Attributes

int dbg_filenum
 
std::string filename
 
int line
 
const char * s
 
const char * s_begin
 

Detailed Description

Represents a single compile context.

A new compile context is created for every source file being compiled, but a context can spawn itself many sub-contexts when needed

Definition at line 25 of file compctx.h.

Constructor & Destructor Documentation

Pol::Bscript::CompilerContext::CompilerContext ( )

Definition at line 72 of file compctx.cpp.

Pol::Bscript::CompilerContext::CompilerContext ( const std::string &  filename,
int  dbg_filenum,
const char *  s 
)

Definition at line 77 of file compctx.cpp.

Pol::Bscript::CompilerContext::CompilerContext ( const CompilerContext ctx)

Definition at line 82 of file compctx.cpp.

Member Function Documentation

CompilerContext & Pol::Bscript::CompilerContext::operator= ( const CompilerContext rhs)

Definition at line 91 of file compctx.cpp.

References dbg_filenum, filename, line, s, and s_begin.

void Pol::Bscript::CompilerContext::printOn ( std::ostream &  os) const

Definition at line 162 of file compctx.cpp.

References filename, and line.

Referenced by Pol::Bscript::operator<<().

void Pol::Bscript::CompilerContext::printOn ( fmt::Writer &  writer) const

Definition at line 167 of file compctx.cpp.

References filename, and line.

void Pol::Bscript::CompilerContext::printOnShort ( std::ostream &  os) const

Definition at line 172 of file compctx.cpp.

References filename, and line.

Referenced by Pol::Bscript::Compiler::compile(), and Pol::Bscript::Compiler::getStatement().

void Pol::Bscript::CompilerContext::printOnShort ( fmt::Writer &  writer) const

Definition at line 177 of file compctx.cpp.

References filename, and line.

int Pol::Bscript::CompilerContext::skipcomments ( )
void Pol::Bscript::CompilerContext::skipws ( )

Skips whitespaces. Moves the pointer forward until a non-whitespace is found

Definition at line 105 of file compctx.cpp.

References line, and s.

Referenced by Pol::Bscript::Compiler::getStatement(), and Pol::Bscript::Compiler::readCurLine().

Member Data Documentation

int Pol::Bscript::CompilerContext::dbg_filenum
const char* Pol::Bscript::CompilerContext::s_begin

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