wasm-lsp/tree-sitter-wasm

Simplify instruction parsing after merging SIMD support

Closed this issue · 0 comments

The current instruction parsing provides access to a number of fields which can be used to distinguish which kind of instruction was parsed, without having to do much post-processing.

However, given the complexity of supporting parsing of SIMD instructions, this approach hasn't worked out as well. I've often had to avoid using additional fields, and instead make more use of token, in order to fix grammar conflicts.

Since it would be kind of weird to provide more information during parsing about non-SIMD instructions, I think it would be better to just make the overall parsing simpler and then build up a lightweight post-processing layer later on in the pipeline.