diff --git a/ssc/data table.cs b/ssc/data.cs similarity index 100% rename from ssc/data table.cs rename to ssc/data.cs diff --git a/ssc/import resolver.cs b/ssc/import.cs similarity index 100% rename from ssc/import resolver.cs rename to ssc/import.cs diff --git a/ssc/symbol table.cs b/ssc/symbol.cs similarity index 95% rename from ssc/symbol table.cs rename to ssc/symbol.cs index 237c76e..d603072 100644 --- a/ssc/symbol table.cs +++ b/ssc/symbol.cs @@ -56,6 +56,20 @@ namespace arookas { } public abstract void Compile(sunCompiler compiler); + + public static sunSymbolModifiers GetModifiers(sunNode modifierlist) { + if (modifierlist == null) { + return sunSymbolModifiers.None; + } + var modifiers = sunSymbolModifiers.None; + if (modifierlist.Any(i => i is sunConstKeyword)) { + modifiers |= sunSymbolModifiers.Constant; + } + if (modifierlist.Any(i => i is sunLocalKeyword)) { + modifiers |= sunSymbolModifiers.Local; + } + return modifiers; + } } abstract class sunCallableSymbol : sunSymbol {