Пример #1
0
 public Program(Position position, LetCommand command)
     : base(position)
 {
     _command = command;
     _command.Parent = this;
 }
Пример #2
0
 public Program(Position position, LetCommand command) :
     base(position)
 {
     _command        = command;
     _command.Parent = this;
 }
Пример #3
0
 public void visit(LetCommand that)
 {
     Console.WriteLine("{");
     // note: function declarations should be output before the first line
     foreach (Declaration declaration in that.Declarations)
         declaration.visit(this);
     that.Command.visit(this);
     Console.WriteLine("}");
 }
Пример #4
0
 public void visit(LetCommand that)
 {
     string name = CreateName();
     _symbols.EnterScope(name);
     foreach (Declaration declaration in that.Declarations)
         declaration.visit(this);
     that.Command.visit(this);
     _symbols.LeaveScope(name);
 }