Class ExprCustom

  extended by
      extended by
          extended by

public abstract class ExprCustom
extends Expr

Immutable; represents a custom node.

Invariant: this.type==EMPTY && this.errors.size()==1

Field Summary
Fields inherited from class
ambiguous, closingBracket, errors, mult, pos, weight
Constructor Summary
ExprCustom(Pos pos, Err error)
          Constructs an ExprCustom object.
Method Summary
 Expr resolve(Type t, java.util.Collection<ErrorWarning> warns)
          Resolves this expression if ambiguous.
 Pos span()
          Returns a Pos object representing the entire span of this Expr and all its subexpressions.
Methods inherited from class
and, any_arrow_lone, any_arrow_one, any_arrow_some, cardinality, cast2int, cast2sigint, closure, comprehensionOver, deNOP, div, domain, equal, equals, findAllFunctions, forAll, forLone, forNo, forOne, forSome, getDepth, gt, gte, hashCode, hasVar, iff, iminus, implies, in, intersect, iplus, isSame, isSeq_arrow_lone, ite, join, lone_arrow_any, lone_arrow_lone, lone_arrow_one, lone_arrow_some, lone, loneOf, loneOf, lt, lte, minus, mul, mult, no, not, one_arrow_any, one_arrow_lone, one_arrow_one, one_arrow_some, one, oneOf, oneOf, or, override, plus, pos, product, range, reflexiveClosure, rem, resolve_as_formula, resolve_as_int, resolve_as_set, setOf, setOf, sha, shl, shr, some_arrow_any, some_arrow_lone, some_arrow_one, some_arrow_some, some, someOf, someOf, sumOver, toString, toString, transpose, type, typecheck_as_formula, typecheck_as_int, typecheck_as_set
Methods inherited from class
getHTML, getSubnodes, make, make, make, make, showAsTree
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail


public ExprCustom(Pos pos,
                  Err error)
Constructs an ExprCustom object.

pos - - the Pos for this expression (can be Pos.UNKNOWN if unknown)
error - - the error to display if this node does not get desugared
Method Detail


public Pos span()
Returns a Pos object representing the entire span of this Expr and all its subexpressions.

span in class Browsable


public Expr resolve(Type t,
                    java.util.Collection<ErrorWarning> warns)
Resolves this expression if ambiguous. (And if t.size()>0, it represents the set of tuples whose presence/absence is relevent to the parent expression) (Note: it's possible for t to be EMPTY, or even ambiguous!)

On success: the return value will be well-typed and unambiguous

On failure: the return value's "errors" list will be nonempty

If we detect any type warnings, we will add the type warnings to the "warnings" collection.

Specified by:
resolve in class Expr
warns - - the list that will receive any warning we generate; can be null if we wish to ignore warnings