|
Has the conventional meaning -- evaluates the expressions in order. The
value of the sequence expression as a whole is the value of the last expression.
If any of the ealier expressions perform a non-local exit, then all later
expressions are skipped and the sequence expression as a whole performs
the same non-local exit.
|
eExpr ("\n", eExpr)*
|
|
<!ELEMENT seqExpr ((%eExpr;)+)>
|
|
In a non-value context (a for-effect-only context), it's just
the same sequence of expressions. In a value context, we assign
the value of the last expression to our result variable. |
|
def x := {
println("foo")
bar()
}
|
|
def x :any := {
println.run("foo")
bar.run()
}
|
|
<defineExpr>
<finalPattern>
<Noun>x</Noun>
<Noun>any</Noun>
</finalPattern>
<hideExpr>
<seqExpr>
<callExpr>
<Noun>println</Noun>
<Verb>run</Verb>
<String>foo</String>
</callExpr>
<callExpr>
<Noun>bar</Noun>
<Verb>run</Verb>
</callExpr>
</seqExpr>
</hideExpr>
</defineExpr>
|
|
Object result_3;
{
E.call(println, "run" "foo")
result_3 = E.call(bar, "run")
}
Object x = result_3;
With some work, we should be able to assign to "x"
directly, and avoid creating the temporary "result_3".
|
x |
|