Debian Codegraph @

tests/languages/bicep/string_feature.test

raw
1 ''
2 'hello!'
3 'what\'s up?'
4 'steve'
5 'hello ${name}!'
6 '😁\u{1F642}'
7 'Microsoft.Web/sites/config@2020-12-01'
8 'https://${frontDoorName}.azurefd.net/.auth/login/aad/callback'
9
10 '''hello!'''
11 var myVar2 = '''
12 hello!'''
13 '''
14 hello!
15 '''
16 '''
17 this
18 is
19 indented
20 '''
21
22 '''
23 comments // are included
24 /* because everything is read as-is */
25 '''
26
27 '''interpolation
28 is ${blocked}'''
29
30 ----------------------------------------------------
31
32 [
33 ["string", "''"],
34 ["string", "'hello!'"],
35 ["string", "'what\\'s up?'"],
36 ["string", "'steve'"],
37 ["interpolated-string", [
38 ["string", "'hello "],
39 ["interpolation", [
40 ["punctuation", "${"],
41 ["expression", ["name"]],
42 ["punctuation", "}"]
43 ]],
44 ["string", "!'"]
45 ]],
46 ["string", "'😁\\u{1F642}'"],
47 ["string", "'Microsoft.Web/sites/config@2020-12-01'"],
48 ["interpolated-string", [
49 ["string", "'https://"],
50 ["interpolation", [
51 ["punctuation", "${"],
52 ["expression", ["frontDoorName"]],
53 ["punctuation", "}"]
54 ]],
55 ["string", ".azurefd.net/.auth/login/aad/callback'"]
56 ]],
57
58 ["string", "'''hello!'''"],
59 ["keyword", "var"],
60 " myVar2 ",
61 ["operator", "="],
62 ["string", "'''\r\nhello!'''"],
63 ["string", "'''\r\nhello!\r\n'''"],
64 ["string", "'''\r\n this\r\n is\r\n indented\r\n'''"],
65
66 ["string", "'''\r\ncomments // are included\r\n/* because everything is read as-is */\r\n'''"],
67
68 ["string", "'''interpolation\r\nis ${blocked}'''"]
69 ]
70
71 ----------------------------------------------------
72
73 Checks for strings.