Skip to content

Commit dd25903

Browse files
committed
Update some examples and tests
- Update function call statements test - Update long string examples and tests
1 parent bfd7b50 commit dd25903

File tree

3 files changed

+47
-21
lines changed

3 files changed

+47
-21
lines changed

examples/lua5.4-grammar.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ FLAGS:
7070
-V, --version Prints version information
7171
]])
7272
print([=[
73-
[[Fruits]]
74-
- Banana
75-
- Orange
76-
- Apple
73+
Write-Information
74+
[-MessageData] <Object>
75+
[[-Tags] <String[]>]
76+
[<CommonParameters>]
7777
]=])
7878

7979
-- function definitions

test/corpus/expressions.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ FLAGS:
235235
-V, --version Prints version information
236236
]])
237237
print([=[
238-
[[Fruits]]
239-
- Banana
240-
- Orange
241-
- Apple
238+
Write-Information
239+
[-MessageData] <Object>
240+
[[-Tags] <String[]>]
241+
[<CommonParameters>]
242242
]=])
243243

244244
--------------------------------------------------------------------------------

test/corpus/statements.txt

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,34 +74,60 @@ local circumference, nothing<close> = 2 * pi * 24
7474
function calls (as statement)
7575
================================================================================
7676

77-
print()
78-
print("hi!")
79-
print(math.random())
77+
print(_G)
78+
print''
79+
print""
80+
print[[]]
81+
print{}
82+
83+
io.output()
84+
io.output():read()
8085

8186
--------------------------------------------------------------------------------
8287

8388
(chunk
8489
(function_call
8590
(variable
8691
name: (identifier))
87-
arguments: (argument_list))
92+
arguments: (argument_list
93+
(expression_list
94+
(variable
95+
name: (identifier)))))
8896
(function_call
8997
(variable
9098
name: (identifier))
9199
arguments: (argument_list
92-
(expression_list
93-
(string))))
100+
(string)))
94101
(function_call
95102
(variable
96103
name: (identifier))
97104
arguments: (argument_list
98-
(expression_list
99-
(function_call
100-
(variable
101-
table: (variable
102-
name: (identifier))
103-
field: (identifier))
104-
arguments: (argument_list))))))
105+
(string)))
106+
(function_call
107+
(variable
108+
name: (identifier))
109+
arguments: (argument_list
110+
(string)))
111+
(function_call
112+
(variable
113+
name: (identifier))
114+
arguments: (argument_list
115+
(table)))
116+
(function_call
117+
(variable
118+
table: (variable
119+
name: (identifier))
120+
field: (identifier))
121+
arguments: (argument_list))
122+
(function_call
123+
(function_call
124+
(variable
125+
table: (variable
126+
name: (identifier))
127+
field: (identifier))
128+
arguments: (argument_list))
129+
method: (identifier)
130+
arguments: (argument_list)))
105131

106132
================================================================================
107133
labels

0 commit comments

Comments
 (0)