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

Preprocessor lines don't recognize '_' #21

Open
fbrau opened this issue Jul 22, 2016 · 1 comment
Open

Preprocessor lines don't recognize '_' #21

fbrau opened this issue Jul 22, 2016 · 1 comment

Comments

@fbrau
Copy link

fbrau commented Jul 22, 2016

Look at the pics, the "-include_lib" directive (parsed as preprocessor) displays
"-include" in color but the rest "_lib" in normal font. This commit fixes it.
I guess this also rules on C based languages too, so I post the patch here.

`
changeset: 108:805ca85ab8ba
branch: fran-stable
tag: tip
user: memo_ao756
date: Fri Jul 22 16:16:21 2016 -0300
files: dmsyntax.c
description:
fixes preprocessor parsing ends at '_' in preprocessor lines

In erlang, for example this is valid. Dont' know other languages...

diff -r c58302a54a7a -r 805ca85ab8ba dmsyntax.c
--- a/dmsyntax.c Fri Jun 24 00:16:30 2016 -0300
+++ b/dmsyntax.c Fri Jul 22 16:16:21 2016 -0300
@@ -1504,7 +1504,7 @@
{
sinfo->token = PREPWORD;
}

  •       else if (sinfo->token == PREPWORD && !elvalnum(*cp))
    
  •       else if (sinfo->token == PREPWORD && !elvalnum(*cp) && *cp != '_')
        {
            sinfo->token = PUNCT;
            expectprepq = ElvTrue;
    

`

faulty

fixed

@mbert
Copy link
Owner

mbert commented Jul 23, 2016

That would be fixed by your patch. See my comment under your pull request.

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