File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,20 @@ type valueMatcher struct {
1919 existsTransitions []* fieldMatcher
2020}
2121
22+ // smallStep is used by the valueMatcher automaton - every step through the automaton requires a smallTable and for
23+ // some of them, taking the step means you've matched a value and can transition to a new fieldMatcher. Since there
24+ // are lots of steps, we don't want to carry the []*fieldMatcher information around on the vast majority of
25+ // of steps that don't have any such transitions. So a smallStep can be either just a smallTable or ar a smallTable
26+ // with an attached *fieldMatcher slice
2227type smallStep interface {
2328 SmallTable () * smallTable
2429 SmallTransition () * smallTransition
2530 HasTransition () bool
2631}
2732
2833// ValueTerminator - whenever we're trying to match a value, we virtually add one of these as the last character, both
29- // when building the automaton and matching a value. This simplifies things because you can write a pattern to
30- // match for example "foo" by writing it as
34+ // when building the automaton and matching a value. This simplifies things because you don't have to treat
35+ // absolute-string- match (only works at last char in value) and prefix match differently.
3136const ValueTerminator byte = 0xf5
3237
3338type smallTransition struct {
You can’t perform that action at this time.
0 commit comments