-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not all returns in parsers are disallowed #3309
Conversation
Signed-off-by: Mihai Budiu <[email protected]>
Signed-off-by: Mihai Budiu <[email protected]>
Fixes #3307 |
Signed-off-by: Mihai Budiu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -243,7 +243,7 @@ class BoolLiteral : Literal { | |||
class StringLiteral : Literal { | |||
cstring value; | |||
validate{ if (value.isNull()) BUG("null StringLiteral"); } | |||
toString{ return cstring("\"") + value + "\""; } | |||
toString{ return cstring("\"") + value.escapeJson() + "\""; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a one-off fix or is it needed elsewhere in the .def
files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we handle string literals anywhere else.
Signed-off-by: Mihai Budiu <[email protected]>
* toupper cstring method * utility function to specialize actions * Escape quotes in string literals * Returns in parsers are allowed if they are in methods Signed-off-by: Mihai Budiu <[email protected]>
No description provided.