Exemplo n.º 1
0
        public override object Visit(FieldStatement that, object value)
        {
            _writer.Write("field ");
            _writer.Write(BackquoteNameOpt(that.Name.Symbol));
            _writer.Write(" is ");
            _writer.Write(ToString(that.Direction));
            that.Type.Visit(this);
            _writer.Write(":");
            _writer.WriteLine();

            _writer.Indent();
            if (that.Getter.Kind != NodeKind.NoneStatement)
                that.Getter.Visit(this);
            if (that.Setter.Kind != NodeKind.NoneStatement)
                that.Setter.Visit(this);
            _writer.Dedent();
            return null;
        }
Exemplo n.º 2
0
 public override object Visit(FieldStatement that, object value)
 {
     _symbols.EnterBlock(that.Name.Symbol, that);
     if (that.Getter.Kind != NodeKind.NoneStatement)
         that.Getter.Visit(this, value);
     if (that.Setter.Kind != NodeKind.NoneStatement)
         that.Setter.Visit(this, value);
     _symbols.LeaveBlock(that.Name.Symbol);
     return null;
 }
 /** Enters the field into the symbol table. */
 public override object Visit(FieldStatement that, object value)
 {
     _symbols.EnterBlock(that.Name.Symbol, that);
     _symbols.LeaveBlock(that.Name.Symbol);
     return null;
 }
        public override object Visit(FieldStatement that, object value = null)
        {
            PrintPrologue(that);
            PrintDefinition(that);
            _writer.WriteLine("Direction = {0}", that.Direction.ToString());
            PrintNodeId("Type", that.Type);
            PrintNodeId("Getter", that.Getter);
            PrintNodeId("Setter", that.Setter);
            PrintEpilogue(that);

            that.Name.Visit(this);
            that.Type.Visit(this);
            that.Getter.Visit(this);
            that.Setter.Visit(this);

            return null;
        }
Exemplo n.º 5
0
 public override object Visit(FieldStatement that, object value)
 {
     if (that.Direction == DirectionKind.InOut || that.Direction == DirectionKind.Out)
         that.Getter.Visit(this);
     if (that.Direction == DirectionKind.In || that.Direction == DirectionKind.InOut)
         that.Setter.Visit(this);
     return null;
 }
Exemplo n.º 6
0
 public override object Visit(FieldStatement that, object value = null)
 {
     _symbols.EnterBlock(that.Name.Symbol, that);
     that.Name.Visit(this);
     that.Type.Visit(this);
     that.Getter.Visit(this);
     that.Setter.Visit(this);
     _symbols.LeaveBlock(that.Name.Symbol);
     return null;
 }
Exemplo n.º 7
0
 public virtual object Visit(FieldStatement that, object value)
 {
     throw new System.NotImplementedException();
 }