コード例 #1
0
 public void visit(ConstantSymbol n)
 {
     throw new NotImplementedException();
 }
コード例 #2
0
 public override void visit(ConstDeclaration n)
 {
     Table scope = n.Scope;
     if (n.Type == null)
         n.Type = n.accept(new TypeVisitor());
     ConstantSymbol sym = new ConstantSymbol(n.Name.Name, n.Type, n.RHS);
     scope.Insert(sym);
 }
コード例 #3
0
ファイル: Table.cs プロジェクト: jverbraeken/Swift-Compiler
 public void Insert(ConstantSymbol n)
 {
     n.StackLocation = GetStackSize() + 1;
     dictionary.Add(Tuple.Create<string, List<ASTType>>(n.Name, null), n);
 }
コード例 #4
0
 public virtual void visit(ConstantSymbol n)
 {
     // Do nothing; leave the implementation to the main class
 }
コード例 #5
0
 public ASTType visit(ConstantSymbol n)
 {
     return n.Type;
 }