Skip to content

Conversation

@xpqz
Copy link
Contributor

@xpqz xpqz commented Mar 12, 2021

Two small tweaks to the APL lexer

  1. Add all APL file suffixes
  2. Allow leading _ in variable names (GNU APL, Dyalog)

1. Add all APL file suffixes
2. Allow leading _ in variable names (GNU APL, Dyalog)
@rodrigogiraoserrao
Copy link

This PR is more useful than it may seem, as _← is a common idiom in APL programming.
There's also the fact that leading underscores are used commonly as the leading character of dop names.

@Anteru
Copy link
Collaborator

Anteru commented Mar 12, 2021

Thanks! Can you please regenerate the mapfiles as well (make mapfiles), otherwise the file endings won't get picked up. Would you mind adding/extending one of the APL tests to capture this as well? Not required but would be nice to have so it doesn't regress.

xpqz added 2 commits March 12, 2021 17:54
 1. Leading underscores for variables OK (Dyalog, GNU)
@xpqz
Copy link
Contributor Author

xpqz commented Mar 15, 2021

@Anteru Thanks for your comments. I've regenerated the mapfiles and added a testcase (there weren't many for APL...) to demonstrate the modification as per your suggestions.

@Anteru Anteru merged commit 18a1d88 into pygments:master Mar 15, 2021
@Anteru
Copy link
Collaborator

Anteru commented Mar 15, 2021

Merged, thanks a lot!

@Anteru Anteru added this to the 2.9 milestone Mar 15, 2021
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.

3 participants