Debian Codegraph @

tests/snippets/soong/test_variable_assignments.txt

raw
1 ---input---
2 an_int = 42
3
4 a_hex_int = 0xC001
5
6 a_string = "cool"
7
8 a_list = ["put", "stuff", "here"]
9
10 a_map = {key1: "value1", key2: ["value2"]}
11
12 test_append = ["a", "b"]
13 test_append += ["c", "d"]
14
15 multiline_list = [
16 "snap",
17 // With comments
18 "crackle",
19 /* more comments */ "pop",
20 ]
21
22 ---tokens---
23 'an_int' Name.Variable
24 ' ' Text.Whitespace
25 '=' Operator
26 ' ' Text.Whitespace
27 '42' Literal.Number.Integer
28 '\n' Text.Whitespace
29
30 '\n' Text.Whitespace
31
32 'a_hex_int' Name.Variable
33 ' ' Text.Whitespace
34 '=' Operator
35 ' ' Text.Whitespace
36 '0xC001' Literal.Number.Hex
37 '\n' Text.Whitespace
38
39 '\n' Text.Whitespace
40
41 'a_string' Name.Variable
42 ' ' Text.Whitespace
43 '=' Operator
44 ' ' Text.Whitespace
45 '"cool"' Literal.String
46 '\n' Text.Whitespace
47
48 '\n' Text.Whitespace
49
50 'a_list' Name.Variable
51 ' ' Text.Whitespace
52 '=' Operator
53 ' ' Text.Whitespace
54 '[' Punctuation
55 '"put"' Literal.String
56 ',' Punctuation
57 ' ' Text.Whitespace
58 '"stuff"' Literal.String
59 ',' Punctuation
60 ' ' Text.Whitespace
61 '"here"' Literal.String
62 ']' Punctuation
63 '\n' Text.Whitespace
64
65 '\n' Text.Whitespace
66
67 'a_map' Name.Variable
68 ' ' Text.Whitespace
69 '=' Operator
70 ' ' Text.Whitespace
71 '{' Punctuation
72 'key1' Name
73 ':' Punctuation
74 ' ' Text.Whitespace
75 '"value1"' Literal.String
76 ',' Punctuation
77 ' ' Text.Whitespace
78 'key2' Name
79 ':' Punctuation
80 ' ' Text.Whitespace
81 '[' Punctuation
82 '"value2"' Literal.String
83 ']' Punctuation
84 '}' Punctuation
85 '\n' Text.Whitespace
86
87 '\n' Text.Whitespace
88
89 'test_append' Name.Variable
90 ' ' Text.Whitespace
91 '=' Operator
92 ' ' Text.Whitespace
93 '[' Punctuation
94 '"a"' Literal.String
95 ',' Punctuation
96 ' ' Text.Whitespace
97 '"b"' Literal.String
98 ']' Punctuation
99 '\n' Text.Whitespace
100
101 'test_append' Name.Variable
102 ' ' Text.Whitespace
103 '+=' Operator
104 ' ' Text.Whitespace
105 '[' Punctuation
106 '"c"' Literal.String
107 ',' Punctuation
108 ' ' Text.Whitespace
109 '"d"' Literal.String
110 ']' Punctuation
111 '\n' Text.Whitespace
112
113 '\n' Text.Whitespace
114
115 'multiline_list' Name.Variable
116 ' ' Text.Whitespace
117 '=' Operator
118 ' ' Text.Whitespace
119 '[' Punctuation
120 '\n ' Text.Whitespace
121 '"snap"' Literal.String
122 ',' Punctuation
123 '\n ' Text.Whitespace
124 '// With comments' Comment.Single
125 '\n ' Text.Whitespace
126 '"crackle"' Literal.String
127 ',' Punctuation
128 '\n ' Text.Whitespace
129 '/* more comments */' Comment.Multiline
130 ' ' Text.Whitespace
131 '"pop"' Literal.String
132 ',' Punctuation
133 '\n' Text.Whitespace
134
135 ']' Punctuation
136 '\n' Text.Whitespace