Added modifier properties

This commit is contained in:
arookas 2016-02-01 04:43:14 -05:00
parent 780345863e
commit f5af232ed4
2 changed files with 20 additions and 0 deletions

View file

@ -6,6 +6,10 @@ namespace arookas {
public sunIdentifier Builtin { get { return this[1] as sunIdentifier; } }
public sunParameterList Parameters { get { return this[2] as sunParameterList; } }
public sunSymbolModifiers Modifiers {
get { return sunSymbol.GetModifiers(this[0]); }
}
public sunBuiltinDeclaration(sunSourceLocation location)
: base(location) { }
@ -19,6 +23,10 @@ namespace arookas {
public sunParameterList Parameters { get { return this[2] as sunParameterList; } }
public sunNode Body { get { return this[3]; } }
public sunSymbolModifiers Modifiers {
get { return sunSymbol.GetModifiers(this[0]); }
}
public sunFunctionDefinition(sunSourceLocation location)
: base(location) { }

View file

@ -24,6 +24,10 @@
class sunVariableDeclaration : sunNode {
public sunIdentifier Variable { get { return this[1] as sunIdentifier; } }
public sunSymbolModifiers Modifiers {
get { return sunSymbol.GetModifiers(this[0]); }
}
public sunVariableDeclaration(sunSourceLocation location)
: base(location) { }
@ -37,6 +41,10 @@
public sunAssign Operator { get { return this[2] as sunAssign; } }
public sunExpression Expression { get { return this[3] as sunExpression; } }
public sunSymbolModifiers Modifiers {
get { return sunSymbol.GetModifiers(this[0]); }
}
public sunVariableDefinition(sunSourceLocation location)
: base(location) { }
@ -67,6 +75,10 @@
public sunIdentifier Constant { get { return this[1] as sunIdentifier; } }
public sunExpression Expression { get { return this[3] as sunExpression; } }
public sunSymbolModifiers Modifiers {
get { return sunSymbol.GetModifiers(this[0]) | sunSymbolModifiers.Constant; }
}
public sunConstantDefinition(sunSourceLocation location)
: base(location) { }