Skip to content
Closed
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
6 changes: 3 additions & 3 deletions lib/syntax_tree/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def ArgParen(arguments)
ArgParen.new(arguments: arguments, location: Location.default)
end

# Create a new Args node.
def Args(parts)
Args.new(parts: parts, location: Location.default)
# Create a new ArgumentsNode node.
def ArgumentsNode(arguments)
ArgumentsNode.new(arguments: arguments, location: Location.default)
end

# Create a new ArgBlock node.
Expand Down
6 changes: 3 additions & 3 deletions lib/syntax_tree/field_visitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def visit_arg_star(node)
end
end

def visit_args(node)
node(node, "args") do
list("parts", node.parts)
def visit_arguments_node(node)
node(node, "arguments_node") do
list("arguments", node.arguments)
comments(node)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/syntax_tree/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def visit_command(node)
node.location.start_column
)

node.arguments.parts.each do |argument|
node.arguments.arguments.each do |argument|
next unless argument.is_a?(SymbolLiteral)
name = argument.value.value.to_sym

Expand Down
6 changes: 3 additions & 3 deletions lib/syntax_tree/mutation_visitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def visit_arg_paren(node)
node.copy(arguments: visit(node.arguments))
end

# Visit a Args node.
def visit_args(node)
node.copy(parts: visit_all(node.parts))
# Visit a ArgumentsNode node.
def visit_arguments_node(node)
node.copy(arguments: visit_all(node.arguments))
end

# Visit a ArgBlock node.
Expand Down
Loading