Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add line numbers #74

Open
jrmuizel opened this issue Aug 4, 2019 · 4 comments
Open

Add line numbers #74

jrmuizel opened this issue Aug 4, 2019 · 4 comments

Comments

@jrmuizel
Copy link
Contributor

jrmuizel commented Aug 4, 2019

The AST does not currently contain line numbers. It would be handy to have for reporting semantic analysis problems.

@hadronized
Copy link
Owner

Hm, yeah, I would also like to have that too, but I still don’t quite know how to, since it would be possible to interleave the AST with it.

@KoltesDigital
Copy link
Contributor

In the TypeScript AST, each node has metadata, for instance the start and end positions in the buffer. It'd be great to have such metadata, with the line number in addition.

@KoltesDigital
Copy link
Contributor

I guess that's similar to what nom_locate does.

@hadronized
Copy link
Owner

Having the start and end positions in the input slice would definitely help, that’s for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants