Skip to content

Commit 8d30918

Browse files
committed
Fix #24 issue
1 parent 8eb66ff commit 8d30918

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

source/tcppLibrary.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,10 @@ namespace tcpp
16871687

16881688
std::string macroIdentifier = currToken.mRawView;
16891689

1690-
currToken = mpLexer->GetNextToken();
1690+
do {
1691+
currToken = mpLexer->GetNextToken();
1692+
} while (currToken.mType == E_TOKEN_TYPE::SPACE);
1693+
16911694
_expect(E_TOKEN_TYPE::NEWLINE, currToken.mType);
16921695

16931696
bool skip = std::find_if(mSymTable.cbegin(), mSymTable.cend(), [&macroIdentifier](auto&& item)
@@ -1709,7 +1712,10 @@ namespace tcpp
17091712

17101713
std::string macroIdentifier = currToken.mRawView;
17111714

1712-
currToken = mpLexer->GetNextToken();
1715+
do {
1716+
currToken = mpLexer->GetNextToken();
1717+
} while (currToken.mType == E_TOKEN_TYPE::SPACE);
1718+
17131719
_expect(E_TOKEN_TYPE::NEWLINE, currToken.mType);
17141720

17151721
bool skip = std::find_if(mSymTable.cbegin(), mSymTable.cend(), [&macroIdentifier](auto&& item)

0 commit comments

Comments
 (0)