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

Add multi-line comment support to parser #62

Merged
merged 1 commit into from
Dec 12, 2020

Conversation

nakulpathak3
Copy link
Contributor

@nakulpathak3 nakulpathak3 commented Dec 12, 2020

Copied this straight from Pest itself so must be right 😅
https://github.com/pest-parser/pest/pull/332/files

Tested against

/* 1-line multiline comment */

/*
  N-line multiline comment
*/

/*
  // Line comment inside multiline
  /*
    (Multiline inside) multiline
  */

*/

Testing steps -

  • cargo build
  • make run
  • scripts/local-run with above inputs

Fixes #57

@nakulpathak3 nakulpathak3 force-pushed the multiline-comment-grammar branch 2 times, most recently from 1fa3f11 to 36c2c4c Compare December 12, 2020 06:37
Copied this straight from Pest itself so must be right 😅
https://github.com/pest-parser/pest/pull/332/files

Tested against
```
/* 1-line multiline comment */

/*
  N-line multiline comment
*/

/*
  // Line comment inside multiline
  /*
    (Multiline inside) multiline
  */

*/
```

Testing steps -
* `cargo build`
* `make run`
* `scripts/local-run` with above inputs

Fixes rtyler#57
@nakulpathak3 nakulpathak3 force-pushed the multiline-comment-grammar branch from 36c2c4c to 86b7f7d Compare December 12, 2020 06:41
Copy link
Owner

@rtyler rtyler left a comment

Choose a reason for hiding this comment

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

Haha, I had recently found that code and copied it too, but only in my Jenkins Declarative Parser experiment.

Thanks 😸

@rtyler rtyler merged commit 504d498 into rtyler:main Dec 12, 2020
@nakulpathak3 nakulpathak3 deleted the multiline-comment-grammar branch December 12, 2020 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement support for multi-line comments in the parser
2 participants