JSTQL-JS-Transform/dsl_files/do.jstql

32 lines
751 B
Text
Raw Normal View History

proposal DoExpression{
case arrowFunction{
applicable to {
2024-06-01 22:19:44 +00:00
"(() => {
2024-05-22 12:44:45 +00:00
<<statements: (Statement && !ReturnStatement)+>>
return <<returnVal : Expression>>;
2024-06-01 22:19:44 +00:00
})();"
}
transform to {
"(do {
<<statements>>
<<returnVal>>
})"
}
}
case immediatelyInvokedUnnamedFunction {
applicable to {
"(function(){
2024-05-22 12:44:45 +00:00
<<statements: (Statement && !ReturnStatement)+>>
return <<returnVal : Expression>>;
})();"
}
transform to {
"(do {
<<statements>>
<<returnVal>>
})"
}
}
}