Skip to content

refactor: parse pragmas with monch#224

Draft
dsherret wants to merge 5 commits intodenoland:mainfrom
dsherret:refactor_parse_deno_types_with_monch
Draft

refactor: parse pragmas with monch#224
dsherret wants to merge 5 commits intodenoland:mainfrom
dsherret:refactor_parse_deno_types_with_monch

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.

1 participant