Skip to content

Conversation

Arpita-Jaiswal
Copy link
Contributor

No description provided.

<item> ::= <comment> | <section>


<module_comment> ::= (<single_module_comment> <new_line>)* <single_module_comment> (<new_line> | <eof>)
Copy link
Contributor

@amitu amitu Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<module_comment> ::= (<single_module_comment> <new_line>)* <single_module_comment> (<new_line> | <eof>)
<module_comment> ::= (<single_module_comment> <new_line>)* (<single_module_comment> <eof>)?

Would this be same / simpler?

Would this work?

Suggested change
<module_comment> ::= (<single_module_comment> <new_line>)* <single_module_comment> (<new_line> | <eof>)
<module_comment> ::= (<single_module_comment> (<new_line> | <eof>))*



<module_comment> ::= (<single_module_comment> <new_line>)* <single_module_comment> (<new_line> | <eof>)
<single_module_comment> ::= <doc_comment_marker> <opt_whitespace> <sentence>? <opt_whitespace>
Copy link
Contributor

@amitu amitu Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<single_module_comment> ::= <doc_comment_marker> <opt_whitespace> <sentence>? <opt_whitespace>
<single_module_comment> ::= <doc_comment_marker> <space>* <sentence>? <space>*

Should we have opt_whitespace?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include the <newline> | <eof> here only? And rename this to <module_comment_line>?




<start_marker> ::= "--"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename this to section_start_marker. Should we include the space here itself as that is required part of our syntax we just discussed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I think the grammar would be easier to read if we do not define names for things that are ever used once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants