Skip to content

Commit 8ecf731

Browse files
committed
Not all builtins are types
1 parent c0daabf commit 8ecf731

File tree

4 files changed

+25
-28
lines changed

4 files changed

+25
-28
lines changed

grammars/MagicPython.YAML-tmLanguage

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -979,24 +979,23 @@ repository:
979979
match: |
980980
(?x)
981981
(?<!\.)\b(
982-
__import__ | abs | all | any | apply | callable | chr
982+
__import__ | abs | all | any | apply | ascii | bin | callable | chr
983983
| compile | copyright | credits | delattr | dir | divmod
984984
| enumerate | eval | exec | exit | filter | format | getattr
985-
| globals | hasattr | hash | help | id | input
985+
| globals | hasattr | hash | help | hex | id | input
986986
| isinstance | issubclass | iter | len | license | locals | map
987-
| max | memoryview | min | next | open | ord | pow | print
988-
| quit | range | reload | repr | round
989-
| setattr | sorted | sum | vars | zip
987+
| max | memoryview | min | next | oct | open | ord | pow | print
988+
| quit | range | reload | repr | reversed | round
989+
| setattr | sorted | sum | super | vars | zip
990990
)\b
991991
builtin-types:
992992
name: support.type.python
993993
match: |
994994
(?x)
995995
(?<!\.)\b(
996-
ascii | bin | bool | bytearray | bytes
997-
| classmethod | complex | dict | float | frozenset
998-
| hex | int | list | object | oct | property | reversed
999-
| set | slice | staticmethod | str | super | tuple | type
996+
bool | bytearray | bytes | classmethod | complex | dict
997+
| float | frozenset | int | list | object | property
998+
| set | slice | staticmethod | str | tuple | type
1000999
)\b
10011000
10021001
magic-function-names:

grammars/MagicPython.cson

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,14 +1535,14 @@ repository:
15351535
match: '''
15361536
(?x)
15371537
(?<!\\.)\\b(
1538-
__import__ | abs | all | any | apply | callable | chr
1538+
__import__ | abs | all | any | apply | ascii | bin | callable | chr
15391539
| compile | copyright | credits | delattr | dir | divmod
15401540
| enumerate | eval | exec | exit | filter | format | getattr
1541-
| globals | hasattr | hash | help | id | input
1541+
| globals | hasattr | hash | help | hex | id | input
15421542
| isinstance | issubclass | iter | len | license | locals | map
1543-
| max | memoryview | min | next | open | ord | pow | print
1544-
| quit | range | reload | repr | round
1545-
| setattr | sorted | sum | vars | zip
1543+
| max | memoryview | min | next | oct | open | ord | pow | print
1544+
| quit | range | reload | repr | reversed | round
1545+
| setattr | sorted | sum | super | vars | zip
15461546
)\\b
15471547
15481548
'''
@@ -1551,10 +1551,9 @@ repository:
15511551
match: '''
15521552
(?x)
15531553
(?<!\\.)\\b(
1554-
ascii | bin | bool | bytearray | bytes
1555-
| classmethod | complex | dict | float | frozenset
1556-
| hex | int | list | object | oct | property | reversed
1557-
| set | slice | staticmethod | str | super | tuple | type
1554+
bool | bytearray | bytes | classmethod | complex | dict
1555+
| float | frozenset | int | list | object | property
1556+
| set | slice | staticmethod | str | tuple | type
15581557
)\\b
15591558
15601559
'''

grammars/MagicPython.tmLanguage

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,14 +2649,14 @@
26492649
<key>match</key>
26502650
<string>(?x)
26512651
(?&lt;!\.)\b(
2652-
__import__ | abs | all | any | apply | callable | chr
2652+
__import__ | abs | all | any | apply | ascii | bin | callable | chr
26532653
| compile | copyright | credits | delattr | dir | divmod
26542654
| enumerate | eval | exec | exit | filter | format | getattr
2655-
| globals | hasattr | hash | help | id | input
2655+
| globals | hasattr | hash | help | hex | id | input
26562656
| isinstance | issubclass | iter | len | license | locals | map
2657-
| max | memoryview | min | next | open | ord | pow | print
2658-
| quit | range | reload | repr | round
2659-
| setattr | sorted | sum | vars | zip
2657+
| max | memoryview | min | next | oct | open | ord | pow | print
2658+
| quit | range | reload | repr | reversed | round
2659+
| setattr | sorted | sum | super | vars | zip
26602660
)\b
26612661
</string>
26622662
</dict>
@@ -2667,10 +2667,9 @@
26672667
<key>match</key>
26682668
<string>(?x)
26692669
(?&lt;!\.)\b(
2670-
ascii | bin | bool | bytearray | bytes
2671-
| classmethod | complex | dict | float | frozenset
2672-
| hex | int | list | object | oct | property | reversed
2673-
| set | slice | staticmethod | str | super | tuple | type
2670+
bool | bytearray | bytes | classmethod | complex | dict
2671+
| float | frozenset | int | list | object | property
2672+
| set | slice | staticmethod | str | tuple | type
26742673
)\b
26752674
</string>
26762675
</dict>

test/builtins/builtins1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
BaseException : source.python, support.type.exception.python
2929
sum : source.python, support.function.builtin.python
3030
: source.python
31-
oct : source.python, support.type.python
31+
oct : source.python, support.function.builtin.python
3232
: source.python
3333
abs : source.python, support.function.builtin.python
3434
: source.python

0 commit comments

Comments
 (0)