Files
carbon-lang/utils/textmate/Samples/comments.svg
T
Chandler Carruth 25b77cd3d4 Revert "Improve the TextMate grammar scopes and precision (#7888)" (#7909)
This reverts commit 65a3c2b36a.

It was merged by accident with a dependent change. Will re-land
independently.
2026-10-06 20:17:51 +00:00

21 lines
3.3 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="721" height="328" viewBox="0 0 721 328">
<rect width="100%" height="100%" fill="#1f1f1f"/>
<g xml:space="preserve" font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace" font-size="14">
<text style="white-space:pre" x="12" y="26"><tspan fill="#6e7681"> 1 </tspan><tspan fill="#6a9955">// Part of the Carbon Language project, under the Apache License v2.0 with LLVM</tspan></text>
<text style="white-space:pre" x="12" y="45"><tspan fill="#6e7681"> 2 </tspan><tspan fill="#6a9955">// Exceptions. See /LICENSE for license information.</tspan></text>
<text style="white-space:pre" x="12" y="64"><tspan fill="#6e7681"> 3 </tspan><tspan fill="#6a9955">// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception</tspan></text>
<text style="white-space:pre" x="12" y="83"><tspan fill="#6e7681"> 4 </tspan></text>
<text style="white-space:pre" x="12" y="102"><tspan fill="#6e7681"> 5 </tspan><tspan fill="#6a9955">// This is a comment.</tspan></text>
<text style="white-space:pre" x="12" y="121"><tspan fill="#6e7681"> 6 </tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#6a9955">// Comment with whitespace.</tspan></text>
<text style="white-space:pre" x="12" y="140"><tspan fill="#6e7681"> 7 </tspan><tspan fill="#6a9955">// class C; fn F[T: A](a: T) -&gt; i32 { return 86; }</tspan></text>
<text style="white-space:pre" x="12" y="159"><tspan fill="#6e7681"> 8 </tspan><tspan fill="#6a9955">//</tspan><tspan fill="#569cd6">@dump-sem-ir-begin</tspan></text>
<text style="white-space:pre" x="12" y="178"><tspan fill="#6e7681"> 9 </tspan><tspan fill="#6a9955">//</tspan><tspan fill="#569cd6">@dump-sem-ir-end</tspan></text>
<text style="white-space:pre" x="12" y="197"><tspan fill="#6e7681">10 </tspan><tspan fill="#6a9955">//</tspan><tspan fill="#569cd6">@include-in-dumps</tspan></text>
<text style="white-space:pre" x="12" y="216"><tspan fill="#6e7681">11 </tspan><tspan fill="#6a9955">//@dump-sem-ir-</tspan></text>
<text style="white-space:pre" x="12" y="235"><tspan fill="#6e7681">12 </tspan><tspan fill="#6a9955">//no whitespace after double slash</tspan></text>
<text style="white-space:pre" x="12" y="254"><tspan fill="#6e7681">13 </tspan><tspan fill="#d4d4d4">/* </tspan><tspan fill="#9cdcfe">invalid</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#9cdcfe">comment</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#9cdcfe">pattern</tspan><tspan fill="#d4d4d4">. */</tspan></text>
<text style="white-space:pre" x="12" y="273"><tspan fill="#6e7681">14 </tspan><tspan fill="#6a9955">/// invalid comment pattern.</tspan></text>
<text style="white-space:pre" x="12" y="292"><tspan fill="#6e7681">15 </tspan><tspan fill="#569cd6">class</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#4ec9b0">C</tspan><tspan fill="#d4d4d4">; </tspan><tspan fill="#6a9955">// Comment after a statement/expression/declaration.</tspan></text>
<text style="white-space:pre" x="12" y="311"><tspan fill="#6e7681">16 </tspan><tspan fill="#569cd6">var</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#9cdcfe">x</tspan><tspan fill="#d4d4d4">: </tspan><tspan fill="#4ec9b0">i32</tspan><tspan fill="#d4d4d4"> = </tspan><tspan fill="#b5cea8">1</tspan><tspan fill="#d4d4d4">;</tspan><tspan fill="#6a9955">// Trailing, with no space before the introducer.</tspan></text>
</g></svg>