Skip to content
  • Daniel Colson's avatar
    185c4f2d
    Build symbols descending from stars with regexp · 185c4f2d
    Daniel Colson authored
    Before this commit we initialized all Symbols with the default regexp,
    then later on reassigned any symbols descending from stars with either
    their regexp from `@requirements` or the default greedy regexp.
    
    With this commit we initialize all Symbols descending from Stars with
    the greedy regexp at parse time. This allows us to get rid of the star
    branch in path/pattern, since any regexps from `@requirements` will
    already have been set in the symbol branch of this code.
    
    This is essentially an alternate version of #38901. Getting rid of the
    extra branch makes some performance work I am doing a bit easier, plus
    it saves us a few method calls. Also the constant saves us from creating
    the same regexp multiple times, and it is nice to give that regexp a
    name.
    185c4f2d
    Build symbols descending from stars with regexp
    Daniel Colson authored
    Before this commit we initialized all Symbols with the default regexp,
    then later on reassigned any symbols descending from stars with either
    their regexp from `@requirements` or the default greedy regexp.
    
    With this commit we initialize all Symbols descending from Stars with
    the greedy regexp at parse time. This allows us to get rid of the star
    branch in path/pattern, since any regexps from `@requirements` will
    already have been set in the symbol branch of this code.
    
    This is essentially an alternate version of #38901. Getting rid of the
    extra branch makes some performance work I am doing a bit easier, plus
    it saves us a few method calls. Also the constant saves us from creating
    the same regexp multiple times, and it is nice to give that regexp a
    name.
Loading