-
Notifications
You must be signed in to change notification settings - Fork 186
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
Compiler: generate doc comments #860
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @kevmoo. Added a few inline comments and suggestions.
return null; | ||
} | ||
|
||
final _leadingSpaces = RegExp('^ +'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about other whitespace characters? https://protobuf.dev/reference/protobuf/textformat-spec/#whitespace
I really dislike regexes for simple things like this, but maybe this is the easiest in Dart..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space seems like the only reasonable initial character here. Maybe tab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah tabs should be common. I don't even know what vertical tab and form feed are and I suspect they're not used in practice. Carriage return should be handled by the line splitter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's okay to handle these case-by-case. In all of the bits I looked through they ALWAYS seem to have one leading space – that's it!
Co-authored-by: Ömer Sinan Ağacan <omersa@google.com>
Co-authored-by: Ömer Sinan Ağacan <omersa@google.com>
Co-authored-by: Ömer Sinan Ağacan <omersa@google.com>
This doesn't grab comments at the end of the line. EX: message Animal { |
File another bug on that
…On Tue, Jul 25, 2023, 08:14 MattyBoy ***@***.***> wrote:
This doesn't grab comments at the end of the line.
EX:
message Animal {
string name = 1; //This is the name of the animal
}
—
Reply to this email directly, view it on GitHub
<#860 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEFCXN6HYXEFVLJHUCZMLXR7PG5ANCNFSM6AAAAAA2E63YWM>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Fixes #161