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

Disambiguate free pascal and puppet #1845

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

tancnle
Copy link
Collaborator

@tancnle tancnle commented Jun 30, 2022

Both free pascal and puppet are sharing the same file extension, that is .pp. This change adds .pp as a possible extension for the pascal lexer and disambiguates between puppet and pascal using keywords.

Addresses #1842

@tancnle tancnle force-pushed the bugfix.free-pascal-detection branch from f249ef2 to f14aeb4 Compare June 30, 2022 09:41
@tancnle
Copy link
Collaborator Author

tancnle commented Jun 30, 2022

@Alexey-T could you help to review this PR and verify if it addresses the reported issue? 🙏🏼

@tancnle tancnle force-pushed the bugfix.free-pascal-detection branch from f14aeb4 to d05d0c6 Compare July 2, 2022 10:14
@Alexey-T
Copy link

Alexey-T commented Jul 2, 2022

            function Name : integer;
            begin
              Name := 2;
              Name := Name + 1
            end.

not correct snippet! end with dot is only at the end of UNIT FILE, but end of a function has end;.

Both free pascal and puppet are sharing the same file extension, that is
`.pp`. This change adds `.pp` as a possible extension for pascal lexer
and disambiguates them using keywords.
@tancnle tancnle force-pushed the bugfix.free-pascal-detection branch from d05d0c6 to e8c225b Compare July 2, 2022 11:28
@tancnle
Copy link
Collaborator Author

tancnle commented Jul 2, 2022

not correct snippet! end with dot is only at the end of UNIT FILE, but end of a function has end;.

Gotcha 👍🏼. Thanks for noting this. I have fixed the snippet in the test and extended the rules to cater for both end; and end.

@tancnle tancnle merged commit 3da7ac7 into rouge-ruby:master Jul 7, 2022
@tancnle tancnle deleted the bugfix.free-pascal-detection branch July 7, 2022 09:28
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

Successfully merging this pull request may close these issues.

None yet

2 participants