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

refactor: parse pragmas with monch #224

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Feb 9, 2023

This parses @deno-types with monch because this parsing is done often and using monch is slightly faster. As part of this change, not providing quotes no longer works. This is because it creates more complexity for scenarios to support and it seems like less than 5 public repos are affected. If we do this, I'll open PRs to the affected repos.

@dsherret dsherret changed the title refactor: parse @deno-types directives with monch refactor: parse pragmas with monch Feb 10, 2023
let (input, _) = ch('=')(input)?;
let quote_start_input = input;
let (input, quote_char) = or(ch('"'), ch('\"'))(input)?;
let (input, text) = take_while(|c| c != quote_char)(input)?;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would go across newlines, which is not good.

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

Successfully merging this pull request may close these issues.

None yet

1 participant