mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
Adds: - model/LocalVariableScopeInfo.h Stores, for local variable blocks: - the names of the local variables in the block - the "base index" of those local variables within the current scope The code generator uses these to clean up local variables as they go out of scope. We also need this when writing debug information.
19 lines
383 B
C++
19 lines
383 B
C++
#ifndef POLSERVER_LOCALVARIABLESCOPEINFO_H
|
|
#define POLSERVER_LOCALVARIABLESCOPEINFO_H
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
class Variable;
|
|
|
|
class LocalVariableScopeInfo
|
|
{
|
|
public:
|
|
unsigned base_index = 0;
|
|
std::vector<std::shared_ptr<Variable>> variables;
|
|
};
|
|
|
|
} // namespace Pol::Bscript::Compiler
|
|
#endif // POLSERVER_LOCALVARIABLESCOPEINFO_H
|