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

NS[C]Assert Quote Highlighting Skips Openquote #5

Open
nrichards opened this issue Dec 3, 2014 · 1 comment
Open

NS[C]Assert Quote Highlighting Skips Openquote #5

nrichards opened this issue Dec 3, 2014 · 1 comment

Comments

@nrichards
Copy link

Originally reported here: sublimehq/sublime_text#591. Then reported directly to GitHub who referred me to Linguist. They referred to this repository.

The quote (") syntax highlighting can carry on highlighting until the end of file, skipping / ignoring an opening quote, honoring only the closing quote, given a specific Objective-C code block.

I expect for the quote character to start highlighting at an opening quote.

Seen on GitHub, currently, in their Issue Tracker.

1 Create a new Objective-C file, e.g. "foo.m"
2 Input the following code block:

 - (void)foo {
   NSCAssert((1), @";");
   int four = 4;
 }

3 NOTICE the latter lines, beginning with int, are highlighted as if quoted.

Expecting the int line to not be quoted. Xcode renders this code correctly.

WORKAROUND: remove the semicolon (;) from the quoted string.

@infininight
Copy link
Member

Doing some investigation for a bug report I found the culprit here, second affected sample:

static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
    GST_PAD_SRC,
    GST_PAD_ALWAYS,
    GST_STATIC_CAPS ("video/x-raw, "
        "format = (string) { NV12, UYVY, YUY2 }, "
        "framerate = " GST_VIDEO_FPS_RANGE ", "

        GST_VIDEO_CAPS_MAKE_WITH_FEATURES
        (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
            "RGBA") "; "
));

The issue is in the C grammar in the #parens repository item, it does not support nesting parens. Unsure if there is a reason for this omission or if it has been left out by mistake.

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

No branches or pull requests

2 participants