feat(indent): ecma - support try_catch and if_else

This commit is contained in:
Munif Tanjim 2022-01-21 17:11:46 +06:00 committed by Christian Clason
parent bb60706433
commit 8f9d4ada35
6 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,13 @@
if (cond1) {
do_1()
if (cond1a) {
do_1a()
} else {
do_1_fallback()
}
} else if (cond2) {
do_2()
} else {
do_fallback()
}

View file

@ -0,0 +1,8 @@
try {
throw Error()
} catch (err) {
throw error
} finally {
console.log("42")
}