|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.millscript.expr.Expr<Action>
org.millscript.millscript.expr.CaseExpr
public final class CaseExpr
This class implements a case expression. An individual case
expression can match multiple patterns.
SwitchSyntax,
SwitchAction| Constructor Summary | |
|---|---|
CaseExpr(org.millscript.commons.util.IList<Expr> a,
Expr<?> b)
Creates a new case expression from the specified patterns
and body expression. |
|
| Method Summary | |
|---|---|
Action |
compileIt()
Compiles this expression into an action. |
Expr<?> |
getAct()
Returns this case expressions body expression. |
org.millscript.commons.util.IList<Expr<?>> |
getPatterns()
Returns this case expressions patterns. |
void |
resolve(CompilerState state)
Resolves any NameExpr in the tree so that they refer to the
correct ident. |
| Methods inherited from class org.millscript.millscript.expr.Expr |
|---|
arity, compile, isIntegerExpr, resolveList, setLineNumber, setOrigin, show, show |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CaseExpr(org.millscript.commons.util.IList<Expr> a,
Expr<?> b)
case expression from the specified patterns
and body expression.
a - a list of pattern expressionsb - the body expression| Method Detail |
|---|
public Action compileIt()
Expr
compileIt in class Expr<Action>Action for this expressionExpr.compileIt()public Expr<?> getAct()
public org.millscript.commons.util.IList<Expr<?>> getPatterns()
public void resolve(CompilerState state)
ExprNameExpr in the tree so that they refer to the
correct ident. e.g. This method is responsible for ensuring that
references to a function argument in the body of a function actually
refer to the correct value.
resolve in class Expr<Action>state - the compiler state we are resolving inExpr.resolve(org.millscript.millscript.vm.CompilerState)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||