- pass the current function to the compile context instead of just the containing class.
This commit is contained in:
parent
db8ab1bc4a
commit
cbb990a79e
7 changed files with 101 additions and 48 deletions
|
|
@ -67,11 +67,14 @@ struct FCompileContext
|
|||
{
|
||||
TArray<FxJumpStatement *> Jumps;
|
||||
PPrototype *ReturnProto;
|
||||
PClass *Class;
|
||||
PFunction *Function; // The function that is currently being compiled (or nullptr for constant evaluation.)
|
||||
PClass *Class; // The type of the owning class.
|
||||
|
||||
FCompileContext(PClass *cls = nullptr, PPrototype *ret = nullptr);
|
||||
FCompileContext(PFunction *func = nullptr, PPrototype *ret = nullptr);
|
||||
FCompileContext(PClass *cls); // only to be used to resolve constants!
|
||||
|
||||
PSymbol *FindInClass(FName identifier);
|
||||
PSymbol *FindInClass(FName identifier, PSymbolTable *&symt);
|
||||
PSymbol *FindInSelfClass(FName identifier, PSymbolTable *&symt);
|
||||
PSymbol *FindGlobal(FName identifier);
|
||||
|
||||
void HandleJumps(int token, FxExpression *handler);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue