Skip to content

Commit 47fac06

Browse files
committed
add change-sync notice
1 parent 0534a17 commit 47fac06

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mlir/utils/pygments/mlir_lexer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class VariableList(RegexLexer):
5959
r"^(\s*)(![_A-Za-z0-9\$\-\.]+)(\b)(\s*=)",
6060
bygroups(Text, Keyword.Type, Text, Operator),
6161
),
62-
# SSA values (results, uses)
62+
# SSA values (uses)
6363
(r"%[_A-Za-z0-9\.\$\-:#]+", Name.Variable),
6464
# attribute refs, constants and named attributes
6565
(r"#[_A-Za-z0-9\$\-\.]+\b", Name.Constant),
@@ -69,6 +69,7 @@ class VariableList(RegexLexer):
6969
(r"\^[A-Za-z0-9_\$\.\-]+", Name.Label),
7070
# types by exclamation or builtin names
7171
(r"![_A-Za-z0-9\$\-\.]+\b", Keyword.Type),
72+
# NOTE: please sync changes to corresponding builtin type rule in "angled-type"
7273
(r"\b(bf16|f16|f32|f64|f80|f128|index|none|(u|s)?i[0-9]+)\b", Keyword.Type),
7374
# container-like dialect types (tensor<...>, memref<...>, vector<...>)
7475
(
@@ -100,7 +101,7 @@ class VariableList(RegexLexer):
100101
(r'[^"\\]+', String.Double),
101102
(r'"', String.Double, "#pop"),
102103
],
103-
# angled-type content (simple nested handling)
104+
# angled-type content
104105
"angled-type": [
105106
# match nested '<' and '>'
106107
(r"<", Punctuation, "#push"),
@@ -115,6 +116,7 @@ class VariableList(RegexLexer):
115116
# the 'x' dimension separator (treat as punctuation)
116117
(r"x", Punctuation),
117118
# element / builtin types inside angle brackets (no word-boundary)
119+
# NOTE: please sync changes to corresponding builtin type rule in "root"
118120
(
119121
r"(?:bf16|f16|f32|f64|f80|f128|index|none|(?:[us]?i[0-9]+))",
120122
Keyword.Type,

0 commit comments

Comments
 (0)