Skip to content

Commit

Permalink
(#77) Preprocessor: ignore unknown pragmas
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Jul 15, 2023
1 parent d75fc8f commit ff2039e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Cesium.Preprocessor/CPreprocessor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Text;
using Cesium.Core;
Expand Down Expand Up @@ -391,14 +390,9 @@ IEnumerable<IToken<CPreprocessorTokenType>> ConsumeLineAll()
if (identifier == "once")
{
IncludeContext.RegisterGuardedFileInclude(CompilationUnitPath);
return Array.Empty<IToken<CPreprocessorTokenType>>();
}
else
{
throw new WipException(
77,
$"Preprocessor #pragma directive not supported: {keyword.Kind} {keyword.Text}.");
}

return Array.Empty<IToken<CPreprocessorTokenType>>();
}
default:
throw new WipException(
Expand Down

0 comments on commit ff2039e

Please sign in to comment.