Skip to content

Commit

Permalink
Only "///" and "/**" act as ooc-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
horasal committed Nov 12, 2014
1 parent b5c2991 commit 44bd21e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions grammar/nagaqueen.leg
Original file line number Diff line number Diff line change
Expand Up @@ -1644,13 +1644,13 @@ Terminator = (CommentLine
)
WS = ([ \t] | Comment | EOL)*

OocDoc = "/**" < (!"*/" (EOL | .))* > "*/" { $$=nq_StringClone(yytext) } WS
| "///" < (!EOL .)* > EOL { $$=nq_StringClone(yytext) } WS
OocDoc = "/**" !'*' < (!"*/" (EOL | .))* > "*/" { $$=nq_StringClone(yytext) } WS
| "///" !'/' < (!EOL .)* > EOL { $$=nq_StringClone(yytext) } WS
| { $$="" }
Comment = (CommentLine | CommentMultiLine)
CommentLine = "//" !'/' (!EOL .)* EOL
CommentMultiLine = "/*" !'*' (!"*/" (EOL | CommentMultiLineWithDocs | .))* CLOS_COMMENT ~{ throwError(NQE_UNCLOSED_COMMENT, "Unclosed multi-line comment!\n"); }
CommentMultiLineWithDocs = "/*" (!"*/" (EOL | CommentMultiLineWithDocs | .))* CLOS_COMMENT ~{ throwError(NQE_UNCLOSED_COMMENT, "Unclosed multi-line comment!\n"); }
CommentLine = "//" ('/' '/'+)? (!EOL .)* EOL
CommentMultiLine = "/*" ('*' '*'+)? (!"*/" (EOL | CommentMultiLineWithDocs | .))* CLOS_COMMENT ~{ throwError(NQE_UNCLOSED_COMMENT, "Unclosed multi-line comment!\n"); }
CommentMultiLineWithDocs = "/*" '*'? (!"*/" (EOL | CommentMultiLineWithDocs | .))* CLOS_COMMENT ~{ throwError(NQE_UNCLOSED_COMMENT, "Unclosed multi-line comment!\n"); }

INT_LIT_SUFFIX = [uUlL]*
FP_LIT_SUFFIX = ([fF] | [lL])?
Expand Down

0 comments on commit 44bd21e

Please sign in to comment.