Matthew Fosdick

Results 105 comments of Matthew Fosdick

Does > check/fix the tag_as: in oneOrMoreOf() or zeroOrMoreOf() Refer to the fact that the pattern below will only give the last `foo` the scope of `test.foo`? If so, I...

> That we could use Pattern.new in the guides/explanations to be consistent with PatternRange.new() That sounds good. > I was thinking it would be a warning just like the zero-length...

Another check that might be worth considering is wrong ordering of patterns with a common prefix. If a pattern set contains the following patterns: ```regex ... [A-Z_]+ # pattern 1...

Yeah, ``` for any pattern A of the pattern set 2..N: for each pattern B in the range 1..A-1: if B is a prefix of A, issue a warning/error ```...

the `zeroLengthStart` is a bit over-cautious, in particular, \G is usually intentional, and as such \G should not be enough to trigger the warning. One possible solution is to do...

Depending on whether you plan on supporting generating atom themes, you may want to split tag_as by the space character and generate multiple captures. See https://github.com/microsoft/vscode-textmate/issues/108#issuecomment-522197256

It's somewhat of an odd case, but should the grammar generator detect when you are using a start of line anchor inside a sub match, and then rewrite it so...

Since quite a few check items and potential additions perform transformations on the patterns, there should be some way of enabling logging whenever a transformation occurs.

That sounds pretty nice. I have two concerns: 1. The mapping should probably be stateless; 2. Rerunning `npm run build` should not change the generated grammar(builds should be reproducible) so...

With a unified export, to another grammar or to a file, how does an import look like?