Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Source/DGrok.Framework/Framework/TokenFilter.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public TokenFilter(IEnumerable<Token> tokens, CompilerDefines compilerDefines,
_directiveTypes["WARNINGS"] = DirectiveType.Ignored;
_directiveTypes["WEAKPACKAGEUNIT"] = DirectiveType.Ignored;
_directiveTypes["WRITEABLECONST"] = DirectiveType.Ignored;
_directiveTypes["ZEROBASEDSTRINGS"] = DirectiveType.Ignored;
// Directives for generation of C++Builder .hpp files
_directiveTypes["EXTERNALSYM"] = DirectiveType.Ignored;
_directiveTypes["HPPEMIT"] = DirectiveType.Ignored;
Expand Down
6 changes: 6 additions & 0 deletions Source/DGrok.Tests/TokenFilterTests.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ public void CPlusPlusBuilderCompilerDirectivesAreIgnored()
Assert.That("{$NOINCLUDE Foo}", LexesAndFiltersAs());
}
[Test]
public void ZeroBasedStringsCompilerDirectivesAreIgnored()
{
Assert.That("{$ZEROBASEDSTRINGS ON}", LexesAndFiltersAs());
Assert.That("{$ZEROBASEDSTRINGS OFF}", LexesAndFiltersAs());
}
[Test]
public void IfDefTrue()
{
Assert.That("0{$IFDEF TRUE}1{$ENDIF}2", LexesAndFiltersAs(
Expand Down