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

Add GDScript language support #1036

Merged
merged 6 commits into from
Jul 18, 2019
Merged

Add GDScript language support #1036

merged 6 commits into from
Jul 18, 2019

Conversation

leonidboykov
Copy link
Contributor

@leonidboykov leonidboykov commented Nov 17, 2018

Added support for Godot GDScript language. Mostly copied from Pygments and Chroma versions.

Resolves #1016 and gitlab-org/gitlab-ce#19663.

I've also pushed PR #1034 because Str::Affix is missing in rouge, but it is used in original lexers (I've used Str::Char as replacement).
Update: replaced Str::Char with Str::Affix.

Copy link
Contributor

@pyrmont pyrmont left a comment

Choose a reason for hiding this comment

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

Sorry it's taken so long to get to this. Please feel free to ask if you have any questions!

lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
@pyrmont pyrmont added author-action The PR has been reviewed but action by the author is needed and removed needs-review The PR needs to be reviewed labels Jun 14, 2019
@leonidboykov
Copy link
Contributor Author

@pyrmont I've put variables behind methods, but I am not sure about other issues. These rules are based on Pygments implementation, I'm neither Ruby developer nor regex guru :)

@pyrmont pyrmont added needs-review The PR needs to be reviewed and removed author-action The PR has been reviewed but action by the author is needed labels Jun 25, 2019
Copy link
Contributor

@pyrmont pyrmont left a comment

Choose a reason for hiding this comment

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

Some more comments.

lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Outdated Show resolved Hide resolved
spec/visual/samples/gdscript Show resolved Hide resolved
lib/rouge/lexers/gdscript.rb Show resolved Hide resolved
@pyrmont pyrmont added author-action The PR has been reviewed but action by the author is needed and removed needs-review The PR needs to be reviewed labels Jun 27, 2019
@leonidboykov
Copy link
Contributor Author

@pyrmont sorry for a long delay. I've tried to fix all the issues with the rules.

@pyrmont
Copy link
Contributor

pyrmont commented Jul 17, 2019

@leonidboykov No worries. Thanks for all the work! There are 2 outstanding points:

  1. This comment about the use of backslashes to continue code across multiple lines.
  2. This comment regarding an incorrect use of groups.

@leonidboykov
Copy link
Contributor Author

@pyrmont I've committed fixes for that.

@pyrmont pyrmont merged commit b6411b1 into rouge-ruby:master Jul 18, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Jul 18, 2019

@leonidboykov Thanks for going through all the back and forth with me and I'm sorry for all the mistakes during the code review. I made quite a bit of extra work for you :(

On the positive side, it's great to have this lexer in Rouge! 🎉 We're currently on a two-week release cadence and the next release (3.7.0) will go out next Tuesday so this will very shortly be available as part of the gem. Thanks for making Rouge better for all its users :)

@pyrmont pyrmont removed the author-action The PR has been reviewed but action by the author is needed label Jul 18, 2019
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.

Syntax highlighting for godot / gdscript
2 participants