33 lines
No EOL
839 B
Text
33 lines
No EOL
839 B
Text
proposal DoExpression{
|
|
case arrowFunction{
|
|
applicable to {
|
|
"let <<ident:Identifier>> = () => {
|
|
<<statements: (Statement && !ReturnStatement)+>>
|
|
return <<returnVal : Expression>>;
|
|
}
|
|
"
|
|
}
|
|
transform to {
|
|
"let <<ident>> = do {
|
|
<<statements>>
|
|
<<returnVal>>
|
|
}"
|
|
}
|
|
}
|
|
|
|
case immediatelyInvokedUnnamedFunction {
|
|
applicable to {
|
|
"let <<ident:Identifier>> = function(){
|
|
<<statements: (Statement && !ReturnStatement)+>>
|
|
return <<returnVal : Expression>>;
|
|
}();"
|
|
}
|
|
|
|
transform to {
|
|
"let <<ident>> = do {
|
|
<<statements>>
|
|
<<returnVal>>
|
|
}"
|
|
}
|
|
}
|
|
} |