Python lexer

All questions regarding lexer highlighting schemes are discussed here...
Post Reply
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Python lexer

Post by ANewUser »

Hello!
Some missing things. There are symbols that are already detected but maybe in wrong style.
https://i.imgur.com/B0Lu4Su.png

Code: Select all

# string prefix r/R
r'str txt' u'str txt' b'str txt'
# the imaginary number suffix
0j 4.3J
# Python 2.x long integer suffix
34664L 1111l
# builtins
# functions
__import__ abs all any ascii bin callable chr 
compile delattr dir divmod eval 
exec format getattr globals hasattr 
hash hex id input isinstance 
issubclass iter len locals max min next oct 
ord pow print repr round setattr sorted sum vars open
# class/type related (maybe in different style as functions ?)
bool memoryview bytearray bytes classmethod 
complex dict enumerate filter float 
frozenset property int list map object range 
reversed set slice staticmethod str super tuple type zip
# exceptions related (maybe in different style ?) 
BaseException Exception TypeError StopAsyncIteration StopIteration GeneratorExit SystemExit 
KeyboardInterrupt ImportError ModuleNotFoundError OSError OSError OSError OSError EOFError RuntimeError 
RecursionError NotImplementedError NameError UnboundLocalError AttributeError SyntaxError 
IndentationError TabError LookupError IndexError KeyError ValueError UnicodeError UnicodeEncodeError 
UnicodeDecodeError UnicodeTranslateError AssertionError ArithmeticError FloatingPointError OverflowError 
ZeroDivisionError SystemError ReferenceError BufferError MemoryError Warning UserWarning 
DeprecationWarning PendingDeprecationWarning SyntaxWarning RuntimeWarning FutureWarning ImportWarning 
UnicodeWarning BytesWarning ResourceWarning ConnectionError BlockingIOError BrokenPipeError 
ChildProcessError ConnectionAbortedError ConnectionRefusedError ConnectionResetError FileExistsError 
FileNotFoundError IsADirectoryError NotADirectoryError InterruptedError PermissionError 
ProcessLookupError TimeoutError
# miscellaneous
False True None Ellipsis NotImplemented help 
Thank you!
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Good wishes.
Made fixed, styles; lexer update - in next 20 min.
Attachments
Screenshot from 2020-03-04 21-46-22.png
ANewUser
Posts: 50
Joined: 25.01.2020 12:15

Post by ANewUser »

End of string glitch: "x = r'xyz\\' # this is a comment !!!"
https://i.imgur.com/xTwHDKb.png
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

I fixed this now, seems all this is ok
Post Reply