Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,11 @@ flags:
- name: IGNORE_VISIBILITY
comment: "a call that ignores method visibility"
comment: Flags for call nodes.
- name: EmbeddedStatementsNodeFlags
values:
- name: LITERAL_CONTENT
comment: "the interpolation contributes literal string content to the enclosing literal"
comment: Flags for embedded statements nodes.
- name: EncodingFlags
values:
- name: FORCED_UTF8_ENCODING
Expand All @@ -1268,11 +1273,23 @@ flags:
comment: "frozen by virtue of a `frozen_string_literal: true` comment or `--enable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'`"
- name: MUTABLE
comment: "mutable by virtue of a `frozen_string_literal: false` comment or `--disable-frozen-string-literal`; only for adjacent string literals like `'a' 'b'`"
comment: Flags for interpolated string nodes that indicated mutability if they are also marked as literals.
- name: LITERAL_CONTENT
comment: "Ruby treats the entire string as a single string literal"
comment: Flags for interpolated string nodes.
- name: InterpolatedSymbolNodeFlags
values:
- name: CONTAINS_INTERPOLATION
comment: "the symbol contains an embedded expression or variable"
comment: Flags for interpolated symbol nodes.
- name: InterpolatedXStringNodeFlags
values:
- name: LITERAL_CONTENT
comment: "Ruby treats the command text passed to backtick as a single string literal"
comment: Flags for interpolated xstring nodes.
- name: KeywordHashNodeFlags
values:
- name: SYMBOL_KEYS
comment: "a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments"
comment: "all entries are associations with literal symbol keys, including symbol text split by a heredoc"
comment: Flags for keyword hash nodes.
- name: LoopFlags
values:
Expand Down Expand Up @@ -1318,6 +1335,8 @@ flags:
comment: "internal bytes forced the encoding to binary"
- name: FORCED_US_ASCII_ENCODING
comment: "internal bytes forced the encoding to US-ASCII"
- name: CONTAINS_INTERPOLATION
comment: "the regexp contains an embedded expression or variable"
comment: Flags for regular expression and match last line nodes.
- name: ShareableConstantNodeFlags
values:
Expand Down Expand Up @@ -1548,6 +1567,9 @@ nodes:
comment: |
Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i.

When `static_literal?` is set, each evaluation can shallow-copy an array
of precomputed elements.

[1, 2, 3]
^^^^^^^^^
- name: ArrayPatternNode
Expand Down Expand Up @@ -2935,6 +2957,7 @@ nodes:
if a then b else c end
^^^^^^^^^^
- name: EmbeddedStatementsNode
flags: EmbeddedStatementsNodeFlags
fields:
- name: opening_loc
type: location
Expand All @@ -2948,6 +2971,10 @@ nodes:

"foo #{bar}"
^^^^^^

The `literal_content?` flag is set on `#{begin "a" end}`, which folds
into the enclosing literal. A leading semicolon in `#{; "a"}` keeps
the interpolation as a runtime expression.
- name: EmbeddedVariableNode
fields:
- name: operator_loc
Expand Down Expand Up @@ -3359,6 +3386,10 @@ nodes:
comment: |
Represents a hash literal.

When `static_literal?` is set, each evaluation can shallow-copy a hash
of precomputed keys and values. Ruby freezes literal string keys, so
`{"a" "b" => 1}` has the flag even when string literals are mutable.

{ a => b }
^^^^^^^^^^
- name: HashPatternNode
Expand Down Expand Up @@ -3887,7 +3918,12 @@ nodes:

"foo #{bar} baz"
^^^^^^^^^^^^^^^^

Adjacent literals such as `"a" "b"` have `literal_content?` set. In
`"a#{"b"}"`, only the interpolation has the flag. Dedenting a squiggly
heredoc can fold such an interpolation into the surrounding literal.
- name: InterpolatedSymbolNode
flags: InterpolatedSymbolNodeFlags
fields:
- name: opening_loc
type: location?
Expand All @@ -3906,6 +3942,7 @@ nodes:
:"foo #{bar} baz"
^^^^^^^^^^^^^^^^^
- name: InterpolatedXStringNode
flags: InterpolatedXStringNodeFlags
fields:
- name: opening_loc
type: location
Expand All @@ -3923,6 +3960,9 @@ nodes:

`foo #{bar} baz`
^^^^^^^^^^^^^^^^

The `literal_content?` flag describes the command text passed to
backtick. The backtick call itself is evaluated at runtime.
- name: ItLocalVariableReadNode
comment: |
Represents reading from the implicit `it` local variable.
Expand Down
15 changes: 15 additions & 0 deletions rbi/generated/prism/dot_visitor.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions rbi/generated/prism/dsl.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading