bcg.ast
Class Expression

java.lang.Object
  extended by bcg.ast.Node
      extended by bcg.ast.Expression
Direct Known Subclasses:
BinaryOperator, Chained, FunctionCall, Indexed, Literal, UnaryOperator, Variable

public abstract class Expression
extends Node

Base class for expressions. The major difference between Expression (and its subclasses) and other kinds of Node is that an Expression has a type.


Constructor Summary
protected Expression(java.lang.String file, int position, Type type)
           
 
Method Summary
 Type type()
          The type of this expression
 
Methods inherited from class bcg.ast.Node
file, illegal, parent, position, typeCheck, typeCheck, typeError, typeError, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expression

protected Expression(java.lang.String file,
                     int position,
                     Type type)
Method Detail

type

public Type type()
The type of this expression



Written by Brian Gernhardt for Compiler Construction at RIT, Winter 2010