Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to parse ZEROBASEDSTRINGS compiler directive #6

Open
d-c-d opened this issue Jun 14, 2020 · 0 comments
Open

Failure to parse ZEROBASEDSTRINGS compiler directive #6

d-c-d opened this issue Jun 14, 2020 · 0 comments

Comments

@d-c-d
Copy link

d-c-d commented Jun 14, 2020

The examples that come with the Object Pascal Handbook yield the following parse error

	Unrecognized compiler directive 'ZEROBASEDSTRINGS' (1)
		.\StringMetaTestForm.pas:651

The offending line in ObjectPascalHandbook/06/StringMetaTest/StringMetaTestForm.pas is
31:{$ZEROBASEDSTRINGS ON}

This example can be found here on github:
https://github.com/MarcoDelphiBooks/ObjectPascalHandbook/tree/master/06/StringMetaTest
ZEROBASEDSTRINGS is described here:
http://docwiki.embarcadero.com/RADStudio/Rio/en/Zero-based_strings_(Delphi)

Assuming that we need to add
_directiveTypes["ZEROBASEDSTRINGS"] = DirectiveType.Ignored;
to the TokenFilter constructor in TokenFilter.cs

d-c-d added a commit to d-c-d/dgrok that referenced this issue Jun 15, 2020
Fix issue Failure to parse ZEROBASEDSTRINGS compiler directive
  joewhite#6  joewhite#6

Add an ignored directive type for ZEROBASEDSTRINGS
to Source/DGrok.Framework/Framework/TokenFilter.cs

Add a new test case ZeroBasedStringsCompilerDirectivesAreIgnored()
to verifiy that {$ZEROBASEDSTRINGS ... } is ignored
  ( doesn't really check the value of the parameter ON/OFF )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant