Replies: 1 comment
-
In general we provide location information for anything that can be directly attached to nodes/have some kind of meaning for nodes. This means we don't provide location information for any kind of delimiters. This includes things like commas, newlines, and semicolons. The As a workaround, if you really need the location of the |
Beta Was this translation helpful? Give feedback.
-
It's great that most tokens in the Ruby syntax are recorded in
*_loc
attributes, but some are missing. Is this expected and outside the scope of Prism?For example, the following two produce identical trees
because the location of the
=
is not recorded anywhere.Similarly for arrays,
[1,2 , 3]
— I don't see a way to get the locations of the commas.Beta Was this translation helpful? Give feedback.
All reactions