diff --git a/ssc/ast/nodes.functions.cs b/ssc/ast/nodes.functions.cs index e0817e6..ad06105 100644 --- a/ssc/ast/nodes.functions.cs +++ b/ssc/ast/nodes.functions.cs @@ -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; } } diff --git a/ssc/ast/nodes.variables.cs b/ssc/ast/nodes.variables.cs index 3a4c6f8..d9cc8bb 100644 --- a/ssc/ast/nodes.variables.cs +++ b/ssc/ast/nodes.variables.cs @@ -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); } }