コード例 #1
0
ファイル: Program.cs プロジェクト: bencz/Beryl
 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
ファイル: CodeGen.cs プロジェクト: bencz/Beryl
 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
ファイル: Checker.cs プロジェクト: bencz/Beryl
 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);
 }