Would be great to o have ability to get siblings (prev, next) while traversing AST, just like in Babel. I want to write transformation:
(func (param $a i32) (param $b i32)
(get_local $a)
(get_local $b)
i32.add
)
(export "add" (func $add))
To:
func (param $a i32) (param $b i32)
(i32.add (get_local $a) (get_local $b))
)
(export "add" (func $add))
I'm working on 🐊Putout linter, and wast also supported.
The most obvious way to do it would be to traverse i32.add and two previos siblings, and put them inside of i32.add.
Would be great to o have ability to get siblings (prev, next) while traversing AST, just like in Babel. I want to write transformation:
To:
I'm working on 🐊Putout linter, and wast also supported.
The most obvious way to do it would be to traverse
i32.addand two previos siblings, and put them inside ofi32.add.