Merge pull request #62 from nakulpathak3/multiline-comment-grammar

Add multi-line comment support to parser
This commit is contained in:
R Tyler Croy 2020-12-12 10:06:16 -08:00 committed by GitHub
commit 504d498846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,6 @@
/*
Example Ottofile
*/
pipeline {
steps {

View File

@ -44,4 +44,5 @@ STRV = @{ "''" | (!"'" ~ ANY)* }
COMMA = @{ "," }
WHITESPACE = _{ (" " | NEWLINE) }
COMMENT = _{ "//" ~ (!NEWLINE ~ ANY)* }
BLOCK_COMMENT = _{ "/*" ~ (BLOCK_COMMENT | !"*/" ~ ANY)* ~ "*/" }
COMMENT = _{ BLOCK_COMMENT | ("//" ~ (!NEWLINE ~ ANY)*) }