-
-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
I've stumbled upon unexpected behaviour of SyntaxTree#parse
Actual behaviour:
SyntaxTree.parse('/*/') #=> nilExpected behaviour:
SyntaxTree.parse('/*/') #=> SyntaxTree::Parser::ParseErrorIt'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