Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 58d2ab4

Browse files
committed
Fix AST output for Command and CommandCall nodes
1 parent adde5da commit 58d2ab4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- Fixed the AST output by adding blocks to `Command` and `CommandCall` nodes in the `FieldVisitor`.
12+
913
## [6.0.1] - 2023-02-26
1014

1115
### Added

lib/syntax_tree/field_visitor.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ def visit_command(node)
263263
node(node, "command") do
264264
field("message", node.message)
265265
field("arguments", node.arguments)
266+
field("block", node.block) if node.block
266267
comments(node)
267268
end
268269
end
@@ -273,6 +274,7 @@ def visit_command_call(node)
273274
field("operator", node.operator)
274275
field("message", node.message)
275276
field("arguments", node.arguments) if node.arguments
277+
field("block", node.block) if node.block
276278
comments(node)
277279
end
278280
end

0 commit comments

Comments
 (0)