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

Update Logtalk lexer for the latest language specification #1261

Merged
merged 1 commit into from
Nov 25, 2019

Conversation

pmoura
Copy link
Contributor

@pmoura pmoura commented Nov 24, 2019

Tested using the sample Logtalk source file available at:
https://github.com/LogtalkDotOrg/logtalk3/tree/master/coding/tests

Copy link
Collaborator

@Anteru Anteru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the comments -- I don't understand some of the changes.

],

'quoted_atom': [
(r"''", String),
(r"'", String, '#pop'),
(r"['][']", String),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please shed some light on this? Why is a character class selector?

Copy link
Contributor Author

@pmoura pmoura Nov 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer remember the motivation here. These changes are old (the original pull request was on BitBucket more than one year ago). But it works fine as I'm using this submitted version on a regular basis on a patched Pygments installation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please give it a shot with "''" again? Other than that, should be ok to merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace occurrences of ['] with ' and re-run the tests. No issues. Pushed the changes.

pygments/lexers/prolog.py Show resolved Hide resolved
pygments/lexers/prolog.py Show resolved Hide resolved
@Anteru Anteru added the T-feature type: a new feature label Nov 24, 2019
Copy link
Collaborator

@Anteru Anteru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please convert "['][']" to '' where applicable.

Copy link
Collaborator

@Anteru Anteru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looking good!

@Anteru Anteru added this to the 2.5 milestone Nov 24, 2019
@birkenfeld birkenfeld merged commit 36860f1 into pygments:master Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-feature type: a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants