Fixed: store modifiers in symbols

This commit is contained in:
arookas 2016-02-22 20:45:30 -05:00
parent 5163c94e3a
commit f3fc69c870
2 changed files with 7 additions and 3 deletions

View file

@ -14,7 +14,8 @@ namespace arookas {
: base(location) { }
public override void Compile(sunCompiler compiler) {
compiler.Context.DeclareBuiltin(this);
var symbol = compiler.Context.DeclareBuiltin(this);
symbol.Modifiers = Modifiers;
}
}
@ -33,7 +34,8 @@ namespace arookas {
public override void Compile(sunCompiler compiler) {
// this defines the function in the context
// it doesn't compile the definition body
compiler.Context.DefineFunction(this);
var symbol = compiler.Context.DefineFunction(this);
symbol.Modifiers = Modifiers;
}
}

View file

@ -32,7 +32,8 @@
: base(location) { }
public override void Compile(sunCompiler compiler) {
compiler.Context.DeclareVariable(this);
var symbol = compiler.Context.DeclareVariable(this);
symbol.Modifiers = Modifiers;
}
}
@ -50,6 +51,7 @@
public override void Compile(sunCompiler compiler) {
var symbol = compiler.Context.DeclareVariable(this);
symbol.Modifiers = Modifiers;
Operator.Compile(compiler, symbol, Expression);
}
}