Commit 7d0bd088 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[torque] improve VSCode syntax highlighting more

- fix highliting of extends clause in types
- label constants as constants

Change-Id: Iad1682a5c294dc1999067f4e43feb4aada7e1ced
Reviewed-on: https://chromium-review.googlesource.com/c/1451924
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59338}
parent bf9a7c52
......@@ -17,19 +17,8 @@
"match": "\\b(assert|check|debug|unreachable|Cast|Convert|FromConstexpr|UnsafeCast)\\b"
},
{
"match": "\\b(extends)\\s+([A-Za-z0-9]+)",
"captures": {
"1": {
"name": "keyword.other.torque"
},
"2": {
"name": "support.type"
}
}
},
{
"name": "support.variable.torque",
"match": "\\b(true|True|false|False|Undefined|Hole|Null)\\b"
"name": "constant.other.torque",
"match": "\\b(true|True|false|False|Undefined|Hole|Null|k[A-Z][A-Za-z0-9]+)\\b"
},
{
"begin": "\\b<(?=[A-Za-z][0-9A-Za-z_|, ]*>)",
......@@ -95,6 +84,17 @@
"repository": {
"common": {
"patterns": [
{
"match": "\\b(extends)\\s+([A-Za-z0-9]+)",
"captures": {
"1": {
"name": "keyword.other.torque"
},
"2": {
"name": "support.type.torque"
}
}
},
{
"name": "keyword.control.torque",
"match": "\\b(if|else|while|for|return|continue|break|goto|otherwise|try|label|catch)\\b"
......@@ -114,7 +114,7 @@
"name": "keyword.other.torque"
},
"2": {
"name": "support.type"
"name": "support.type.torque"
}
}
},
......@@ -125,7 +125,7 @@
"name": "keyword.other.torque"
},
"2": {
"name": "support.type"
"name": "support.type.torque"
}
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment