From 6b00fcbf85b25b8360ecc64707bfcfc6663bda34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Nadeau=2C=20ing?= Date: Tue, 31 Oct 2017 17:04:12 -0400 Subject: [PATCH 1/2] :bug: #233 Fix highlight of error directive --- grammars/c.cson | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/grammars/c.cson b/grammars/c.cson index c04ce5e..c7472be 100644 --- a/grammars/c.cson +++ b/grammars/c.cson @@ -100,15 +100,9 @@ 'name': 'keyword.control.directive.diagnostic.$3.c' '2': 'name': 'punctuation.definition.directive.c' - 'end': '(? Date: Mon, 6 Nov 2017 13:53:34 -0500 Subject: [PATCH 2/2] :bug: #233 Fix issue with spec.coffee failing. Message were not properly tagged. --- grammars/c.cson | 51 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/grammars/c.cson b/grammars/c.cson index c7472be..f99de68 100644 --- a/grammars/c.cson +++ b/grammars/c.cson @@ -94,8 +94,8 @@ ] } { - 'begin': '^\\s*((#)\\s*(error|warning))\\b' - 'captures': + 'begin': '^\\s*((#)\\s*(error|warning))\\b\\s*' + 'beginCaptures': '1': 'name': 'keyword.control.directive.diagnostic.$3.c' '2': @@ -104,7 +104,52 @@ 'name': 'meta.preprocessor.diagnostic.c' 'patterns': [ { - 'include': '#line_continuation_character' + # double quoted string patterns for #error/warning lines (terminates at newline w/o line_continuation_character) + 'begin': '"' + 'beginCaptures': + '0': + 'name': 'punctuation.definition.string.begin.c' + 'end': '"|(?