1 #ifndef uscript_compile_h
2 #define uscript_compile_h
4 #include <unordered_set>
92 void EmitBytes(uint8_t bytea, uint8_t byteb);
98 void Number(
bool canAssign);
100 void Unary(
bool canAssign);
101 void Binary(
bool canAssign);
103 void String(
bool canAssign);
105 void And(
bool canAssign);
106 void Or(
bool canAssign);
107 void Call(
bool canAssign);
108 void Index(
bool canAssign);
109 void Dot(
bool canAssign);
129 const char *
DoIntern(
const std::string &str);
146 template <
typename TObj>
std::unordered_set< std::string > strings
bool Check(TokenType type)
const char * DoIntern(const std::string &str)
BEGIN_PROLOG TPC Trig offset(g4 rise time) ProjectToHeight
void AddLocal(Token name)
uint8_t IdentifierConstant(Token *token)
void EmitByte(uint8_t byte)
void EmitLoop(int loopStart)
void DefineVariable(uint8_t global)
void Call(bool canAssign)
void Index(bool canAssign)
bool DoCompile(const char *_source, Chunk *chunk)
void Consume(TokenType type, const char *message)
void Literal(bool canAssign)
uint8_t ParseVariable(const char *errorMessage)
void Binary(bool canAssign)
int EmitJump(uint8_t instruction)
void PatchJump(int offset)
void EmitBytes(uint8_t bytea, uint8_t byteb)
void NamedVariable(Token token, bool canAssign)
static Compiler & Instance()
int ResolveLocal(Token *name)
std::vector< Local > locals
void EmitConstant(Value value)
void SetChunk(Chunk *chunk)
uint8_t MakeConstant(Value value)
bool Match(TokenType type)
void ErrorAt(Token &token, const char *message)
void DoRegister(const char *classname)
void Grouping(bool canAssign)
static const char * Intern(const std::string &str)
void Number(bool canAssign)
byte_as<> byte
Type of data size stored in bytes, in long long precision.
TClassInfo * Add(const char *classname)
void Variable(bool canAssign)
static TClassInfo * GetClassInfo(const char *classname)
void String(bool canAssign)
void Unary(bool canAssign)
void ParsePrecedence(Precedence precedence)
static bool Compile(const char *source, Chunk *chunk)
void ExpressionStatement()
ParseRule * GetRule(TokenType type) const
void(Compiler::*)(bool) ParseFn