Skip to content

Commit 9dbd299

Browse files
committed
Stop parsing "," as part of lambda definition.
1 parent c9a3e41 commit 9dbd299

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

grammars/MagicPython.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ repository:
11341134
name: "keyword.control.flow.python"
11351135
}
11361136
{
1137-
match: "\\b(lambda)\\s*?([,\\n]|$)"
1137+
match: "\\b(lambda)\\s*?(?=[,\\n]|$)"
11381138
captures:
11391139
"1":
11401140
name: "storage.type.function.lambda.python"

grammars/MagicPython.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@
17551755
</dict>
17561756
<dict>
17571757
<key>match</key>
1758-
<string>\b(lambda)\s*?([,\n]|$)</string>
1758+
<string>\b(lambda)\s*?(?=[,\n]|$)</string>
17591759
<key>captures</key>
17601760
<dict>
17611761
<key>1</key>

grammars/src/MagicPython.syntax.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ repository:
897897
- match: ((?<=\.)lambda|lambda(?=\s*[\.=]))
898898
captures:
899899
'1': {name: keyword.control.flow.python}
900-
- match: \b(lambda)\s*?([,\n]|$)
900+
- match: \b(lambda)\s*?(?=[,\n]|$)
901901
captures:
902902
'1': {name: storage.type.function.lambda.python}
903903
- name: meta.lambda-function.python

0 commit comments

Comments
 (0)