polserver/pol-core/bscript/compiler/representation/DebugBlock.h
Eric Swanson 1567241871
New compiler: write debug info (.dbg and .dbg.txt) (#302)
Also: OG compiler debug info for foreach iterator changed to match actual variable name

Adds:
- ast/DebugStatementMarker: for "intrusive debug" (ecompile -i) instructions
- codegen/DebugBlockGuard: pushes and pops debug block #
- format/DebugStoreSerializer: writes .dbg and .dbg.txt files
- representation/DebugBlock: holds parent block # and local variable names for each block
- representation/DebugStore: holds all debug information
2020-09-12 14:26:58 -07:00

25 lines
552 B
C++

#ifndef POLSERVER_DEBUGBLOCK_H
#define POLSERVER_DEBUGBLOCK_H
#include <string>
#include <vector>
namespace Pol::Bscript::Compiler
{
class DebugBlock
{
public:
DebugBlock( unsigned parent_block_index, unsigned base_index,
std::vector<std::string> local_variables );
const unsigned parent_block_index;
// this->local_variable_names[n] is overall local[n+base_index]
const unsigned base_index;
const std::vector<std::string> local_variable_names;
};
} // namespace Pol::Bscript::Compiler
#endif // POLSERVER_DEBUGBLOCK_H