Open gazayas opened 1 year ago
It can be confusing when trying to search for things with Masamune, so it would be better to just raise an error from the get go
"hello""
Raises this error:
unterminated string meets end of file
"hello""
Masamune currently creates an object without a problem and performs methods like strings
without being aware that the original code is faulty.
irb(main):001:0> require "masamune"
=> true
irb(main):002:0> Masamune::AbstractSyntaxTree.new("\"hello\"\"").strings
=> []
irb(main):003:0> Masamune::AbstractSyntaxTree.new("\"hello\"\"").tree
=> nil
No error is raised when the syntax in the source code passed to Ripper.sexp is incorrect:
We should actually be getting this syntax error: