Skip to content

Commit

Permalink
Update test data
Browse files Browse the repository at this point in the history
  • Loading branch information
aibaars committed Nov 3, 2020
1 parent c66fa1c commit 8e8cff0
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 109 deletions.
4 changes: 2 additions & 2 deletions test/corpus/declarations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end
---

(program
(method (operator) (method_parameters (identifier)) (string))
(method (operator) (method_parameters (identifier)) (string (string_content)))
(method (operator) (method_parameters (identifier)))
(method (operator) (method_parameters (identifier)))
(method (operator) (method_parameters (identifier)))
Expand All @@ -85,7 +85,7 @@ end
---

(program
(method_call (identifier) (argument_list (regex)))
(method_call (identifier) (argument_list (regex (string_content))))
(method (operator) (method_parameters (identifier)))
(method (operator) (method_parameters (identifier))))

Expand Down
38 changes: 19 additions & 19 deletions test/corpus/expressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ foo["bar"]

---

(program (element_reference (identifier) (string)))
(program (element_reference (identifier) (string (string_content))))

============
element reference with symbol
Expand Down Expand Up @@ -199,9 +199,9 @@ NIL = "nil"
(program
(assignment (identifier) (identifier))
(assignment (identifier) (splat_argument (identifier)))
(assignment (false) (string))
(assignment (true) (string))
(assignment (nil) (string)))
(assignment (false) (string (string_content)))
(assignment (true) (string (string_content)))
(assignment (nil) (string (string_content))))

=====================
multiple assignment
Expand Down Expand Up @@ -296,7 +296,7 @@ puts "/hi"
(operator_assignment (identifier) (identifier))
(operator_assignment (identifier) (identifier))
(operator_assignment (identifier) (identifier))
(method_call (identifier) (argument_list (string))))
(method_call (identifier) (argument_list (string (string_content)))))

==========
operator assignment
Expand Down Expand Up @@ -351,7 +351,7 @@ conditional and character literal ambiguity
true ?")":"c"

---
(program (conditional (true) (string) (string)))
(program (conditional (true) (string (string_content)) (string (string_content))))

===========================================
conditional with reserved identifiers
Expand Down Expand Up @@ -583,10 +583,10 @@ print("hello")
arguments: (argument_list))
(method_call
method: (identifier)
arguments: (argument_list (string)))
arguments: (argument_list (string (string_content))))
(method_call
method: (identifier)
arguments: (argument_list (string))))
arguments: (argument_list (string (string_content)))))

====================================
nested unparenthesized method calls
Expand Down Expand Up @@ -668,22 +668,22 @@ foo.bar("hi", 2)
method: (call
receiver: (identifier)
method: (identifier))
arguments: (argument_list (string)))
arguments: (argument_list (string (string_content))))
(method_call
method: (call
receiver: (identifier)
method: (identifier))
arguments: (argument_list (string) (integer)))
arguments: (argument_list (string (string_content)) (integer)))
(method_call
method: (call
receiver: (identifier)
method: (identifier))
arguments: (argument_list (string)))
arguments: (argument_list (string (string_content))))
(method_call
method: (call
receiver: (identifier)
method: (identifier))
arguments: (argument_list (string) (integer))))
arguments: (argument_list (string (string_content)) (integer))))

===============================
implicit call
Expand Down Expand Up @@ -921,7 +921,7 @@ foo *(bar.baz)
(program
(method_call (identifier) (argument_list (splat_argument (identifier))))
(method_call (identifier) (argument_list (splat_argument (identifier))))
(method_call (identifier) (argument_list (splat_argument (string_array (bare_string) (bare_string)))))
(method_call (identifier) (argument_list (splat_argument (string_array (bare_string (string_content)) (bare_string (string_content))))))
(method_call (identifier) (argument_list (splat_argument (parenthesized_statements (call (identifier) (identifier)))))))

===============================
Expand Down Expand Up @@ -1365,10 +1365,10 @@ foo \
(method_call
(identifier)
(argument_list (identifier) (identifier)))
(string (escape_sequence))
(string (string_content) (escape_sequence) (string_content))
(method_call
(identifier)
(argument_list (string))))
(argument_list (string (string_content)))))

===============================
basic division
Expand Down Expand Up @@ -1408,7 +1408,7 @@ foo /bar/
---

(program
(method_call (identifier) (argument_list (regex))))
(method_call (identifier) (argument_list (regex (string_content)))))

===============================
regex with opening space
Expand All @@ -1419,7 +1419,7 @@ foo

---

(program (identifier) (regex))
(program (identifier) (regex (string_content)))

===============================
forward slash operator as method
Expand All @@ -1430,7 +1430,7 @@ Foo / "bar"

---

(program (binary (constant) (string)) (string))
(program (binary (constant) (string (string_content))) (string (string_content)))

===============================
multiline regex
Expand All @@ -1441,4 +1441,4 @@ multiline regex

---

(program (regex))
(program (regex (string_content)))
2 changes: 1 addition & 1 deletion test/corpus/line-endings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ x = foo()
---

(program
(method_call (identifier) (argument_list (string)))
(method_call (identifier) (argument_list (string (string_content))))
(assignment (identifier) (method_call (identifier) (argument_list))))

=======================
Expand Down
Loading

0 comments on commit 8e8cff0

Please sign in to comment.