instance method
SyntaxSuggest::CodeFrontier#can_skip_check?
can_skip_check?
lib/syntax_suggest/code_frontier.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/syntax_suggest/code_frontier.rb, line 74
def can_skip_check?
check_next = @check_next
@check_next = false
if check_next
false
else
true
end
end
Performance optimization
Parsing with ripper is expensive If we know we don’t have any blocks with invalid syntax, then we know we cannot have found the incorrect syntax yet.
When an invalid block is added onto the frontier check document state