summaryrefslogtreecommitdiff
path: root/lib/prism/parse_result
diff options
context:
space:
mode:
authorGopal Patel <[email protected]>2024-02-20 13:48:31 -0800
committergit <[email protected]>2024-02-24 03:39:28 +0000
commitdfee03374632f4da40587cf62858b92da5022a9a ()
treea24a55c2209b4c9a2ba9a9560f99ec82cbb9efa4 /lib/prism/parse_result
parent66565e36eae8a3dff53f86b3d04bf749e0b07a94 (diff)
[ruby/prism] Replace awkward code changes with steep:ignore
Also remove RBS for currently ignored files. Will follow-up when those check fully in later PRs. https://.com/ruby/prism/commit/2cae58f86d
-rw-r--r--lib/prism/parse_result/comments.rb7
-rw-r--r--lib/prism/parse_result/newlines.rb6
2 files changed, 2 insertions, 11 deletions
@@ -188,12 +188,7 @@ module Prism
# Attach the list of comments to their respective locations in the tree.
def attach_comments!
- if ProgramNode === value
- this = self #: ParseResult[ProgramNode]
- Comments.new(this).attach!
- else
- raise
- end
end
end
end
@@ -58,11 +58,7 @@ module Prism
# Walk the tree and mark nodes that are on a new line.
def mark_newlines!
- if ProgramNode === value
- value.accept(Newlines.new(Array.new(1 + source.offsets.size, false)))
- else
- raise "ParseResult does not contain ProgramNode value"
- end
end
end
end