mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add typeof to syntax highlighters. (#7859)
Assisted-by: Claude via Antigravity
This commit is contained in:
@@ -71,6 +71,7 @@ export default function (hljs) {
|
||||
'returned',
|
||||
'then',
|
||||
'type',
|
||||
'typeof',
|
||||
'_',
|
||||
'unused',
|
||||
'var',
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
>>= <=> <<= ->? &= ^= := :? == => != >= >> <= <> << <- -= -> -- %= |= += ++ /=
|
||||
*= ~= & @ ^ : = ! > < - % . | + ? / * ~ \
|
||||
and as impls in like not or where
|
||||
and as impls in like not or typeof where
|
||||
|
||||
// --- special-keywords
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<text style="white-space:pre" x="12" y="121"><tspan fill="#6e7681"> 6 </tspan></text>
|
||||
<text style="white-space:pre" x="12" y="140"><tspan fill="#6e7681"> 7 </tspan><tspan fill="#d4d4d4">>>= <=> <<= ->? &= ^= := :? == => != >= >> <= <> << <- -= -> -- %= |= += ++ /=</tspan></text>
|
||||
<text style="white-space:pre" x="12" y="159"><tspan fill="#6e7681"> 8 </tspan><tspan fill="#d4d4d4">*= ~= & @ ^ : = ! > < - % . | + ? / * ~ \</tspan></text>
|
||||
<text style="white-space:pre" x="12" y="178"><tspan fill="#6e7681"> 9 </tspan><tspan fill="#c586c0">and</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">as</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">impls</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">in</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">like</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">not</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">or</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">where</tspan></text>
|
||||
<text style="white-space:pre" x="12" y="178"><tspan fill="#6e7681"> 9 </tspan><tspan fill="#c586c0">and</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">as</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">impls</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">in</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">like</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">not</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">or</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">typeof</tspan><tspan fill="#d4d4d4"> </tspan><tspan fill="#c586c0">where</tspan></text>
|
||||
<text style="white-space:pre" x="12" y="197"><tspan fill="#6e7681">10 </tspan></text>
|
||||
<text style="white-space:pre" x="12" y="216"><tspan fill="#6e7681">11 </tspan><tspan fill="#6a9955">// --- special-keywords</tspan></text>
|
||||
<text style="white-space:pre" x="12" y="235"><tspan fill="#6e7681">12 </tspan></text>
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -463,7 +463,7 @@ THIS FILE IS AUTOGENERATED FROM carbon.tmLanguage.json. DO NOT EDIT.
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(and|as|impls|in|like|not|or|where)\b</string>
|
||||
<string>\b(and|as|impls|in|like|not|or|typeof|where)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.carbon</string>
|
||||
</dict>
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
"template"
|
||||
"then"
|
||||
"type"
|
||||
; "typeof"
|
||||
"var"
|
||||
"virtual"
|
||||
"where"
|
||||
|
||||
@@ -56,6 +56,7 @@ syn keyword carbonKeywordSelf Self
|
||||
syn keyword carbonKeywordAs as
|
||||
syn keyword carbonKeywordTemplate template
|
||||
syn keyword carbonKeywordStatic static
|
||||
syn keyword carbonKeywordTypeOf typeof
|
||||
syn keyword carbonKeywordExternal external
|
||||
syn keyword carbonKeywordForAll forall
|
||||
syn keyword carbonKeywordAPI api
|
||||
@@ -99,6 +100,7 @@ hi def link carbonKeywordSelf carbonKeyword
|
||||
hi def link carbonKeywordAs carbonKeyword
|
||||
hi def link carbonKeywordTemplate carbonKeyword
|
||||
hi def link carbonKeywordStatic carbonKeyword
|
||||
hi def link carbonKeywordTypeOf carbonKeyword
|
||||
hi def link carbonKeywordExternal carbonKeyword
|
||||
hi def link carbonKeywordForAll carbonKeyword
|
||||
hi def link carbonKeywordAPI Structure
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.carbon",
|
||||
"match": "\\b(and|as|impls|in|like|not|or|where)\\b"
|
||||
"match": "\\b(and|as|impls|in|like|not|or|typeof|where)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.other.carbon",
|
||||
|
||||
Reference in New Issue
Block a user