Skip to content

Commit 9b3681a

Browse files
committed
Fix function calls highlighting
1 parent 6f8d167 commit 9b3681a

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

grammars/MagicPython.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ repository:
14521452
include: "#illegal-names"
14531453
}
14541454
{
1455-
match: "\\b([[:alpha:]_]\\w*)\\s*(=)"
1455+
match: "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)"
14561456
captures:
14571457
"1":
14581458
name: "variable.parameter.function-call.python"

grammars/MagicPython.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,7 @@ it's not tokenized as ellipsis.
23322332
</dict>
23332333
<dict>
23342334
<key>match</key>
2335-
<string>\b([[:alpha:]_]\w*)\s*(=)</string>
2335+
<string>\b([[:alpha:]_]\w*)\s*(=)(?!=)</string>
23362336
<key>captures</key>
23372337
<dict>
23382338
<key>1</key>

grammars/src/MagicPython.syntax.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ repository:
973973
'2': {name: keyword.operator.unpacking.arguments.python}
974974
- include: '#lambda-incomplete'
975975
- include: '#illegal-names'
976-
- match: '\b([[:alpha:]_]\w*)\s*(=)'
976+
- match: '\b([[:alpha:]_]\w*)\s*(=)(?!=)'
977977
captures:
978978
'1': {name: variable.parameter.function-call.python}
979979
'2': {name: keyword.operator.assignment.python}

test/expressions/expr16.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
foo(djsgfjs==123)
2+
3+
4+
5+
foo : meta.function-call.generic.python, meta.function-call.python, source.python
6+
( : meta.function-call.python, punctuation.definition.arguments.begin.python, source.python
7+
djsgfjs : meta.function-call.arguments.python, meta.function-call.python, source.python
8+
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
9+
= : keyword.operator.assignment.python, meta.function-call.arguments.python, meta.function-call.python, source.python
10+
123 : constant.numeric.dec.python, meta.function-call.arguments.python, meta.function-call.python, source.python
11+
) : meta.function-call.python, punctuation.definition.arguments.end.python, source.python

0 commit comments

Comments
 (0)