Debian Codegraph @

tests/languages/bicep/decorator_feature.test

raw
1 @secure()
2 param demoPassword string
3 @allowed([
4 'one'
5 'two'
6 ])
7 param demoEnum string
8
9 @minLength(3)
10 @maxLength(24)
11 @description('Name of the storage account')
12 param storageAccountName string = concat(uniqueString(resourceGroup().id), 'sa')
13
14 ----------------------------------------------------
15
16 [
17 ["decorator", "@secure"], ["punctuation", "("], ["punctuation", ")"],
18 ["keyword", "param"], " demoPassword ", ["datatype", "string"],
19 ["decorator", "@allowed"], ["punctuation", "("], ["punctuation", "["],
20 ["string", "'one'"],
21 ["string", "'two'"],
22 ["punctuation", "]"], ["punctuation", ")"],
23 ["keyword", "param"], " demoEnum ", ["datatype", "string"],
24
25 ["decorator", "@minLength"],
26 ["punctuation", "("],
27 ["number", "3"],
28 ["punctuation", ")"],
29
30 ["decorator", "@maxLength"],
31 ["punctuation", "("],
32 ["number", "24"],
33 ["punctuation", ")"],
34
35 ["decorator", "@description"],
36 ["punctuation", "("],
37 ["string", "'Name of the storage account'"],
38 ["punctuation", ")"],
39
40 ["keyword", "param"],
41 " storageAccountName ",
42 ["datatype", "string"],
43 ["operator", "="],
44 ["function", "concat"],
45 ["punctuation", "("],
46 ["function", "uniqueString"],
47 ["punctuation", "("],
48 ["function", "resourceGroup"],
49 ["punctuation", "("],
50 ["punctuation", ")"],
51 ["punctuation", "."],
52 "id",
53 ["punctuation", ")"],
54 ["punctuation", ","],
55 ["string", "'sa'"],
56 ["punctuation", ")"]
57 ]
58
59 ----------------------------------------------------
60
61 Checks for functions. Also checks for unicode characters in identifiers.