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

Parser events have offset, but not line number #52

Open
zmughal opened this issue Apr 11, 2024 · 2 comments
Open

Parser events have offset, but not line number #52

zmughal opened this issue Apr 11, 2024 · 2 comments

Comments

@zmughal
Copy link

zmughal commented Apr 11, 2024

Is it possible to add the $token->{line} to parser events? I can extend the parser for now to work for most cases (will give an update if I notice anything missing).

My goal here is to have the loader maintain the location of YAML nodes alongside the constructed objects.

@perlpunk
Copy link
Owner

Yes, that's on my todo list. I just think that there are cases where I don't have that information (yet). I would need to have a closer look again, but busy for about a month at least...

@perlpunk
Copy link
Owner

Also I would like to be compatible to libyaml.
If you take a look at YAML::LIbYAML::API events, you will see detailed information about where an event starts and ends. So in the end I would ideally return the same information in YAML::PP

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

2 participants