Skip to content

Commit 2c784d7

Browse files
CyberShadowdlang-bot
authored andcommitted
spec/lex.dd: Allow __LINE__ in #line SpecialTokenSequence
This token is explicitly supported by DMD in this context.
1 parent 5eedb64 commit 2c784d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/lex.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,8 +1097,8 @@ $(H2 $(LEGACY_LNAME2 Special Token Sequence, special-token-sequence, Special Tok
10971097

10981098
$(GRAMMAR
10991099
$(GNAME SpecialTokenSequence):
1100-
$(D # line) $(GLINK IntegerLiteral) $(GLINK EndOfLine)
1101-
$(D # line) $(GLINK IntegerLiteral) $(GLINK Filespec) $(GLINK EndOfLine)
1100+
$(D # line) $(GLINK IntegerLiteral) $(GLINK Filespec)$(OPT) $(GLINK EndOfLine)
1101+
$(D # line) $(D __LINE__) $(GLINK Filespec)$(OPT) $(GLINK EndOfLine)
11021102
)
11031103
$(GRAMMAR_LEX
11041104
$(GNAME Filespec):

0 commit comments

Comments
 (0)