discard block comments delimited with /* */

This commit is contained in:
anderoonies
2020-10-14 11:59:14 -04:00
parent 42b3a17356
commit 55be77be69
15 changed files with 65 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
/* block comments containing /* throw warnings */
PRINTT "reachable\n"

View File

@@ -0,0 +1,2 @@
warning: block-comment-contents-error.asm(1): [-Wnested-comment]
/* in block comment

View File

@@ -0,0 +1 @@
reachable

View File

@@ -0,0 +1 @@
PRINTT /* block comments must terminate before EOF

View File

@@ -0,0 +1,5 @@
ERROR: block-comment-termination-error.asm(1):
Unterminated block comment
ERROR: block-comment-termination-error.asm(1):
syntax error
error: Assembly aborted (2 errors)!

View File

@@ -0,0 +1,5 @@
PRINTT /* block comments are ignored // ** */ "hi\n"
PRINTT "block (/* ... */) comments at ends of line are fine\n" /* hi */
PRINTT /* block comments
can span multiple lines
*/ "mutliline\n"

View File

View File

@@ -0,0 +1,3 @@
hi
block (/* ... */) comments at ends of line are fine
mutliline

View File

@@ -0,0 +1,2 @@
PRINTT /* // PRINTT "this is **comm //ented out\n" */ "this is not commented out\n"
PRINTT /*//*/ "this is not commented out\n"

View File

@@ -0,0 +1,2 @@
warning: weird-comments.asm(2): [-Wnested-comment]
/* in block comment

View File

@@ -0,0 +1,2 @@
this is not commented out
this is not commented out