You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing my first TextMate grammar and I can't figure out why (<->) rule does not math.
This is my pikchr.tmLanguage.json and my code sample is arrow <-> down 70% from last box.s.
To see that the rule doesn't match I run npm run inspect pikchr.tmLanguage.json example.pikchr
@@scanNext 5: | <-> down 70% from last box.s\n|
scanning for (linePos: 5, anchorPosition: 5)
- -1: \s*([\n;])
- 13: ^\s*from)\s+
- 23: (\bthen\b)?\s*(\bgo\b)?\s*\b(right|down|left|up)\b
- 27: \b(\d*\.)?\d+(in|cm|px|pt|pc|mm|%)?(^|\s)
- 28: ^[a-z_$@][\w$@]*
- 29: \b(red|green|blue)\b
- 30: %
- 31: \b(close)\b
- 32: (?=\s*")
- 35: \b(diameter|ht|height|rad|radius|thickness|width|wid)(\s+)
- 37: (<->)
- 38: \b(same|cw|ccw|invis(ible)?|thick|thin|solid|chop|fit)\b
- 4: \#(\s.+)?(\n|$)
- 5: /\*
- 6: (//).*$\n?
- 8: ^\s*(box|circle|ellipse|oval|cylinder|file|line|arrow|spline|dot|arc|text|move)\b
- 32: (?=\s*")
no more matches.
token: | <-> down 70% from last box.s\n|
* source.pikchr
When I enable regexp debugging by adding | 8 to options (
I haven't test it but you do have 2 errors in "path-attribute"
Thank you, @RedCMD. I do. How did you get that nice highlighting? Fixing this, fixed the matching. I will keep the issue open, as I hope to see inspect command to not hide this kind of errors.
Hello!
I'm writing my first TextMate grammar and I can't figure out why
(<->)
rule does not math.This is my pikchr.tmLanguage.json and my code sample is
arrow <-> down 70% from last box.s
.To see that the rule doesn't match I run
npm run inspect pikchr.tmLanguage.json example.pikchr
When I enable regexp debugging by adding
| 8
to options (vscode-textmate/src/rule.ts
Line 884 in 8b07a3c
const result = this.scanner.findNextMatchSync(string, startPosition, options | 8);
the rule
(<->)
does match. Does anyone have any ideas what's going on? I'm using main branch and node v18.18.0.The text was updated successfully, but these errors were encountered: