diff options
| author | Matheus Richard <matheusrichardt@gmail.com> | 2024-01-19 11:19:28 -0300 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-04-23 15:20:16 +0000 |
| commit | 99a46d7fe92ca706ed92377084759d92137d7ad4 (patch) | |
| tree | 53205c42e67bc05ec888ca1f9041481d509e7acb | |
| parent | b62ab952e354ed967ba3c3e2811e91e5d1c533b0 (diff) | |
[ruby/prism] Document UnlessNode fields
https://github.com/ruby/prism/commit/eee8276ae6
| -rw-r--r-- | prism/config.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml index 92e72bd00f..36be735d05 100644 --- a/prism/config.yml +++ b/prism/config.yml @@ -3392,18 +3392,56 @@ nodes: fields: - name: keyword_loc type: location + comment: | + The location of the `unless` keyword. + + unless cond then bar end + ^^^^^^ + + bar unless cond + ^^^^^^ - name: predicate type: node + comment: | + The condition to be evaluated for the unless expression. Can be any + kind of node that represents a non-void expression. + + unless cond then bar end + ^^^^ + + bar unless cond + ^^^^ - name: then_keyword_loc type: location? + comment: + The location of the `then` keyword, if present. + + unless cond then bar end + ^^^^ - name: statements type: node? kind: StatementsNode + comment: | + The body of statements that will executed if the unless condition is + falsey. Will be `nil` if no body is provided. + + unless cond then bar end + ^^^ - name: consequent type: node? kind: ElseNode + comment: | + The else clause of the unless expression, if present. + + unless cond then bar else baz end + ^^^^^^^^ - name: end_keyword_loc type: location? + comment: | + The location of the `end` keyword, if present. + + unless cond then bar end + ^^^ newline: predicate comment: | Represents the use of the `unless` keyword, either in the block form or the modifier form. |
