Ejemplo n.º 1
0
 public override void Visit(LengthExpressionNode node)
 {
     node.expression.Accept(this);
     GetValueOfIdentifier(((IdentifierExpressionNode)node.expression).identifier.name, "eax");
     Gen("mov", "eax", "[eax]");
 }
Ejemplo n.º 2
0
        public override void Visit(LengthExpressionNode node)
        {
            node.expression.Accept(this);

            if (!AreTypeCompatible(node.expression.ExpressionType.GetType(), typeof(ArrayType)))
                throw new Exception("Array Identifier '" + ((IdentifierExpressionNode)node.expression).identifier.name + "' is not an array!");

            node.ExpressionType = IntType.Instance;
        }
Ejemplo n.º 3
0
 public virtual void Visit(LengthExpressionNode node)
 {
     node.expression.Accept(this);
 }
Ejemplo n.º 4
0
 public override void Visit(LengthExpressionNode node)
 {
     Console.WriteLine(this.indentation + "<Array>.Length");
     indentation = indentation + "   ";
     Console.WriteLine(this.indentation + "Array");
     indentation = indentation + "   ";
     node.expression.Accept(this);
     indentation = indentation.Substring(0, indentation.Length - 6);
 }