summaryrefslogtreecommitdiffstats
path: root/tests/snippets/crystal/test_percent_strings_special.txt
blob: 4ca1c0b2a59fd7dd506dd51405bdfdd470540209 (plain)
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