|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorc.ast.extended.expression.Expression
public abstract class Expression
Base class for the extended abstract syntax tree. Extended expressions are produced by the parser with minimal processing. They desugar to a simplified set of expressions.
Nested Class Summary | |
---|---|
static interface |
Expression.Arg
Variant type returned by the argify method. |
Constructor Summary | |
---|---|
Expression()
|
Method Summary | |
---|---|
protected Expression.Arg |
argify()
Simplify an expression which occurs in an argument (nested) position. |
SourceLocation |
getSourceLocation()
|
static java.lang.String |
join(java.util.Collection<?> items,
java.lang.String separator)
Utility method to join a sequence of items with a separator. |
void |
setSourceLocation(SourceLocation location)
|
abstract Expression |
simplify()
Simplify an expression which occurs in a call (non-nested) position. |
static Expression |
uncurry(java.util.List<java.util.List<Pattern>> ps,
Expression body)
Utility method to fold a group of pattern lists into a lambda. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface orc.ast.extended.ASTNode |
---|
accept |
Constructor Detail |
---|
public Expression()
Method Detail |
---|
public abstract Expression simplify() throws CompilationException
CompilationException
protected Expression.Arg argify() throws CompilationException
CompilationException
public void setSourceLocation(SourceLocation location)
setSourceLocation
in interface Locatable
public SourceLocation getSourceLocation()
getSourceLocation
in interface ASTNode
getSourceLocation
in interface Located
public static java.lang.String join(java.util.Collection<?> items, java.lang.String separator)
public static Expression uncurry(java.util.List<java.util.List<Pattern>> ps, Expression body)
ps
- list (P),...,(P)body
- b
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |