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
Copy file name to clipboardExpand all lines: grammars/MagicPython.cson
+9
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,9 @@ patterns: [
27
27
}
28
28
]
29
29
repository:
30
+
impossible:
31
+
comment:"This is a special rule that should be used where no match is desired. It is not a good idea to match something like '1{0}' because in some cases that can result in infinite loops in token generation. So the rule instead matches and impossible expression to allow a mathc to fail and move to the next token."
32
+
match:"$.^"
30
33
statement:
31
34
patterns: [
32
35
{
@@ -856,6 +859,12 @@ repository:
856
859
include:"#f-expression"
857
860
}
858
861
]
862
+
"fstring-illegal-multi-brace":
863
+
patterns: [
864
+
{
865
+
include:"#impossible"
866
+
}
867
+
]
859
868
"f-expression":
860
869
comment:"All valid Python expressions, except comments and line cont"
Copy file name to clipboardExpand all lines: grammars/MagicPython.tmLanguage
+17
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,13 @@
41
41
</array>
42
42
<key>repository</key>
43
43
<dict>
44
+
<key>impossible</key>
45
+
<dict>
46
+
<key>comment</key>
47
+
<string>This is a special rule that should be used where no match is desired. It is not a good idea to match something like '1{0}' because in some cases that can result in infinite loops in token generation. So the rule instead matches and impossible expression to allow a mathc to fail and move to the next token.</string>
0 commit comments