Skip to content

Small remarks and questions #1

@ExpHP

Description

@ExpHP

Hi, I think this package is a really cool concept! I was working through this code and adapting it to Rust (code not yet published), and a number of questions and comments arose.

These ones are pretty small so I've collected them into one issue. Here's a checklist, which I think(?) you will have the power to edit:

  • matchInput inconsistency with epsilon
  • REST_MISMATCH is dead code(?)
  • confusing initialization of cache in toGlobHelper

matchInput inconsistency with epsilon

Currently, matchInput('**/*', '') = '', because this line does not check the length of b. Since all other matches involving epsilon fail (presumably because epsilon edges were already treated earlier in the code), I assume this is an oversight?

REST_MISMATCH is dead code(?)

Is REST_MISMATCH a leftover from some debugging work? It appears that toGlobHelper is unnecessary and match_brackets is always true.

confusing initialization of cache in toGlobHelper

cache is initialized with some empty strings, but later is seen to contain arrays. Eliminating the initialization lines don't break any test cases, so it seems okay to remove?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions