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

Fixes #1009, fixes #879 issues w/C and C++ highlighting #1069

Merged

Conversation

vidarh
Copy link
Contributor

@vidarh vidarh commented Jan 18, 2019

  1. void foo(); without space before ";" does not highlight correctly.
  2. else if() in certain contexts highlights incorrectly.
  3. any error in a function definition or declaration has the potential
    to cause incorrect highlighting further down in the file.

Contains minor changes to Objc-C lexer to fix dependencies on the
C lexer that were broken by the C lexer fix.

…ghting

1. void foo(); without space before ";" does not highlight correctly.
2. else if() in certain contexts highlights incorrectly.
3. any error in a function definition or declaration has the potential
 to cause incorrect highlighting further down in the file.

Contains minor changes to Objc-C lexer to fix dependencies on the
C lexer that were broken by the C lexer fix.
@pyrmont
Copy link
Contributor

pyrmont commented May 17, 2019

For what it's worth, looks good to me!

@pyrmont
Copy link
Contributor

pyrmont commented May 28, 2019

@vidarh Sorry for the delay in getting around to this one :( Would it be possible to add some additional examples to the visual sample for the C or C++ files to show this fix in action?

@pyrmont pyrmont added the author-action The PR has been reviewed but action by the author is needed label May 28, 2019
@vidarh
Copy link
Contributor Author

vidarh commented May 28, 2019

@pyrmont The actual problem here is already showcased in pretty much every declaration in the already existing file. See the "void foo() ;" near the top (renders correctly) vs. the following "void foo() {" line (renders incorrectly). Or any declaration ending with a semicolon without space, like this (from the current file):

    static PyObject * call_function(PyObject ***, int);

@pyrmont
Copy link
Contributor

pyrmont commented May 28, 2019

@vidarh Oops. Checking it now!

@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 May 28, 2019
@vidarh
Copy link
Contributor Author

vidarh commented May 28, 2019

No problem - you're right in checking :) It'd be nice to consider adding a separate set of actual regression tests for these, as I think it'd be easier to check if we actually had specific cases for each bug, but at the same time it'd make the visual samples a huge mess to wade through (I'd argue the C one is already pointlessly big and complex - most of it is showcasing the exact same rules...)

@pyrmont
Copy link
Contributor

pyrmont commented May 28, 2019

@vidarh Speaking of that visual test, maybe it's a bit silly but would you be able to update the file to remove this comment?

/* Bug #277: C function prototype syntax highlighting broken if space before semicolon */

Among other things, that'll kick off a fresh CI build which should work now that we've finally got that configuration file updated. I'm otherwise ready to merge.

@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 May 28, 2019
@pyrmont pyrmont merged commit 95134f8 into rouge-ruby:master May 28, 2019
@pyrmont
Copy link
Contributor

pyrmont commented May 28, 2019

Feels good to clean up bugs that old! :D

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

None yet

2 participants