Skip to content

Commit

Permalink
Small changes to make type-checking pass
Browse files Browse the repository at this point in the history
  • Loading branch information
paracycle committed Mar 6, 2024
1 parent 2a583b0 commit 5b2970e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
7 changes: 0 additions & 7 deletions lib/prism/parse_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,6 @@ def join(other)

Location.new(source, start_offset, other.end_offset - start_offset)
end

# Returns a null location that does not correspond to a source and points to
# the beginning of the file. Useful for when you want a location object but
# do not care where it points.
def self.null
new(nil, 0, 0) # steep:ignore
end
end

# This represents a comment that was encountered during parsing. It is the
Expand Down
2 changes: 1 addition & 1 deletion lib/prism/translation/parser/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,7 @@ def visit_block(call, block)

# Visit a heredoc that can be either a string or an xstring.
def visit_heredoc(node)
children = []
children = Array.new
node.parts.each do |part|
pushing =
if part.is_a?(StringNode) && part.unescaped.include?("\n")
Expand Down
2 changes: 0 additions & 2 deletions sig/prism/parse_result.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ module Prism
def deconstruct_keys: (Array[Symbol] keys) -> { start_offset: Integer, end_offset: Integer }
def pretty_print: (untyped q) -> untyped
def join: (Location other) -> Location

def self.null: () -> Location
end

class Comment
Expand Down

0 comments on commit 5b2970e

Please sign in to comment.