Skip to content

Instantly share code, notes, and snippets.

@atg
Created November 22, 2008 17:30
Show Gist options
  • Save atg/27886 to your computer and use it in GitHub Desktop.
Save atg/27886 to your computer and use it in GitHub Desktop.
<zone name="meta.preprocessor.c.include">
<starts-with>
<expression>^\s*#\s*(include|import)\b\s+</expression>
<capture number="1" name="keyword.control.import.include.c"/>
</starts-with>
<ends-with>
<expression>(?=(?://|/\*))|$</expression>
<capture number="1" name="keyword.control.import.include.c"/>
</ends-with>
<subzones>
<zone name="punctuation.separator.continuation.c">
<expression>(?>\\\s*\n)</expression>
</zone>
<zone name="string.quoted.double.include.c">
<starts-with>
<expression>"</expression>
<capture number="0" name="punctuation.definition.string.begin.c"/>
</starts-with>
<ends-with>
<expression>"</expression>
<capture number="0" name="punctuation.definition.string.end.c"/>
</ends-with>
</zone>
<zone name="string.quoted.other.lt-gt.include.c">
<starts-with>
<expression>&lt;</expression>
<capture number="0" name="punctuation.definition.string.begin.c"/>
</starts-with>
<ends-with>
<expression>></expression>
<capture number="0" name="punctuation.definition.string.end.c"/>
</ends-with>
</zone>
</subzones>
</zone>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment