Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Escaped characters in format strings in C are not being highlighted with the new tree-sitter parser #304

Open
1 task done
ghost opened this issue Nov 1, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 1, 2018

@prati0100 commented on Nov 1, 2018, 4:45 PM UTC:

Prerequisites

Description

When using %s, %d, etc the %s part is not highlighted in tree-sitter parser. Without tree-sitter they are highlighted. I thought it would belong better in atom/language-c, but then I checked the scopes, and they are different with tree-sitter and without, so I'm guessing this is a better place. Apologies if it isn't.

Steps to Reproduce

  1. Use escaped characters like %d, %s in format strings.

Expected behavior: The escaped characters should be highlighted differently from the rest of the string
without

Scope:

  • source.c
  • meta.block.c
  • string.quoted.double.c
  • constant.other.placeholder.c

Actual behavior: They are not highlighted
with

Scope:

  • source.c
  • string.quoted.double

Reproduces how often: 100%

Versions

atom --version:
Atom : 1.32.1
Electron: 2.0.9
Chrome : 61.0.3163.100
Node : 8.9.3

apm --version:
apm 2.1.2
npm 6.2.0
node 8.9.3 x64
atom 1.32.1
python 2.7.12
git 2.18.0

OS:
Ubuntu 16.04

Kernel:
Linux 4.4.0-97-generic #120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

This issue was moved by rsese from atom/atom#18380.

@rsese
Copy link

rsese commented Nov 1, 2018

Thanks for the report @prati0100! Another maintainer mentioned that this seems like the same issue referenced in atom/language-go#158 (review) which ties into a higher-level (not just C-specific) issue at atom/atom#18196.

Feel free to subscribe to atom/atom#18196 if for updates you'd like and we'll keep this open for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant