mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Fix Preprocessor dropping some line directives
git-svn-id: file://localhost/svn/verilator/trunk/verilator@934 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
@@ -328,6 +328,7 @@ const char* V3PreProcImp::tokenName(int tok) {
|
||||
case VP_DEFINE : return("DEFINE");
|
||||
case VP_ELSE : return("ELSE");
|
||||
case VP_ELSIF : return("ELSIF");
|
||||
case VP_LINE : return("LINE");
|
||||
case VP_SYMBOL : return("SYMBOL");
|
||||
case VP_STRING : return("STRING");
|
||||
case VP_DEFVALUE : return("DEFVALUE");
|
||||
@@ -583,6 +584,10 @@ int V3PreProcImp::getToken() {
|
||||
for (int len=0; len<yyleng; len++) { if (yytext[len]=='\n') m_lineAdd++; }
|
||||
goto next_tok;
|
||||
}
|
||||
if (tok==VP_LINE) {
|
||||
addLineComment(0);
|
||||
goto next_tok;
|
||||
}
|
||||
// Deal with some special parser states
|
||||
switch (m_state) {
|
||||
case ps_TOP: {
|
||||
|
||||
Reference in New Issue
Block a user