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

Parse & reject postfix operators after casts #68985

Merged
merged 12 commits into from
Mar 7, 2020
Merged

Commits on Feb 16, 2020

  1. Parse & reject postfix operators after casts

    This adds parsing for expressions like 'x as Ty[0]' which will
    immediately error out, but still give the rest of the parser a valid
    parse tree to continue.
    daboross committed Feb 16, 2020
    Configuration menu
    Copy the full SHA
    940f657 View commit details
    Browse the repository at this point in the history
  2. Refactor out error case & apply suggestions.

    This is almost entirely refactoring and message changing, with the
    single behavioral change of panicking for unexpected output.
    daboross committed Feb 16, 2020
    Configuration menu
    Copy the full SHA
    5ce9b80 View commit details
    Browse the repository at this point in the history
  3. Type ascription outputs a Type, not Cast

    Previously this just errored out on all usages of type ascription,
    which isn't helpful.
    daboross committed Feb 16, 2020
    Configuration menu
    Copy the full SHA
    4fc0532 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0cf2049 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f82ca8b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5dd6464 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e3eefe2 View commit details
    Browse the repository at this point in the history
  8. Remove trailing whitespace

    daboross committed Feb 16, 2020
    Configuration menu
    Copy the full SHA
    c2d7ffb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8ef3da0 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2020

  1. Configuration menu
    Copy the full SHA
    fa1f547 View commit details
    Browse the repository at this point in the history
  2. Use multipart suggestion

    This is a modified version of estebank's suggestion, with a bit of
    extra cleanup now that we don't need the different cases for if we can
    turn a span into a string or not.
    daboross committed Feb 22, 2020
    Configuration menu
    Copy the full SHA
    f434c6e View commit details
    Browse the repository at this point in the history

Commits on Feb 29, 2020

  1. Replace ptr hashing with ptr casting

    Implementes suggeseted changes by Centril.
    
    This checks whether the memory location of the cast remains the same
    after atttempting to parse a postfix operator after a cast has been
    parsed. If the address is not the same, an illegal postfix operator
    was parsed.
    
    Previously the code generated a hash of the pointer, which was overly
    complex and inefficent. Casting the pointers and comparing them
    is simpler and more effcient.
    daboross committed Feb 29, 2020
    Configuration menu
    Copy the full SHA
    453c505 View commit details
    Browse the repository at this point in the history