Open yanhaijing opened 5 years ago
@yanhaijing hey. Thanks for feedback. Not sure what is logic behind that code, but valid code will be
var a = 12;
if (a) {
const a = 1;
} else {
const a = 2;
}
so const
is block scoped but var
not. And that code works fine.
thank you advice, but I want use the tool to process my work code, my work code is written by es6, o(╥﹏╥)o
@yanhaijing that's fine, it does support es6. You can check examples https://github.com/Bogdan-Lyashenko/js-code-to-svg-flowchart/tree/master/docs/examples (code-sample.js), each of them written in es6.
https://bogdan-lyashenko.github.io/js-code-to-svg-flowchart/docs/live-editor/index.html
↑this url enter code ↓, async don't support
async function () {
}
ah, I see, yes, it's not supported, sorry for that. async-await
are es7 features, not es6 😛 I need to update babylon AST parser to support that.
Thank you for your work. Come on
es5 code is work
es6 code don't work