Skip to content

Fixed Parser problem for SELECT (((3))) as ....#448

Merged
guilhermeblanco merged 4 commits intodoctrine:masterfrom
stefanklug:master-parserFix
Nov 3, 2012
Merged

Fixed Parser problem for SELECT (((3))) as ....#448
guilhermeblanco merged 4 commits intodoctrine:masterfrom
stefanklug:master-parserFix

Conversation

@stefanklug
Copy link
Contributor

Hi this is the old PR #438 ported to master.
I had to modify more than I expected to get it to work properly.

I had to apply some modifications to Parser::ScalarExpression and would like to discuss the desired coding style. After my modifications Parser::ScalarExpression looks a bit more like Parser::SelectExpression, but I don't know your preferred style.

I think there is some more cleanup we could apply to ScalarExpression, but I'd like to get some feedback first.

Stefan

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

break is useless here. It is a dead statement as you return before it

@stefanklug
Copy link
Contributor Author

Hi, no problem to clean up the things you mentioned. I'd also like to add some comments like in SelectExpression. But is the general style ok?

@guilhermeblanco
Copy link
Member

It is

@stefanklug
Copy link
Contributor Author

I think it done now. I removed the check for SELECT in _IsFunction. The unittests pass, and I believe it's cleaner to check for aggregates outside of _isFunction (as it is done already). I'm on vacation for 2 weeks now, so I won't be able to comment.

Cheers Stefan

@beberlei
Copy link
Member

beberlei commented Oct 5, 2012

Can you rebase this PR? fabio changed the CS of the classes and made this unmergable. Sorry for the invonenience.

@stefanklug
Copy link
Contributor Author

I rebased the PR to the current master. Regards Stefan

guilhermeblanco added a commit that referenced this pull request Nov 3, 2012
Fixed Parser problem for SELECT (((3))) as ....
@guilhermeblanco guilhermeblanco merged commit ec1950d into doctrine:master Nov 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants