Skip to content

single quotes in strings break the pure codegen parser #337

@emily33901

Description

@emily33901

Example:

import "google/protobuf/descriptor.proto";

extend .google.protobuf.MethodOptions {
	optional string method_description = 50000;
}

message test_message {
    optional string a = 1 [default = "this won't parse"];
}

service test {
    rpc NiceFunction (Map<int32, string>) returns (int32) {
        option (method_description) = "Does nothing and doesn't care";
    }
}

and gives error

error: ParserErrorWithLocation(ParserErrorWithLocation { error: InternalError, line: 8, col: 48 })

using protobuf-codegen-pure = "2.0.4"

Am I missing something obvious?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions