You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
figure out how to reliably attach trivia tokens (comments/whitespace) to relevant nodes
the biggest issue is that right now parsing type A = &B\n will put \n in the node tree before B. that's because we eagerly process all trivia so that the parser can assume no trivia exists, greatly simplifying it's job.
similarly, any comments will usually get attached to the last open node, but that is only really correct if the comment hangs at the end of a line. in all other cases, it makes more sense to attach the comment to the first node after it.
The text was updated successfully, but these errors were encountered:
figure out how to reliably attach trivia tokens (comments/whitespace) to relevant nodes
the biggest issue is that right now parsing
type A = &B\n
will put\n
in the node tree beforeB
. that's because we eagerly process all trivia so that the parser can assume no trivia exists, greatly simplifying it's job.similarly, any comments will usually get attached to the last open node, but that is only really correct if the comment hangs at the end of a line. in all other cases, it makes more sense to attach the comment to the first node after it.
The text was updated successfully, but these errors were encountered: