File: test_symbols.txt

package info (click to toggle)
pygments 2.14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,496 kB
  • sloc: python: 96,379; javascript: 238; makefile: 191; sh: 80; lisp: 74
file content (78 lines) | stat: -rw-r--r-- 1,520 bytes parent folder | download | duplicates (2)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Tests that symbols are parsed as special literals

---input---
:abc_123
:abc_def
Val{:mysymbol}

# non-symbols
a:b
1:b
1.:b
a::T
a<:T
a>:T
UInt(1):UInt(2)

---tokens---
':abc_123'    Literal.String.Symbol
'\n'          Text.Whitespace

':abc_def'    Literal.String.Symbol
'\n'          Text.Whitespace

':α'          Literal.String.Symbol
'\n'          Text.Whitespace

'Val'         Keyword.Type
'{'           Punctuation
':mysymbol'   Literal.String.Symbol
'}'           Punctuation
'\n'          Text.Whitespace

'\n'          Text.Whitespace

'# non-symbols' Comment
'\n'          Text.Whitespace

'a'           Name
':'           Operator
'b'           Name
'\n'          Text.Whitespace

'1'           Literal.Number.Integer
':'           Operator
'b'           Name
'\n'          Text.Whitespace

'1.'          Literal.Number.Float
':'           Operator
'b'           Name
'\n'          Text.Whitespace

'a'           Name
'::'          Operator
'T'           Keyword.Type
'\n'          Text.Whitespace

'a'           Keyword.Type
'<:'          Operator
'T'           Keyword.Type
'\n'          Text.Whitespace

'a'           Keyword.Type
'>:'          Operator
'T'           Keyword.Type
'\n'          Text.Whitespace

'UInt'        Keyword.Type
'('           Punctuation
'1'           Literal.Number.Integer
')'           Punctuation
':'           Operator
'UInt'        Keyword.Type
'('           Punctuation
'2'           Literal.Number.Integer
')'           Punctuation
'\n'          Text.Whitespace