Skip to content
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

Remove parenthesis from the AST #5906

Merged
merged 4 commits into from Mar 27, 2020
Merged

Commits on Mar 27, 2020

  1. Remove ParenExp from code base

    Instead of keeping this information in the AST, we put in parens
    in the string representation of queries when needed when printing.
    
    This includes adding code that takes precendence into consideration - something
    that already we already need to do when parsing. Unfortunately I haven't found
    a good way to use the same source information for both sides of the
    precedence puzzle.
    
    Signed-off-by: Andres Taylor <andres@planetscale.com>
    systay committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    f72b878 View commit details
    Browse the repository at this point in the history
  2. Refactoring of Myprintf

    Myprintf uses from AST now include the parent struct.
    
    In order to get better readability and guarantees that we don't introduce regressions in the future,
    this refactoring changes Myprintf uses from the AST to always provide the parent structure. Using
    this information, Myprintf can figure out when parens are needed.
    
    Signed-off-by: Harshit Gangal <harshit@planetscale.com>
    Signed-off-by: Andres Taylor <andres@planetscale.com>
    harshit-gangal authored and systay committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    474bc95 View commit details
    Browse the repository at this point in the history
  3. Added randomized testing to test parsing/unparsing

    Signed-off-by: Andres Taylor <andres@planetscale.com>
    systay committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    77cbf27 View commit details
    Browse the repository at this point in the history
  4. Handle IS precendence correctly

    Signed-off-by: Andres Taylor <andres@planetscale.com>
    systay committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    5b7b806 View commit details
    Browse the repository at this point in the history