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 {
class sunConstKeyword : sunNode {
public sunConstKeyword(sunSourceLocation location)
class sunConstModifier : sunNode {
public sunConstModifier(sunSourceLocation location)
: base(location) { }
}
class sunLocalKeyword : sunNode {
public sunLocalKeyword(sunSourceLocation location)
class sunLocalModifier : sunNode {
public sunLocalModifier(sunSourceLocation location)
: base(location) { }
}
}

View file

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

View file

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