-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Request: Insert doc comments from .pest
file to the Rule
struct.
#748
Labels
Comments
huacnlee
added a commit
to huacnlee/pest
that referenced
this issue
Jan 9, 2023
Resolve pest-parser#748 For example: ```rust //! A parser for JSON file. /// Matches object, e.g.: `{ "foo": "bar" }` object = { "{" ~ pair ~ ("," ~ pair)* ~ "}" | "{" ~ "}" } ``` should generate: ```rust /// A parser for JSON file. enum Rule { /// Matches object, e.g.: `{ "foo": "bar" }` object, } ```
huacnlee
added a commit
to huacnlee/pest
that referenced
this issue
Jan 9, 2023
Resolve pest-parser#748 For example: ```rust //! A parser for JSON file. /// Matches object, e.g.: `{ "foo": "bar" }` object = { "{" ~ pair ~ ("," ~ pair)* ~ "}" | "{" ~ "}" } ``` should generate: ```rust /// A parser for JSON file. enum Rule { /// Matches object, e.g.: `{ "foo": "bar" }` object, } ```
huacnlee
added a commit
to huacnlee/pest
that referenced
this issue
Jan 18, 2023
Resolve pest-parser#748 For example: ```rust //! A parser for JSON file. /// Matches object, e.g.: `{ "foo": "bar" }` object = { "{" ~ pair ~ ("," ~ pair)* ~ "}" | "{" ~ "}" } ``` should generate: ```rust /// A parser for JSON file. enum Rule { /// Matches object, e.g.: `{ "foo": "bar" }` object, } ```
tomtau
pushed a commit
that referenced
this issue
Jan 18, 2023
…765) * Add to support `///` and `//!` syntax for add doc comment for rules. Resolve #748 For example: ```rust //! A parser for JSON file. /// Matches object, e.g.: `{ "foo": "bar" }` object = { "{" ~ pair ~ ("," ~ pair)* ~ "}" | "{" ~ "}" } ``` should generate: ```rust /// A parser for JSON file. enum Rule { /// Matches object, e.g.: `{ "foo": "bar" }` object, } ``` * Rewrite line_doc extract in pest_generator, avoid change AST. * Improve grammar_doc, line_doc parse for keep whitespaces in head and tail. * Rewrite line_docs generator by use HashMap with rule_name. * Move DocComment methods into docs.rs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be incredibly helpful if the
Rule
struct and its variants have documentation to assist user.Example
should generate:
The text was updated successfully, but these errors were encountered: