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

Adds gen_substrs support #2

Closed
wants to merge 4 commits into from

Commits on Sep 19, 2024

  1. feat: initial noir support (#1)

    olehmisar authored and ewynx committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    8ded16e View commit details
    Browse the repository at this point in the history
  2. Added gen_substrs support for Noir. This works both in decomposed & r…

    …aw setting.
    
    The substrings are returned as BoundedVec since we don't know their exact length upfront, but we know they're not longer than N.
    To support both settings (decomposed and raw) we have to use `substring_ranges` instead of `substring_boundaries`.
    ewynx committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    db2e129 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    33736ca View commit details
    Browse the repository at this point in the history
  4. Per state 1 or more substrings will be extracted, depending on the re…

    …gex and input. This fix makes sure this is supported.
    
    Changes:
    - regex_match returns a Vec of substrings instead of an array with known length
    - per state where substrings have to be extracted; add the byte either to a new substring or an already started one
    
    Note that substr_count is used to extract the correct "current" substring from the Vec. This is a workaround - first implementation was using `pop` but this gave an error.
    ewynx committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    f7ae186 View commit details
    Browse the repository at this point in the history