public override void ExitDecorators([NotNull] LuminaryParser.DecoratorsContext context) { if (context.Parent is LuminaryParser.ClassPropertyContext) { _classProperty.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.ClassDefinitionContext) { _class.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.InterfacePropertyContext) { _interfaceProperty.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.InterfaceDefinitionContext) { _interface.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.EnumerationMemberContext) { _enumerationMember.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.EnumerationDefinitionContext) { _enumeration.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.DecoratorPropertyContext) { _decoratorProperty.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.DecoratorDefinitionContext) { _decorator.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.FormalArrayParameterContext) { _formalParameter.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.FormalFixedParameterContext) { _formalParameter.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } else if (context.Parent is LuminaryParser.InterfaceMethodContext) { _interfaceMethod.Decorators.AddRange(Swap(ref _appliedDecorators, null)); } }
public override void EnterDecorators([NotNull] LuminaryParser.DecoratorsContext context) { _appliedDecorators = new List <DecoratorValueNode>(); }