Skip to content

Commit

Permalink
Fix nested #if 0 not working.
Browse files Browse the repository at this point in the history
Bug: issue #989
Test: new test csae
  • Loading branch information
dvander committed Nov 29, 2024
1 parent ebe6a5b commit 8e1f63f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ void Lexer::HandleSkippedSection() {

if (!IsSkipping())
return;
break;
continue;

default:
continue;
Expand Down
8 changes: 8 additions & 0 deletions tests/compile-only/ok-nested-preproc-if.sp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public void main()
{
#if 0
#if 0
return;
#endif
#endif
}

0 comments on commit 8e1f63f

Please sign in to comment.