tartrazine/spec/tests/python_2/test_cls_builtin.txt

35 lines
726 B
Plaintext
Raw Permalink Normal View History

2024-08-03 10:36:47 +00:00
# Tests that a cls token gets interpreted as a Token.Name.Builtin.Pseudo
---input---
class TestClass():
@classmethod
def hello(cls):
pass
---tokens---
'class' Keyword
' ' Text
'TestClass' Name.Class
'(' Punctuation
')' Punctuation
':' Punctuation
'\n' Text.Whitespace
' ' Text
'@classmethod' Name.Decorator
'\n' Text.Whitespace
' ' Text
'def' Keyword
' ' Text
'hello' Name.Function
'(' Punctuation
'cls' Name.Builtin.Pseudo
')' Punctuation
':' Punctuation
'\n' Text.Whitespace
' ' Text
'pass' Keyword
'\n' Text.Whitespace