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 code range to RegexpParseNode #4183

Open
nirvdrum opened this issue Sep 26, 2016 · 3 comments
Open

Add code range to RegexpParseNode #4183

nirvdrum opened this issue Sep 26, 2016 · 3 comments
Labels

Comments

@nirvdrum
Copy link
Contributor

StrParseNode includes access to both the underlying ByteList and the logical string's code range. It would be helpful if RegexpParseNode had this information as well. Since the lexer is likely already performing a byte scan to find the bounds of the underlying ByteList, it would be ideal to capture the code range at this point and avoid an additional scan later on.

@headius headius added the parser label Sep 26, 2016
@headius
Copy link
Member

headius commented Sep 26, 2016

For Truffle, I assume you'll be changing this in your copy of our parser. But either way I suppose we both could see some benefit from this.

@enebo
Copy link
Member

enebo commented Sep 26, 2016

This is also part of a larger initiative to make CR non-lazy so we never have an UNKNOWN CR too. This is just the regexp part of it.

@nirvdrum
Copy link
Contributor Author

The parser change is still new to me. But yeah, this seems beneficial to both.

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

No branches or pull requests

3 participants