Skip to content

Commit

Permalink
🐛 atom#233
Browse files Browse the repository at this point in the history
Fix issue with spec.coffee failing. Message were not
properly tagged.
  • Loading branch information
Frédéric Nadeau, ing committed Nov 6, 2017
1 parent 6b00fcb commit 80b5cca
Showing 1 changed file with 48 additions and 3 deletions.
51 changes: 48 additions & 3 deletions grammars/c.cson
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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': '"|(?<!\\\\)(?=\\s*\\n)'
'endCaptures':
'0':
'name': 'punctuation.definition.string.end.c'
'name': 'string.quoted.double.c'
'patterns': [
{
'include': '#line_continuation_character'
}
]
}
{
# single 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': '\'|(?<!\\\\)(?=\\s*\\n)'
'endCaptures':
'0':
'name': 'punctuation.definition.string.end.c'
'name': 'string.quoted.single.c'
'patterns': [
{
'include': '#line_continuation_character'
}
]
}
{
# unquoted strings patterns for #error/warning lines (terminates at newline w/o line_continuation_character)
'begin': '[^\'"]'
'end': '(?<!\\\\)(?=\\s*\\n)'
'name': 'string.unquoted.single.c'
'patterns': [
{
'include': '#line_continuation_character'
}
{
'include': '#comments'
}
]
}
]
}
Expand Down

0 comments on commit 80b5cca

Please sign in to comment.