File: test_percent_strings_special.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 (31 lines) | stat: -rw-r--r-- 868 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
---input---
%Q(hello \n #{name})
%q(hello \n #{name})
%w(foo\nbar baz)

---tokens---
'%Q('         Literal.String.Other
'hello '      Literal.String.Other
'\\n'         Literal.String.Escape
' '           Literal.String.Other
'#{'          Literal.String.Interpol
'name'        Name
'}'           Literal.String.Interpol
')'           Literal.String.Other
'\n'          Text.Whitespace

'%q('         Literal.String.Other
'hello '      Literal.String.Other
'\\'          Literal.String.Other
'n '          Literal.String.Other
'#'           Literal.String.Other
'{name}'      Literal.String.Other
')'           Literal.String.Other
'\n'          Text.Whitespace

'%w('         Literal.String.Other
'foo'         Literal.String.Other
'\\'          Literal.String.Other
'nbar baz'    Literal.String.Other
')'           Literal.String.Other
'\n'          Text.Whitespace