Debian Codegraph @

tests/snippets/cython/test_classes.txt

raw
1 ---input---
2 from libcpp.vector import vector
3
4 cdef class MyClass:
5 cdef readonly unsigned char variable
6 cdef public vector[int]* array
7
8 def __cinit__(self, arg1: unsigned char):
9 self.array = new vector[int]()
10 self.variable = arg1
11
12 def __dealloc__(self):
13 del self.array
14
15 ---tokens---
16 'from' Keyword
17 ' ' Text.Whitespace
18 'libcpp.vector' Name.Namespace
19 ' ' Text.Whitespace
20 'import' Keyword
21 ' ' Text
22 'vector' Name
23 '\n' Text.Whitespace
24
25 '\n' Text.Whitespace
26
27 'cdef' Keyword
28 ' ' Text.Whitespace
29 'class' Keyword
30 ' ' Text.Whitespace
31 'MyClass' Name.Class
32 ':' Punctuation
33 '\n' Text.Whitespace
34
35 ' ' Text
36 'cdef' Keyword
37 ' ' Text.Whitespace
38 'readonly' Keyword.Reserved
39 ' ' Text
40 'unsigned' Keyword.Type
41 ' ' Text
42 'char' Keyword.Type
43 ' ' Text
44 'variable' Name.Variable
45 '\n' Text.Whitespace
46
47 ' ' Text
48 'cdef' Keyword
49 ' ' Text.Whitespace
50 'public' Keyword.Reserved
51 ' ' Text
52 'vector' Keyword.Type
53 '[' Text
54 'int' Keyword.Type
55 ']' Text
56 '*' Text
57 ' ' Text
58 'array' Name.Variable
59 '\n' Text.Whitespace
60
61 '\n' Text.Whitespace
62
63 ' ' Text
64 'def' Keyword
65 ' ' Text.Whitespace
66 '__cinit__' Name.Function
67 '(' Punctuation
68 'self' Name.Builtin.Pseudo
69 ',' Punctuation
70 ' ' Text
71 'arg1' Name
72 ':' Punctuation
73 ' ' Text
74 'unsigned' Name.Builtin
75 ' ' Text
76 'char' Name.Builtin
77 ')' Punctuation
78 ':' Punctuation
79 '\n' Text.Whitespace
80
81 ' ' Text
82 'self' Name.Builtin.Pseudo
83 '.' Operator
84 'array' Name
85 ' ' Text
86 '=' Operator
87 ' ' Text
88 'new' Keyword
89 ' ' Text
90 'vector' Name
91 '[' Punctuation
92 'int' Name.Builtin
93 ']' Punctuation
94 '(' Punctuation
95 ')' Punctuation
96 '\n' Text.Whitespace
97
98 ' ' Text
99 'self' Name.Builtin.Pseudo
100 '.' Operator
101 'variable' Name
102 ' ' Text
103 '=' Operator
104 ' ' Text
105 'arg1' Name
106 '\n' Text.Whitespace
107
108 '\n' Text.Whitespace
109
110 ' ' Text
111 'def' Keyword
112 ' ' Text.Whitespace
113 '__dealloc__' Name.Function
114 '(' Punctuation
115 'self' Name.Builtin.Pseudo
116 ')' Punctuation
117 ':' Punctuation
118 '\n' Text.Whitespace
119
120 ' ' Text
121 'del' Keyword
122 ' ' Text
123 'self' Name.Builtin.Pseudo
124 '.' Operator
125 'array' Name
126 '\n' Text.Whitespace