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

Move regex use to module: Rebase #283

Commits on Nov 25, 2019

  1. Move all regex usage to separate module

    That way we can add fancy-regex support behind a feature.
    robinst committed Nov 25, 2019
    Configuration menu
    Copy the full SHA
    2f6b1b9 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2019

  1. Bump fancy-regex to 0.3.0

    * Adds a std::error::Error impl for Error
    * Adds a backtracking limit to mitigate catastrophic backtracking
    robinst committed Nov 27, 2019
    Configuration menu
    Copy the full SHA
    731769e View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2019

  1. Restore optimization of reusing Regions

    Without this, some parsing benchmarks took 30% longer to run.
    robinst committed Nov 28, 2019
    Configuration menu
    Copy the full SHA
    b2fa35a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d8de89f View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2019

  1. Add YAML parsing test

    robinst committed Nov 29, 2019
    Configuration menu
    Copy the full SHA
    d668233 View commit details
    Browse the repository at this point in the history
  2. Compile regexes in multi-line mode for the "newlines" syntaxes

    Some of the regexes include `$` and expect it to match end of line. In
    fancy-regex, `$` means end of text by default. Adding `(?m)` activates
    multi-line mode which changes `$` to match end of line.
    
    This fixes a large number of the failed assertions with syntest.
    robinst committed Nov 29, 2019
    Configuration menu
    Copy the full SHA
    49c0dd4 View commit details
    Browse the repository at this point in the history
  3. Replace POSIX character classes so that they match Unicode as well

    In fancy-regex, POSIX character classes only match ASCII characters.
    Sublime's syntaxes expect them to match Unicode characters as well, so
    transform them to corresponding Unicode character classes.
    robinst committed Nov 29, 2019
    Configuration menu
    Copy the full SHA
    67c971d View commit details
    Browse the repository at this point in the history
  4. Replace ^ with \A in multi-line mode regexes

    With the regex crate and fancy-regex, `^` in multi-line mode also
    matches at the end of a string like "test\n". There are some regexes in
    the syntax definitions like `^\s*$`, which are intended to match a blank
    line only. So change `^` to `\A` which only matches at the beginning of
    text.
    robinst committed Nov 29, 2019
    Configuration menu
    Copy the full SHA
    085c9d3 View commit details
    Browse the repository at this point in the history
  5. Fix code that skips a character to work with unicode

    Note that this wasn't a problem with Oniguruma because it works on UTF-8
    bytes, but fancy-regex works on characters.
    robinst committed Nov 29, 2019
    Configuration menu
    Copy the full SHA
    6214e6f View commit details
    Browse the repository at this point in the history
  6. Fix rewriting of "newlines" mode regexes

    Always adding `(?m)` for the entire regex meant that `.` also changed meaning,
    which is not what we want. The safer option is to use `(?m:$)` for `$` only.
    
    That also means we don't have to bother with `\A`. But we do need to parse
    look-behinds because we can't use `(?m:$)` in it.
    robinst committed Nov 29, 2019
    Configuration menu
    Copy the full SHA
    6842e7b View commit details
    Browse the repository at this point in the history
  7. Remove special treatment of look-behind

    Turns out `(?m:$)` works in look-behinds, just not `(?m)$(?-m)` which I was
    using before.
    robinst committed Nov 29, 2019
    Configuration menu
    Copy the full SHA
    fe28a3c View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2020

  1. Move all regex usage to separate module

    That way we can add fancy-regex support behind a feature.
    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    174045d View commit details
    Browse the repository at this point in the history
  2. Bump fancy-regex to 0.3.0

    * Adds a std::error::Error impl for Error
    * Adds a backtracking limit to mitigate catastrophic backtracking
    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    c2b97cc View commit details
    Browse the repository at this point in the history
  3. Restore optimization of reusing Regions

    Without this, some parsing benchmarks took 30% longer to run.
    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    00885f9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a102c13 View commit details
    Browse the repository at this point in the history
  5. Add YAML parsing test

    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    37e9849 View commit details
    Browse the repository at this point in the history
  6. Compile regexes in multi-line mode for the "newlines" syntaxes

    Some of the regexes include `$` and expect it to match end of line. In
    fancy-regex, `$` means end of text by default. Adding `(?m)` activates
    multi-line mode which changes `$` to match end of line.
    
    This fixes a large number of the failed assertions with syntest.
    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    f18e015 View commit details
    Browse the repository at this point in the history
  7. Replace POSIX character classes so that they match Unicode as well

    In fancy-regex, POSIX character classes only match ASCII characters.
    Sublime's syntaxes expect them to match Unicode characters as well, so
    transform them to corresponding Unicode character classes.
    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    5a94c5e View commit details
    Browse the repository at this point in the history
  8. Replace ^ with \A in multi-line mode regexes

    With the regex crate and fancy-regex, `^` in multi-line mode also
    matches at the end of a string like "test\n". There are some regexes in
    the syntax definitions like `^\s*$`, which are intended to match a blank
    line only. So change `^` to `\A` which only matches at the beginning of
    text.
    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    5414dce View commit details
    Browse the repository at this point in the history
  9. Fix code that skips a character to work with unicode

    Note that this wasn't a problem with Oniguruma because it works on UTF-8
    bytes, but fancy-regex works on characters.
    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    b71c725 View commit details
    Browse the repository at this point in the history
  10. Fix rewriting of "newlines" mode regexes

    Always adding `(?m)` for the entire regex meant that `.` also changed meaning,
    which is not what we want. The safer option is to use `(?m:$)` for `$` only.
    
    That also means we don't have to bother with `\A`. But we do need to parse
    look-behinds because we can't use `(?m:$)` in it.
    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    5997d36 View commit details
    Browse the repository at this point in the history
  11. Remove special treatment of look-behind

    Turns out `(?m:$)` works in look-behinds, just not `(?m)$(?-m)` which I was
    using before.
    robinst authored and Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    e4bf16c View commit details
    Browse the repository at this point in the history
  12. Compiler couldn't infer type.

    Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    33f9a19 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    76bd731 View commit details
    Browse the repository at this point in the history
  14. Pick fancy-regex if no default features

    Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    1b68bf3 View commit details
    Browse the repository at this point in the history
  15. Have fancy regex the default.

    Giles Cope committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    807b60d View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2020

  1. Should be able to work with no regex lib.

    A `null` implmentation for when --no-default-features.
    Giles Cope committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    447f4b8 View commit details
    Browse the repository at this point in the history
  2. Regex tests should run if no regex feature selected.

    Giles Cope committed Mar 20, 2020
    Configuration menu
    Copy the full SHA
    d173896 View commit details
    Browse the repository at this point in the history