JSTQL-JS-Transform/dsl_files/do.jstql

33 lines
837 B
Text
Raw Normal View History

proposal DoExpression{
pair arrowFunction{
applicable to {
"let <<ident:Identifier>> = () => {
<<statements: NMinus1Statements >>
return <<returnVal : Expression | Identifier>>;
}
"
}
transform to {
"let <<ident>> = do {
<<statements>>
<<returnVal>>
}"
}
}
pair immediatelyInvokedUnnamedFunction {
applicable to {
"let <<ident:Identifier>> = function(){
<<statements: NMinus1Statements >>
return <<returnVal : Expression | Identifier>>;
}();"
}
transform to {
"let <<ident>> = do {
<<statements>>
<<returnVal>>
}"
}
}
}