gazayas/masamune-ast

Provide ERB support

gazayas opened this issue · 0 comments

There's an issue open at Ruby LSP about reading ERB information: Shopify/ruby-lsp#1055

We might be able to glean some content from there to read files in masamune and return Prism nodes for the information we're looking for.

I'm specifically thinking of this BlockManipulator class which uses ERB syntax in its tests. We rely on strings now, but it would be better to rely on Prism nodes.

https://github.com/bullet-train-co/bullet_train-core/blob/e6b16c207f63f83750de33f1f7bbe6473f342748/bullet_train-super_scaffolding/lib/scaffolding/block_manipulator.rb#L161-L172

https://github.com/bullet-train-co/bullet_train-core/blob/e6b16c207f63f83750de33f1f7bbe6473f342748/bullet_train-super_scaffolding/test/lib/scaffolding/block_manipulator_test.rb#L24-L47