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

style(prost-build): Consolidate field data into struct #1017

Merged
merged 3 commits into from Apr 29, 2024

Commits on Apr 28, 2024

  1. prost-build: consolidate message field data

    When massaging field data in CodeGenerator::append_message,
    move it into lists of Field and OneofField structs so that later
    generation passes can operate on the data with less code duplication.
    
    Subsidiary append_* methods are changed to take references to these
    structs rather than moved data, as generation of lexical tokens
    does not actually consume any owned data, and we will need more
    passes over the same field lists for the upcoming builder code.
    mzabaluev committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    15893b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5333e02 View commit details
    Browse the repository at this point in the history
  3. prost-build: address comments on reuse of Field

    Make rust_field into a method computing the name on the fly.
    In OneofField, make the vector of fields to have Field members.
    Don't play reference renaming tricks with field.descriptor.
    mzabaluev committed Apr 28, 2024
    Configuration menu
    Copy the full SHA
    1991a11 View commit details
    Browse the repository at this point in the history