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

Add missing format parsing #234

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion grammars/c.cson
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,8 @@
((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width
(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision
(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier
[diouxXDOUeEfFgGaACcSspn%] # conversion type
((m?\\[((\\^\\]|\\])?[^\\]]+)\\])|m[sc]|[diouxXDOUeEfFgGaACcSspnm]) # conversion type
| %% # literal %
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be a single %?

Copy link
Author

@fnadeau fnadeau Jul 11, 2017

Choose a reason for hiding this comment

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

No, you'll end up with this (line 48):
image

because of the | (or) on line 715, you need two '%'. Previously, the literal '%' was match using two: first on line 707 and second one on line 714.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I missed the |. Thanks for explaining.

'''
'name': 'constant.other.placeholder.c'
}
Expand Down