sig/prism.rbs in prism-0.18.0 vs sig/prism.rbs in prism-0.19.0
- old
+ new
@@ -98,47 +98,50 @@
# Represents a set of arguments to a method or a keyword.
#
# return foo, bar, baz
# ^^^^^^^^^^^^^
class ArgumentsNode < Node
- attr_reader arguments: Array[Node]
attr_reader flags: Integer
+ attr_reader arguments: Array[Node]
- def initialize: (arguments: Array[Node], flags: Integer, location: Location) -> void
+ def initialize: (flags: Integer, arguments: Array[Node], location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> ArgumentsNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
- def keyword_splat?: () -> bool
+ def contains_keyword_splat?: () -> bool
def inspect: (inspector: NodeInspector) -> String
end
# Represents an array literal. This can be a regular array using brackets or
# a special array using % like %w or %i.
#
# [1, 2, 3]
# ^^^^^^^^^
class ArrayNode < Node
+ attr_reader flags: Integer
attr_reader elements: Array[Node]
attr_reader opening_loc: Location?
attr_reader closing_loc: Location?
- def initialize: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
+ def initialize: (flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> ArrayNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def contains_splat?: () -> bool
+
def opening: () -> String?
def closing: () -> String?
def inspect: (inspector: NodeInspector) -> String
@@ -322,16 +325,17 @@
#
# [1, 2, 3].each { |i| puts x }
# ^^^^^^^^^^^^^^
class BlockNode < Node
attr_reader locals: Array[Symbol]
- attr_reader parameters: BlockParametersNode?
+ attr_reader locals_body_index: Integer
+ attr_reader parameters: Node?
attr_reader body: Node?
attr_reader opening_loc: Location
attr_reader closing_loc: Location
- def initialize: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void
+ def initialize: (locals: Array[Symbol], locals_body_index: Integer, parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
@@ -424,37 +428,39 @@
# Represents the use of the `&&=` operator on a call.
#
# foo.bar &&= value
# ^^^^^^^^^^^^^^^^^
class CallAndWriteNode < Node
+ attr_reader flags: Integer
attr_reader receiver: Node?
attr_reader call_operator_loc: Location?
attr_reader message_loc: Location?
- attr_reader flags: Integer
attr_reader read_name: Symbol
attr_reader write_name: Symbol
attr_reader operator_loc: Location
attr_reader value: Node
- def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
+ def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> CallAndWriteNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
- def call_operator: () -> String?
-
- def message: () -> String?
-
def safe_navigation?: () -> bool
def variable_call?: () -> bool
+ def attribute_write?: () -> bool
+
+ def call_operator: () -> String?
+
+ def message: () -> String?
+
def operator: () -> String
def inspect: (inspector: NodeInspector) -> String
end
# Represents a method call, in all of the various forms that can take.
@@ -475,113 +481,160 @@
# ^^^^^^^
#
# foo&.bar
# ^^^^^^^^
class CallNode < Node
+ attr_reader flags: Integer
attr_reader receiver: Node?
attr_reader call_operator_loc: Location?
+ attr_reader name: Symbol
attr_reader message_loc: Location?
attr_reader opening_loc: Location?
attr_reader arguments: ArgumentsNode?
attr_reader closing_loc: Location?
attr_reader block: Node?
- attr_reader flags: Integer
- attr_reader name: Symbol
- def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: Symbol, location: Location) -> void
+ def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> CallNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def safe_navigation?: () -> bool
+
+ def variable_call?: () -> bool
+
+ def attribute_write?: () -> bool
+
def call_operator: () -> String?
def message: () -> String?
def opening: () -> String?
def closing: () -> String?
- def safe_navigation?: () -> bool
-
- def variable_call?: () -> bool
-
def inspect: (inspector: NodeInspector) -> String
end
# Represents the use of an assignment operator on a call.
#
# foo.bar += baz
# ^^^^^^^^^^^^^^
class CallOperatorWriteNode < Node
+ attr_reader flags: Integer
attr_reader receiver: Node?
attr_reader call_operator_loc: Location?
attr_reader message_loc: Location?
- attr_reader flags: Integer
attr_reader read_name: Symbol
attr_reader write_name: Symbol
attr_reader operator: Symbol
attr_reader operator_loc: Location
attr_reader value: Node
- def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
+ def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> CallOperatorWriteNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
- def call_operator: () -> String?
-
- def message: () -> String?
-
def safe_navigation?: () -> bool
def variable_call?: () -> bool
+ def attribute_write?: () -> bool
+
+ def call_operator: () -> String?
+
+ def message: () -> String?
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents the use of the `||=` operator on a call.
#
# foo.bar ||= value
# ^^^^^^^^^^^^^^^^^
class CallOrWriteNode < Node
+ attr_reader flags: Integer
attr_reader receiver: Node?
attr_reader call_operator_loc: Location?
attr_reader message_loc: Location?
- attr_reader flags: Integer
attr_reader read_name: Symbol
attr_reader write_name: Symbol
attr_reader operator_loc: Location
attr_reader value: Node
- def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
+ def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> CallOrWriteNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def safe_navigation?: () -> bool
+
+ def variable_call?: () -> bool
+
+ def attribute_write?: () -> bool
+
def call_operator: () -> String?
def message: () -> String?
+ def operator: () -> String
+
+ def inspect: (inspector: NodeInspector) -> String
+ end
+ # Represents assigning to a method call.
+ #
+ # foo.bar, = 1
+ # ^^^^^^^
+ #
+ # begin
+ # rescue => foo.bar
+ # ^^^^^^^
+ # end
+ #
+ # for foo.bar in baz do end
+ # ^^^^^^^
+ class CallTargetNode < Node
+ attr_reader flags: Integer
+ attr_reader receiver: Node
+ attr_reader call_operator_loc: Location
+ attr_reader name: Symbol
+ attr_reader message_loc: Location
+
+ def initialize: (flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location) -> void
+ def accept: (visitor: Visitor) -> void
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
+ def child_nodes: () -> Array[Node?]
+ def deconstruct: () -> Array[Node?]
+
+ def copy: (**untyped) -> CallTargetNode
+
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+
def safe_navigation?: () -> bool
def variable_call?: () -> bool
- def operator: () -> String
+ def attribute_write?: () -> bool
+ def call_operator: () -> String
+
+ def message: () -> String
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents assigning to a local variable in pattern matching.
#
# foo => [bar => baz]
@@ -1114,18 +1167,19 @@
attr_reader name_loc: Location
attr_reader receiver: Node?
attr_reader parameters: ParametersNode?
attr_reader body: Node?
attr_reader locals: Array[Symbol]
+ attr_reader locals_body_index: Integer
attr_reader def_keyword_loc: Location
attr_reader operator_loc: Location?
attr_reader lparen_loc: Location?
attr_reader rparen_loc: Location?
attr_reader equal_loc: Location?
attr_reader end_keyword_loc: Location?
- def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void
+ def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], locals_body_index: Integer, def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
@@ -1331,29 +1385,29 @@
# Represents the use of the `..` or `...` operators to create flip flops.
#
# baz if foo .. bar
# ^^^^^^^^^^
class FlipFlopNode < Node
+ attr_reader flags: Integer
attr_reader left: Node?
attr_reader right: Node?
attr_reader operator_loc: Location
- attr_reader flags: Integer
- def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void
+ def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> FlipFlopNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
- def operator: () -> String
-
def exclude_end?: () -> bool
+ def operator: () -> String
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents a floating point number literal.
#
# 1.0
@@ -1724,10 +1778,37 @@
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
def inspect: (inspector: NodeInspector) -> String
end
+ # Represents using a trailing comma to indicate an implicit rest parameter.
+ #
+ # foo { |bar,| }
+ # ^
+ #
+ # foo in [bar,]
+ # ^
+ #
+ # for foo, in bar do end
+ # ^
+ #
+ # foo, = bar
+ # ^
+ class ImplicitRestNode < Node
+
+ def initialize: (location: Location) -> void
+ def accept: (visitor: Visitor) -> void
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
+ def child_nodes: () -> Array[Node?]
+ def deconstruct: () -> Array[Node?]
+
+ def copy: (**untyped) -> ImplicitRestNode
+
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+
+ def inspect: (inspector: NodeInspector) -> String
+ end
# Represents the use of the `in` keyword in a case statement.
#
# case a; in b then c end
# ^^^^^^^^^^^
class InNode < Node
@@ -1755,119 +1836,167 @@
# Represents the use of the `&&=` operator on a call to the `[]` method.
#
# foo.bar[baz] &&= value
# ^^^^^^^^^^^^^^^^^^^^^^
class IndexAndWriteNode < Node
+ attr_reader flags: Integer
attr_reader receiver: Node?
attr_reader call_operator_loc: Location?
attr_reader opening_loc: Location
attr_reader arguments: ArgumentsNode?
attr_reader closing_loc: Location
attr_reader block: Node?
- attr_reader flags: Integer
attr_reader operator_loc: Location
attr_reader value: Node
- def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void
+ def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> IndexAndWriteNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def safe_navigation?: () -> bool
+
+ def variable_call?: () -> bool
+
+ def attribute_write?: () -> bool
+
def call_operator: () -> String?
def opening: () -> String
def closing: () -> String
- def safe_navigation?: () -> bool
-
- def variable_call?: () -> bool
-
def operator: () -> String
def inspect: (inspector: NodeInspector) -> String
end
# Represents the use of an assignment operator on a call to `[]`.
#
# foo.bar[baz] += value
# ^^^^^^^^^^^^^^^^^^^^^
class IndexOperatorWriteNode < Node
+ attr_reader flags: Integer
attr_reader receiver: Node?
attr_reader call_operator_loc: Location?
attr_reader opening_loc: Location
attr_reader arguments: ArgumentsNode?
attr_reader closing_loc: Location
attr_reader block: Node?
- attr_reader flags: Integer
attr_reader operator: Symbol
attr_reader operator_loc: Location
attr_reader value: Node
- def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
+ def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> IndexOperatorWriteNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def safe_navigation?: () -> bool
+
+ def variable_call?: () -> bool
+
+ def attribute_write?: () -> bool
+
def call_operator: () -> String?
def opening: () -> String
def closing: () -> String
- def safe_navigation?: () -> bool
-
- def variable_call?: () -> bool
-
def inspect: (inspector: NodeInspector) -> String
end
# Represents the use of the `||=` operator on a call to `[]`.
#
# foo.bar[baz] ||= value
# ^^^^^^^^^^^^^^^^^^^^^^
class IndexOrWriteNode < Node
+ attr_reader flags: Integer
attr_reader receiver: Node?
attr_reader call_operator_loc: Location?
attr_reader opening_loc: Location
attr_reader arguments: ArgumentsNode?
attr_reader closing_loc: Location
attr_reader block: Node?
- attr_reader flags: Integer
attr_reader operator_loc: Location
attr_reader value: Node
- def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void
+ def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> IndexOrWriteNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def safe_navigation?: () -> bool
+
+ def variable_call?: () -> bool
+
+ def attribute_write?: () -> bool
+
def call_operator: () -> String?
def opening: () -> String
def closing: () -> String
+ def operator: () -> String
+
+ def inspect: (inspector: NodeInspector) -> String
+ end
+ # Represents assigning to an index.
+ #
+ # foo[bar], = 1
+ # ^^^^^^^^
+ #
+ # begin
+ # rescue => foo[bar]
+ # ^^^^^^^^
+ # end
+ #
+ # for foo[bar] in baz do end
+ # ^^^^^^^^
+ class IndexTargetNode < Node
+ attr_reader flags: Integer
+ attr_reader receiver: Node
+ attr_reader opening_loc: Location
+ attr_reader arguments: ArgumentsNode?
+ attr_reader closing_loc: Location
+ attr_reader block: Node?
+
+ def initialize: (flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location) -> void
+ def accept: (visitor: Visitor) -> void
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
+ def child_nodes: () -> Array[Node?]
+ def deconstruct: () -> Array[Node?]
+
+ def copy: (**untyped) -> IndexTargetNode
+
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+
def safe_navigation?: () -> bool
def variable_call?: () -> bool
- def operator: () -> String
+ def attribute_write?: () -> bool
+ def opening: () -> String
+
+ def closing: () -> String
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents the use of the `&&=` operator for assignment to an instance variable.
#
# @target &&= value
@@ -2018,14 +2147,14 @@
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
def binary?: () -> bool
- def octal?: () -> bool
-
def decimal?: () -> bool
+ def octal?: () -> bool
+
def hexadecimal?: () -> bool
def inspect: (inspector: NodeInspector) -> String
end
# Represents a regular expression literal that contains interpolation that
@@ -2033,29 +2162,25 @@
# against the last line read by an IO object.
#
# if /foo #{bar} baz/ then end
# ^^^^^^^^^^^^^^^^
class InterpolatedMatchLastLineNode < Node
+ attr_reader flags: Integer
attr_reader opening_loc: Location
attr_reader parts: Array[Node]
attr_reader closing_loc: Location
- attr_reader flags: Integer
- def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void
+ def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> InterpolatedMatchLastLineNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
- def opening: () -> String
-
- def closing: () -> String
-
def ignore_case?: () -> bool
def extended?: () -> bool
def multi_line?: () -> bool
@@ -2068,36 +2193,42 @@
def windows_31j?: () -> bool
def utf_8?: () -> bool
+ def forced_utf8_encoding?: () -> bool
+
+ def forced_binary_encoding?: () -> bool
+
+ def forced_us_ascii_encoding?: () -> bool
+
+ def opening: () -> String
+
+ def closing: () -> String
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents a regular expression literal that contains interpolation.
#
# /foo #{bar} baz/
# ^^^^^^^^^^^^^^^^
class InterpolatedRegularExpressionNode < Node
+ attr_reader flags: Integer
attr_reader opening_loc: Location
attr_reader parts: Array[Node]
attr_reader closing_loc: Location
- attr_reader flags: Integer
- def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void
+ def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> InterpolatedRegularExpressionNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
- def opening: () -> String
-
- def closing: () -> String
-
def ignore_case?: () -> bool
def extended?: () -> bool
def multi_line?: () -> bool
@@ -2110,10 +2241,20 @@
def windows_31j?: () -> bool
def utf_8?: () -> bool
+ def forced_utf8_encoding?: () -> bool
+
+ def forced_binary_encoding?: () -> bool
+
+ def forced_us_ascii_encoding?: () -> bool
+
+ def opening: () -> String
+
+ def closing: () -> String
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents a string literal that contains interpolation.
#
# "foo #{bar} baz"
@@ -2192,22 +2333,25 @@
# Represents a hash literal without opening and closing braces.
#
# foo(a: b)
# ^^^^
class KeywordHashNode < Node
+ attr_reader flags: Integer
attr_reader elements: Array[Node]
- def initialize: (elements: Array[Node], location: Location) -> void
+ def initialize: (flags: Integer, elements: Array[Node], location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> KeywordHashNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def static_keys?: () -> bool
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents a keyword rest parameter to a method, block, or lambda definition.
#
# def a(**b)
@@ -2236,17 +2380,18 @@
#
# ->(value) { value * 2 }
# ^^^^^^^^^^^^^^^^^^^^^^^
class LambdaNode < Node
attr_reader locals: Array[Symbol]
+ attr_reader locals_body_index: Integer
attr_reader operator_loc: Location
attr_reader opening_loc: Location
attr_reader closing_loc: Location
- attr_reader parameters: BlockParametersNode?
+ attr_reader parameters: Node?
attr_reader body: Node?
- def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> void
+ def initialize: (locals: Array[Symbol], locals_body_index: Integer, operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
@@ -2408,32 +2553,26 @@
# object.
#
# if /foo/i then end
# ^^^^^^
class MatchLastLineNode < Node
+ attr_reader flags: Integer
attr_reader opening_loc: Location
attr_reader content_loc: Location
attr_reader closing_loc: Location
attr_reader unescaped: String
- attr_reader flags: Integer
- def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void
+ def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> MatchLastLineNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
- def opening: () -> String
-
- def content: () -> String
-
- def closing: () -> String
-
def ignore_case?: () -> bool
def extended?: () -> bool
def multi_line?: () -> bool
@@ -2446,10 +2585,22 @@
def windows_31j?: () -> bool
def utf_8?: () -> bool
+ def forced_utf8_encoding?: () -> bool
+
+ def forced_binary_encoding?: () -> bool
+
+ def forced_us_ascii_encoding?: () -> bool
+
+ def opening: () -> String
+
+ def content: () -> String
+
+ def closing: () -> String
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents the use of the modifier `in` operator.
#
# foo in bar
@@ -2682,10 +2833,30 @@
def keyword: () -> String
def inspect: (inspector: NodeInspector) -> String
end
+ # Represents an implicit set of parameters through the use of numbered
+ # parameters within a block or lambda.
+ #
+ # -> { _1 + _2 }
+ # ^^^^^^^^^^^^^^
+ class NumberedParametersNode < Node
+ attr_reader maximum: Integer
+
+ def initialize: (maximum: Integer, location: Location) -> void
+ def accept: (visitor: Visitor) -> void
+ def set_newline_flag: (newline_marked: Array[bool]) -> void
+ def child_nodes: () -> Array[Node?]
+ def deconstruct: () -> Array[Node?]
+
+ def copy: (**untyped) -> NumberedParametersNode
+
+ def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+
+ def inspect: (inspector: NodeInspector) -> String
+ end
# Represents reading a numbered reference to a capture in the previous match.
#
# $1
# ^^
class NumberedReferenceReadNode < Node
@@ -2779,17 +2950,17 @@
# ^^^^^^^
# end
class ParametersNode < Node
attr_reader requireds: Array[Node]
attr_reader optionals: Array[Node]
- attr_reader rest: RestParameterNode?
+ attr_reader rest: Node?
attr_reader posts: Array[Node]
attr_reader keywords: Array[Node]
attr_reader keyword_rest: Node?
attr_reader block: BlockParameterNode?
- def initialize: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void
+ def initialize: (requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
@@ -2955,29 +3126,29 @@
# ^^^^
#
# c if a =~ /left/ ... b =~ /right/
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
class RangeNode < Node
+ attr_reader flags: Integer
attr_reader left: Node?
attr_reader right: Node?
attr_reader operator_loc: Location
- attr_reader flags: Integer
- def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void
+ def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> RangeNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
- def operator: () -> String
-
def exclude_end?: () -> bool
+ def operator: () -> String
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents a rational number literal.
#
# 1.0r
@@ -3018,32 +3189,26 @@
# Represents a regular expression literal with no interpolation.
#
# /foo/i
# ^^^^^^
class RegularExpressionNode < Node
+ attr_reader flags: Integer
attr_reader opening_loc: Location
attr_reader content_loc: Location
attr_reader closing_loc: Location
attr_reader unescaped: String
- attr_reader flags: Integer
- def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void
+ def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> RegularExpressionNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
- def opening: () -> String
-
- def content: () -> String
-
- def closing: () -> String
-
def ignore_case?: () -> bool
def extended?: () -> bool
def multi_line?: () -> bool
@@ -3056,10 +3221,22 @@
def windows_31j?: () -> bool
def utf_8?: () -> bool
+ def forced_utf8_encoding?: () -> bool
+
+ def forced_binary_encoding?: () -> bool
+
+ def forced_us_ascii_encoding?: () -> bool
+
+ def opening: () -> String
+
+ def content: () -> String
+
+ def closing: () -> String
+
def inspect: (inspector: NodeInspector) -> String
end
# Represents a required keyword parameter to a method, block, or lambda definition.
#
# def a(b: )
@@ -3392,10 +3569,14 @@
def copy: (**untyped) -> StringNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def forced_utf8_encoding?: () -> bool
+
+ def forced_binary_encoding?: () -> bool
+
def frozen?: () -> bool
def opening: () -> String?
def content: () -> String
@@ -3442,25 +3623,32 @@
# ^^^^
#
# %i[foo]
# ^^^
class SymbolNode < Node
+ attr_reader flags: Integer
attr_reader opening_loc: Location?
attr_reader value_loc: Location?
attr_reader closing_loc: Location?
attr_reader unescaped: String
- def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void
+ def initialize: (flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> SymbolNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def forced_utf8_encoding?: () -> bool
+
+ def forced_binary_encoding?: () -> bool
+
+ def forced_us_ascii_encoding?: () -> bool
+
def opening: () -> String?
def value: () -> String?
def closing: () -> String?
@@ -3546,32 +3734,32 @@
# ^^^^^^^^^^^^^
#
# until foo do bar end
# ^^^^^^^^^^^^^^^^^^^^
class UntilNode < Node
+ attr_reader flags: Integer
attr_reader keyword_loc: Location
attr_reader closing_loc: Location?
attr_reader predicate: Node
attr_reader statements: StatementsNode?
- attr_reader flags: Integer
- def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void
+ def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> UntilNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def begin_modifier?: () -> bool
+
def keyword: () -> String
def closing: () -> String?
- def begin_modifier?: () -> bool
-
def inspect: (inspector: NodeInspector) -> String
end
# Represents the use of the `when` keyword within a case statement.
#
# case true
@@ -3603,54 +3791,59 @@
# ^^^^^^^^^^^^^
#
# while foo do bar end
# ^^^^^^^^^^^^^^^^^^^^
class WhileNode < Node
+ attr_reader flags: Integer
attr_reader keyword_loc: Location
attr_reader closing_loc: Location?
attr_reader predicate: Node
attr_reader statements: StatementsNode?
- attr_reader flags: Integer
- def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void
+ def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> WhileNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def begin_modifier?: () -> bool
+
def keyword: () -> String
def closing: () -> String?
- def begin_modifier?: () -> bool
-
def inspect: (inspector: NodeInspector) -> String
end
# Represents an xstring literal with no interpolation.
#
# `foo`
# ^^^^^
class XStringNode < Node
+ attr_reader flags: Integer
attr_reader opening_loc: Location
attr_reader content_loc: Location
attr_reader closing_loc: Location
attr_reader unescaped: String
- def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
+ def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void
def accept: (visitor: Visitor) -> void
def set_newline_flag: (newline_marked: Array[bool]) -> void
def child_nodes: () -> Array[Node?]
def deconstruct: () -> Array[Node?]
def copy: (**untyped) -> XStringNode
def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, (Node | Array[Node] | String | Token | Array[Token] | Location)?]
+ def forced_utf8_encoding?: () -> bool
+
+ def forced_binary_encoding?: () -> bool
+
def opening: () -> String
def content: () -> String
def closing: () -> String
@@ -3687,33 +3880,55 @@
end
# Flags for arguments nodes.
module ArgumentsNodeFlags
# if arguments contain keyword splat
- KEYWORD_SPLAT: Integer
+ CONTAINS_KEYWORD_SPLAT: Integer
end
+ # Flags for array nodes.
+ module ArrayNodeFlags
+ # if array contains splat nodes
+ CONTAINS_SPLAT: Integer
+ end
+
# Flags for call nodes.
module CallNodeFlags
# &. operator
SAFE_NAVIGATION: Integer
# a call that could have been a local variable
VARIABLE_CALL: Integer
+ # a call that is an attribute write, so the value being written should be returned
+ ATTRIBUTE_WRITE: Integer
end
+ # Flags for nodes that have unescaped content.
+ module EncodingFlags
+ # internal bytes forced the encoding to UTF-8
+ FORCED_UTF8_ENCODING: Integer
+ # internal bytes forced the encoding to binary
+ FORCED_BINARY_ENCODING: Integer
+ end
+
# Flags for integer nodes that correspond to the base of the integer.
module IntegerBaseFlags
# 0b prefix
BINARY: Integer
- # 0o or 0 prefix
- OCTAL: Integer
# 0d or no prefix
DECIMAL: Integer
+ # 0o or 0 prefix
+ OCTAL: Integer
# 0x prefix
HEXADECIMAL: Integer
end
+ # Flags for keyword hash nodes.
+ module KeywordHashNodeFlags
+ # a keyword hash which only has `AssocNode` elements all with static literal keys, which means the elements can be treated as keyword arguments
+ STATIC_KEYS: Integer
+ end
+
# Flags for while and until loop nodes.
module LoopFlags
# a loop after a begin statement, so the body is executed first before the condition
BEGIN_MODIFIER: Integer
end
@@ -3740,19 +3955,39 @@
ASCII_8BIT: Integer
# s - forces the Windows-31J encoding
WINDOWS_31J: Integer
# u - forces the UTF-8 encoding
UTF_8: Integer
+ # internal bytes forced the encoding to UTF-8
+ FORCED_UTF8_ENCODING: Integer
+ # internal bytes forced the encoding to binary
+ FORCED_BINARY_ENCODING: Integer
+ # internal bytes forced the encoding to US-ASCII
+ FORCED_US_ASCII_ENCODING: Integer
end
# Flags for string nodes.
module StringFlags
+ # internal bytes forced the encoding to UTF-8
+ FORCED_UTF8_ENCODING: Integer
+ # internal bytes forced the encoding to binary
+ FORCED_BINARY_ENCODING: Integer
# frozen by virtue of a `frozen_string_literal` comment
FROZEN: Integer
end
+ # Flags for symbol nodes.
+ module SymbolFlags
+ # internal bytes forced the encoding to UTF-8
+ FORCED_UTF8_ENCODING: Integer
+ # internal bytes forced the encoding to binary
+ FORCED_BINARY_ENCODING: Integer
+ # internal bytes forced the encoding to US-ASCII
+ FORCED_US_ASCII_ENCODING: Integer
+ end
+
class Visitor < BasicVisitor
# Visit a AliasGlobalVariableNode node
def visit_alias_global_variable_node: (node: AliasGlobalVariableNode) -> void
# Visit a AliasMethodNode node
@@ -3813,10 +4048,13 @@
def visit_call_operator_write_node: (node: CallOperatorWriteNode) -> void
# Visit a CallOrWriteNode node
def visit_call_or_write_node: (node: CallOrWriteNode) -> void
+ # Visit a CallTargetNode node
+ def visit_call_target_node: (node: CallTargetNode) -> void
+
# Visit a CapturePatternNode node
def visit_capture_pattern_node: (node: CapturePatternNode) -> void
# Visit a CaseMatchNode node
def visit_case_match_node: (node: CaseMatchNode) -> void
@@ -3954,10 +4192,13 @@
def visit_imaginary_node: (node: ImaginaryNode) -> void
# Visit a ImplicitNode node
def visit_implicit_node: (node: ImplicitNode) -> void
+ # Visit a ImplicitRestNode node
+ def visit_implicit_rest_node: (node: ImplicitRestNode) -> void
+
# Visit a InNode node
def visit_in_node: (node: InNode) -> void
# Visit a IndexAndWriteNode node
def visit_index_and_write_node: (node: IndexAndWriteNode) -> void
@@ -3966,10 +4207,13 @@
def visit_index_operator_write_node: (node: IndexOperatorWriteNode) -> void
# Visit a IndexOrWriteNode node
def visit_index_or_write_node: (node: IndexOrWriteNode) -> void
+ # Visit a IndexTargetNode node
+ def visit_index_target_node: (node: IndexTargetNode) -> void
+
# Visit a InstanceVariableAndWriteNode node
def visit_instance_variable_and_write_node: (node: InstanceVariableAndWriteNode) -> void
# Visit a InstanceVariableOperatorWriteNode node
def visit_instance_variable_operator_write_node: (node: InstanceVariableOperatorWriteNode) -> void
@@ -4062,10 +4306,13 @@
def visit_nil_node: (node: NilNode) -> void
# Visit a NoKeywordsParameterNode node
def visit_no_keywords_parameter_node: (node: NoKeywordsParameterNode) -> void
+ # Visit a NumberedParametersNode node
+ def visit_numbered_parameters_node: (node: NumberedParametersNode) -> void
+
# Visit a NumberedReferenceReadNode node
def visit_numbered_reference_read_node: (node: NumberedReferenceReadNode) -> void
# Visit a OptionalKeywordParameterNode node
def visit_optional_keyword_parameter_node: (node: OptionalKeywordParameterNode) -> void
@@ -4198,13 +4445,13 @@
# Create a new AlternationPatternNode node
def AlternationPatternNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> AlternationPatternNode
# Create a new AndNode node
def AndNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> AndNode
# Create a new ArgumentsNode node
- def ArgumentsNode: (arguments: Array[Node], flags: Integer, location: Location) -> ArgumentsNode
+ def ArgumentsNode: (flags: Integer, arguments: Array[Node], location: Location) -> ArgumentsNode
# Create a new ArrayNode node
- def ArrayNode: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayNode
+ def ArrayNode: (flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayNode
# Create a new ArrayPatternNode node
def ArrayPatternNode: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> ArrayPatternNode
# Create a new AssocNode node
def AssocNode: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> AssocNode
# Create a new AssocSplatNode node
@@ -4216,25 +4463,27 @@
# Create a new BlockArgumentNode node
def BlockArgumentNode: (expression: Node?, operator_loc: Location, location: Location) -> BlockArgumentNode
# Create a new BlockLocalVariableNode node
def BlockLocalVariableNode: (name: Symbol, location: Location) -> BlockLocalVariableNode
# Create a new BlockNode node
- def BlockNode: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> BlockNode
+ def BlockNode: (locals: Array[Symbol], locals_body_index: Integer, parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> BlockNode
# Create a new BlockParameterNode node
def BlockParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> BlockParameterNode
# Create a new BlockParametersNode node
def BlockParametersNode: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> BlockParametersNode
# Create a new BreakNode node
def BreakNode: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> BreakNode
# Create a new CallAndWriteNode node
- def CallAndWriteNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> CallAndWriteNode
+ def CallAndWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> CallAndWriteNode
# Create a new CallNode node
- def CallNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: Symbol, location: Location) -> CallNode
+ def CallNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location) -> CallNode
# Create a new CallOperatorWriteNode node
- def CallOperatorWriteNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> CallOperatorWriteNode
+ def CallOperatorWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> CallOperatorWriteNode
# Create a new CallOrWriteNode node
- def CallOrWriteNode: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> CallOrWriteNode
+ def CallOrWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> CallOrWriteNode
+ # Create a new CallTargetNode node
+ def CallTargetNode: (flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location) -> CallTargetNode
# Create a new CapturePatternNode node
def CapturePatternNode: (value: Node, target: Node, operator_loc: Location, location: Location) -> CapturePatternNode
# Create a new CaseMatchNode node
def CaseMatchNode: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> CaseMatchNode
# Create a new CaseNode node
@@ -4276,11 +4525,11 @@
# Create a new ConstantTargetNode node
def ConstantTargetNode: (name: Symbol, location: Location) -> ConstantTargetNode
# Create a new ConstantWriteNode node
def ConstantWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> ConstantWriteNode
# Create a new DefNode node
- def DefNode: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> DefNode
+ def DefNode: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], locals_body_index: Integer, def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> DefNode
# Create a new DefinedNode node
def DefinedNode: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> DefinedNode
# Create a new ElseNode node
def ElseNode: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> ElseNode
# Create a new EmbeddedStatementsNode node
@@ -4292,11 +4541,11 @@
# Create a new FalseNode node
def FalseNode: (location: Location) -> FalseNode
# Create a new FindPatternNode node
def FindPatternNode: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> FindPatternNode
# Create a new FlipFlopNode node
- def FlipFlopNode: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> FlipFlopNode
+ def FlipFlopNode: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> FlipFlopNode
# Create a new FloatNode node
def FloatNode: (location: Location) -> FloatNode
# Create a new ForNode node
def ForNode: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> ForNode
# Create a new ForwardingArgumentsNode node
@@ -4325,18 +4574,22 @@
def IfNode: (if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> IfNode
# Create a new ImaginaryNode node
def ImaginaryNode: (numeric: Node, location: Location) -> ImaginaryNode
# Create a new ImplicitNode node
def ImplicitNode: (value: Node, location: Location) -> ImplicitNode
+ # Create a new ImplicitRestNode node
+ def ImplicitRestNode: (location: Location) -> ImplicitRestNode
# Create a new InNode node
def InNode: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> InNode
# Create a new IndexAndWriteNode node
- def IndexAndWriteNode: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> IndexAndWriteNode
+ def IndexAndWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> IndexAndWriteNode
# Create a new IndexOperatorWriteNode node
- def IndexOperatorWriteNode: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> IndexOperatorWriteNode
+ def IndexOperatorWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> IndexOperatorWriteNode
# Create a new IndexOrWriteNode node
- def IndexOrWriteNode: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> IndexOrWriteNode
+ def IndexOrWriteNode: (flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location) -> IndexOrWriteNode
+ # Create a new IndexTargetNode node
+ def IndexTargetNode: (flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location) -> IndexTargetNode
# Create a new InstanceVariableAndWriteNode node
def InstanceVariableAndWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> InstanceVariableAndWriteNode
# Create a new InstanceVariableOperatorWriteNode node
def InstanceVariableOperatorWriteNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> InstanceVariableOperatorWriteNode
# Create a new InstanceVariableOrWriteNode node
@@ -4348,25 +4601,25 @@
# Create a new InstanceVariableWriteNode node
def InstanceVariableWriteNode: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> InstanceVariableWriteNode
# Create a new IntegerNode node
def IntegerNode: (flags: Integer, location: Location) -> IntegerNode
# Create a new InterpolatedMatchLastLineNode node
- def InterpolatedMatchLastLineNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> InterpolatedMatchLastLineNode
+ def InterpolatedMatchLastLineNode: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> InterpolatedMatchLastLineNode
# Create a new InterpolatedRegularExpressionNode node
- def InterpolatedRegularExpressionNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> InterpolatedRegularExpressionNode
+ def InterpolatedRegularExpressionNode: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> InterpolatedRegularExpressionNode
# Create a new InterpolatedStringNode node
def InterpolatedStringNode: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> InterpolatedStringNode
# Create a new InterpolatedSymbolNode node
def InterpolatedSymbolNode: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> InterpolatedSymbolNode
# Create a new InterpolatedXStringNode node
def InterpolatedXStringNode: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> InterpolatedXStringNode
# Create a new KeywordHashNode node
- def KeywordHashNode: (elements: Array[Node], location: Location) -> KeywordHashNode
+ def KeywordHashNode: (flags: Integer, elements: Array[Node], location: Location) -> KeywordHashNode
# Create a new KeywordRestParameterNode node
def KeywordRestParameterNode: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> KeywordRestParameterNode
# Create a new LambdaNode node
- def LambdaNode: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> LambdaNode
+ def LambdaNode: (locals: Array[Symbol], locals_body_index: Integer, operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location) -> LambdaNode
# Create a new LocalVariableAndWriteNode node
def LocalVariableAndWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> LocalVariableAndWriteNode
# Create a new LocalVariableOperatorWriteNode node
def LocalVariableOperatorWriteNode: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> LocalVariableOperatorWriteNode
# Create a new LocalVariableOrWriteNode node
@@ -4376,11 +4629,11 @@
# Create a new LocalVariableTargetNode node
def LocalVariableTargetNode: (name: Symbol, depth: Integer, location: Location) -> LocalVariableTargetNode
# Create a new LocalVariableWriteNode node
def LocalVariableWriteNode: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> LocalVariableWriteNode
# Create a new MatchLastLineNode node
- def MatchLastLineNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> MatchLastLineNode
+ def MatchLastLineNode: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> MatchLastLineNode
# Create a new MatchPredicateNode node
def MatchPredicateNode: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> MatchPredicateNode
# Create a new MatchRequiredNode node
def MatchRequiredNode: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> MatchRequiredNode
# Create a new MatchWriteNode node
@@ -4397,20 +4650,22 @@
def NextNode: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> NextNode
# Create a new NilNode node
def NilNode: (location: Location) -> NilNode
# Create a new NoKeywordsParameterNode node
def NoKeywordsParameterNode: (operator_loc: Location, keyword_loc: Location, location: Location) -> NoKeywordsParameterNode
+ # Create a new NumberedParametersNode node
+ def NumberedParametersNode: (maximum: Integer, location: Location) -> NumberedParametersNode
# Create a new NumberedReferenceReadNode node
def NumberedReferenceReadNode: (number: Integer, location: Location) -> NumberedReferenceReadNode
# Create a new OptionalKeywordParameterNode node
def OptionalKeywordParameterNode: (name: Symbol, name_loc: Location, value: Node, location: Location) -> OptionalKeywordParameterNode
# Create a new OptionalParameterNode node
def OptionalParameterNode: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> OptionalParameterNode
# Create a new OrNode node
def OrNode: (left: Node, right: Node, operator_loc: Location, location: Location) -> OrNode
# Create a new ParametersNode node
- def ParametersNode: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> ParametersNode
+ def ParametersNode: (requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> ParametersNode
# Create a new ParenthesesNode node
def ParenthesesNode: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> ParenthesesNode
# Create a new PinnedExpressionNode node
def PinnedExpressionNode: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> PinnedExpressionNode
# Create a new PinnedVariableNode node
@@ -4420,17 +4675,17 @@
# Create a new PreExecutionNode node
def PreExecutionNode: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> PreExecutionNode
# Create a new ProgramNode node
def ProgramNode: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> ProgramNode
# Create a new RangeNode node
- def RangeNode: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> RangeNode
+ def RangeNode: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> RangeNode
# Create a new RationalNode node
def RationalNode: (numeric: Node, location: Location) -> RationalNode
# Create a new RedoNode node
def RedoNode: (location: Location) -> RedoNode
# Create a new RegularExpressionNode node
- def RegularExpressionNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> RegularExpressionNode
+ def RegularExpressionNode: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> RegularExpressionNode
# Create a new RequiredKeywordParameterNode node
def RequiredKeywordParameterNode: (name: Symbol, name_loc: Location, location: Location) -> RequiredKeywordParameterNode
# Create a new RequiredParameterNode node
def RequiredParameterNode: (name: Symbol, location: Location) -> RequiredParameterNode
# Create a new RescueModifierNode node
@@ -4460,24 +4715,24 @@
# Create a new StringNode node
def StringNode: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> StringNode
# Create a new SuperNode node
def SuperNode: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> SuperNode
# Create a new SymbolNode node
- def SymbolNode: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> SymbolNode
+ def SymbolNode: (flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> SymbolNode
# Create a new TrueNode node
def TrueNode: (location: Location) -> TrueNode
# Create a new UndefNode node
def UndefNode: (names: Array[Node], keyword_loc: Location, location: Location) -> UndefNode
# Create a new UnlessNode node
def UnlessNode: (keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> UnlessNode
# Create a new UntilNode node
- def UntilNode: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> UntilNode
+ def UntilNode: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> UntilNode
# Create a new WhenNode node
def WhenNode: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> WhenNode
# Create a new WhileNode node
- def WhileNode: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> WhileNode
+ def WhileNode: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> WhileNode
# Create a new XStringNode node
- def XStringNode: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> XStringNode
+ def XStringNode: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> XStringNode
# Create a new YieldNode node
def YieldNode: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> YieldNode
end
end