-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
I've stumbled upon unexpected behaviour of SyntaxTree#parse
Actual behaviour:
SyntaxTree.parse('/*/') #=> nil
Expected behaviour:
SyntaxTree.parse('/*/') #=> SyntaxTree::Parser::ParseError
It's not a bug, but more of an inconsistent interface, I expect it to return either a Node
or raise an exception. And nil
just doesn't give any information. I suggest raising exception in case of parser.error?
Metadata
Metadata
Assignees
Labels
No labels