Пример #1
0
        // TODO: 6.4 Destructuring Parameter Declarations

        // TODO: 6.7 Generator Functions

        // TODO: 6.8 Asynchronous Functions

        // TODO: 6.9 Type Guard Functions

        #region WriteField

        private void WriteField(FieldDeclaration member)
        {
            if (member.HasDecorator)
            {
                WriteDecorators(member.Decorators, false);
            }
            _Writer.WriteAccessibility(member.Accessibility);
            WriteIsStatic(member.IsStatic);
            _Writer.Write(member.FieldName);
            if (member.IsOptional)
            {
                _Writer.Write('?');
            }
            if (member.FieldType != null)
            {
                _Writer.Write(": ");
                member.FieldType.WriteTypeReference(_Writer);
            }
            if (member.Initializer != null)
            {
                _Writer.Write(" = ");
                member.Initializer.Accept(this);
            }
            _Writer.WriteLine(';');
        }