lib/rubocop/rbs/processed_rbs_source.rb in rubocop-on-rbs-0.5.0 vs lib/rubocop/rbs/processed_rbs_source.rb in rubocop-on-rbs-0.6.0

- old
+ new

@@ -17,9 +17,13 @@ @tokens = nil rescue ::RBS::ParsingError => e @error = e end + def valid_syntax? + @error.nil? + end + def tokens @tokens ||= begin ::RBS::Parser.lex(buffer).value end end