File: test_cls_builtin.txt

package info (click to toggle)
pygments 2.19.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,668 kB
  • sloc: python: 105,287; javascript: 238; makefile: 142; sh: 84; lisp: 74
file content (34 lines) | stat: -rw-r--r-- 748 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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.Whitespace
'TestClass'   Name.Class
'('           Punctuation
')'           Punctuation
':'           Punctuation
'\n'          Text.Whitespace

'    '        Text
'@classmethod' Name.Decorator
'\n'          Text.Whitespace

'    '        Text
'def'         Keyword
' '           Text.Whitespace
'hello'       Name.Function
'('           Punctuation
'cls'         Name.Builtin.Pseudo
')'           Punctuation
':'           Punctuation
'\n'          Text.Whitespace

'        '    Text
'pass'        Keyword
'\n'          Text.Whitespace