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

support Sedlexing.lexbuf #193

Closed
dannypsnl opened this issue Feb 2, 2025 · 3 comments · Fixed by #194
Closed

support Sedlexing.lexbuf #193

dannypsnl opened this issue Feb 2, 2025 · 3 comments · Fixed by #194
Labels
documentation Improvements or additions to documentation

Comments

@dannypsnl
Copy link

The current Asai api only supports Lexing.lexbuf

val of_lexbuf : ?source:source -> Lexing.lexbuf -> t

I expect there can have another API for Sedlexing.lexbuf

@favonia
Copy link
Contributor

favonia commented Feb 2, 2025

@dannypsnl I believe you can get what you want by composing Asai.Range.of_lex_range and Sedlexing.lexing_bytes_positions. I'm a bit reluctant to add more dependencies if this composition solves the problem.

@favonia
Copy link
Contributor

favonia commented Feb 2, 2025

Maybe this should be included in the tutorial, though.

@favonia favonia added the documentation Improvements or additions to documentation label Feb 2, 2025
@dannypsnl
Copy link
Author

@favonia Yes, I found that solution after I jump into Sedlex's code, it would be nice that document describe this, thanks!

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

Successfully merging a pull request may close this issue.

2 participants