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