Renamed keyword nodes to modifier nodes

This commit is contained in:
arookas 2016-02-22 20:27:30 -05:00
parent 8db3326005
commit e69d97478d
3 changed files with 8 additions and 8 deletions

View file

@ -1,11 +1,11 @@
namespace arookas { namespace arookas {
class sunConstKeyword : sunNode { class sunConstModifier : sunNode {
public sunConstKeyword(sunSourceLocation location) public sunConstModifier(sunSourceLocation location)
: base(location) { } : base(location) { }
} }
class sunLocalKeyword : sunNode { class sunLocalModifier : sunNode {
public sunLocalKeyword(sunSourceLocation location) public sunLocalModifier(sunSourceLocation location)
: base(location) { } : base(location) { }
} }
} }

View file

@ -207,8 +207,8 @@ namespace arookas {
// modifiers // modifiers
switch (id) { switch (id) {
case __sunConstants.LOCAL: return new sunLocalKeyword(location); case __sunConstants.LOCAL: return new sunLocalModifier(location);
case __sunConstants.CONST: return new sunConstKeyword(location); case __sunConstants.CONST: return new sunConstModifier(location);
} }
// emergency fallback // emergency fallback

View file

@ -103,10 +103,10 @@ namespace arookas {
return sunSymbolModifiers.None; return sunSymbolModifiers.None;
} }
var modifiers = sunSymbolModifiers.None; var modifiers = sunSymbolModifiers.None;
if (modifierlist.Any(i => i is sunConstKeyword)) { if (modifierlist.Any(i => i is sunConstModifier)) {
modifiers |= sunSymbolModifiers.Constant; modifiers |= sunSymbolModifiers.Constant;
} }
if (modifierlist.Any(i => i is sunLocalKeyword)) { if (modifierlist.Any(i => i is sunLocalModifier)) {
modifiers |= sunSymbolModifiers.Local; modifiers |= sunSymbolModifiers.Local;
} }
return modifiers; return modifiers;