diff --git a/ssc/context.cs b/ssc/context.cs index 61e9d57..2a2b46e 100644 --- a/ssc/context.cs +++ b/ssc/context.cs @@ -195,7 +195,7 @@ namespace arookas { throw new sunRedeclaredVariableException(node); } - return Scopes.Top.DeclareConstant(node.Value, expression); + return Scopes.DeclareConstant(node.Value, expression); } public sunStorableSymbol ResolveStorable(sunIdentifier node) { diff --git a/ssc/scope stack.cs b/ssc/scope stack.cs index 725db8d..56dbbb9 100644 --- a/ssc/scope stack.cs +++ b/ssc/scope stack.cs @@ -48,6 +48,10 @@ namespace arookas } return null; } + public sunConstantSymbol DeclareConstant(string name, sunExpression expression) + { + return Top.DeclareConstant(name, expression); + } sunVariableSymbol DeclareGlobal(string name) { var variableInfo = Top.DeclareVariable(name, 0, GlobalCount);