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

Nested Types cause parse failures #8

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

Nested Types cause parse failures #8

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

Comments

@d-c-d
Copy link

d-c-d commented Jun 15, 2020

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

Failing (1)
	Expected EqualSign but found ProcedureKeyword (1)
		.\NestedClass.pas:263

The Offending file is here on github?
https://github.com/MarcoDelphiBooks/ObjectPascalHandbook/tree/master/07/NestedTypes

Stripping down the code to this:

unit NestedClass;

interface

type
  TOne = class
  public
    type TInside = class
      type TInsideInside = class
      end;
    public
      procedure InsideHello;
    end;
  end;

end.

--- We still get the error

Failing (1)
	Expected EqualSign but found ProcedureKeyword (1)
		.\NestedClass.pas:145

Will need to study this some more

See: http://docwiki.embarcadero.com/RADStudio/Rio/en/Nested_Type_Declarations

I manually applied the pull request #2
Fix the wrong look-ahead for the TypeDecl rule #2
and it fixes the above issue ( Thanks tomalla5120x ! )

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