Reset nil attributes to their default values to make the spec valid
When there is an invalid block with a keyword missing an end right before another end, it is unclear where which keyword is missing the end
Take this example:
class Dog # 1 def bark # 2 puts "woof" # 3 end # 4
However due to github.com/ruby/syntax_suggest/issues/32 the problem line will be identified as:
> class Dog # 1
Because lines 2, 3, and 4 are technically valid code and are expanded first, deemed valid, and hidden. We need to un-hide the matching end line 4. Also work backwards and if there’s a mis-matched keyword, show it too
This method verifies that there are no (obvious) ambiguities with the provided col_sep
and strip
parsing options. For example, if col_sep
and strip
were both equal to \t
, then there would be no clear way to parse the input.
Compile a ConstantPathOperatorWriteNode
node
Dispatch enter and leave events for ConstantPathAndWriteNode
nodes and continue walking the tree.
Dispatch enter and leave events for ConstantPathOperatorWriteNode
nodes and continue walking the tree.
Dispatch enter and leave events for ConstantPathOrWriteNode
nodes and continue walking the tree.
Copy a ConstantPathOperatorWriteNode
node
The logical inverse of ‘capture_last_end_same_indent`
When there is an invalid block with an ‘end` missing a keyword right after another `end`, it is unclear where which end is missing the keyword.
Take this example:
class Dog # 1 puts "woof" # 2 end # 3 end # 4
the problem line will be identified as:
> end # 4
This happens because lines 1, 2, and 3 are technically valid code and are expanded first, deemed valid, and hidden. We need to un-hide the matching keyword on line 1. Also work backwards and if there’s a mis-matched end, show it too
Creates a new URI
formatter for uri
.
Normalize the URI
by adding “http://” if it is missing.