File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed
ql/test/library-tests/ast Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ // Array's
2+ var multiLineArray = [
3+ 'abc'
4+ 'def'
5+ 'ghi'
6+ ]
7+
8+ var singleLineArray = ['abc' , 'def' , 'ghi' ]
9+
10+ var mixedArray = ['abc' , 'def'
11+ 'ghi' ]
12+
13+ var exampleArray = [1 , 2 , 3 ]
14+ output firstElement int = exampleArray [0 ] // 1
15+ output thirdElement int = exampleArray [2 ] // 3
16+
17+ var index = 1
18+ output secondElement int = exampleArray [index ] // 2
19+
20+ // Booleans
21+ param exampleBool bool = true
22+
23+ // Integers
24+ param exampleInt int = 1
25+
26+ // Objects
27+ param singleLineObject object = {name : 'test name' , id : '123-abc' , isCurrent : true , tier : 1 }
28+
29+ param multiLineObject object = {
30+ name : 'test name'
31+ id : '123-abc'
32+ isCurrent : true
33+ tier : 1
34+ }
35+
36+ param mixedObject object = {name : 'test name' , id : '123-abc' , isCurrent : true
37+ tier : 1 }
38+
39+ // Strings
40+ // evaluates to "what's up?"
41+ var myVar = 'what\' s up?'
42+ type direction = 'north' | 'south' | 'east' | 'west'
43+ var storageName = 'storage${uniqueString (resourceGroup ().id )}'
44+
45+ // evaluates to "hello!"
46+ var myVar = '''hello!'''
47+
48+ // evaluates to "hello!" because the first newline is skipped
49+ var myVar2 = '''
50+ hello!'''
51+
52+ // evaluates to "hello!\n" because the final newline is included
53+ var myVar3 = '''
54+ hello!
55+ '''
56+
57+ // evaluates to " this\n is\n indented\n"
58+ var myVar4 = '''
59+ this
60+ is
61+ indented
62+ '''
You can’t perform that action at this time.
0 commit comments