|
82 | 82 | <!-- ^^^^^^^^^^^^^^^^^^^^^^^ source.cs string.quoted.double - text.html --> |
83 | 83 | <!-- ^ punctuation.section.embedded.end --> |
84 | 84 | @Html.Raw("<span>Hello World</span>") |
85 | | -<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call --> |
86 | | -<!-- ^^^ variable.function --> |
87 | | -<!-- <- punctuation.section.embedded.line --> |
88 | | -<!-- ^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double --> |
89 | | -<!-- ^ punctuation.section.group.end --> |
| 85 | +<!--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.cs.embedded.html --> |
| 86 | +<!--^ variable.language.this.razor --> |
| 87 | +<!-- ^ punctuation.accessor.dot.cs --> |
| 88 | +<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.cs --> |
| 89 | +<!-- ^^^ variable.function.cs --> |
| 90 | +<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.group.cs --> |
| 91 | +<!-- ^ punctuation.section.group.begin.cs --> |
| 92 | +<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.cs string.quoted.double.cs --> |
| 93 | +<!-- ^ punctuation.definition.string.begin.cs --> |
| 94 | +<!-- ^ punctuation.definition.string.end.cs --> |
| 95 | +<!-- ^ punctuation.section.group.end.cs --> |
90 | 96 |
|
91 | 97 | @if (value % 2 == 0) |
92 | 98 | <!-- ^ punctuation.section.embedded - source.cs --> |
@@ -125,19 +131,103 @@ else |
125 | 131 | <!-- ^^^^^ keyword.control.flow.break --> |
126 | 132 | } |
127 | 133 |
|
128 | | -@* |
| 134 | +@do { |
| 135 | +<!--^^ meta.block.cs --> |
| 136 | +<!--^ punctuation.section.block.begin.cs --> |
| 137 | + <p>@foo</p> |
| 138 | +<!--^^^^^^^^^^^^ meta.block.cs --> |
| 139 | +<!--^^^ meta.tag.block.any.html --> |
| 140 | +<!--^ punctuation.definition.tag.begin.html --> |
| 141 | +<!-- ^ entity.name.tag.block.any.html --> |
| 142 | +<!-- ^ punctuation.definition.tag.end.html --> |
| 143 | +<!-- ^ punctuation.section.embedded.line.cs-razor --> |
| 144 | +<!-- ^^^ variable.other.cs --> |
| 145 | +<!-- ^^^^ meta.tag.block.any.html --> |
| 146 | +<!-- ^^ punctuation.definition.tag.begin.html --> |
| 147 | +<!-- ^ entity.name.tag.block.any.html --> |
| 148 | +<!-- ^ punctuation.definition.tag.end.html --> |
| 149 | +} |
| 150 | +while (foo <= 5) |
| 151 | +<!--^ keyword.control.loop.while.cs --> |
| 152 | +<!-- ^^^^^^^^^^ meta.group.cs --> |
| 153 | +<!-- ^ punctuation.section.group.begin.cs --> |
| 154 | +<!-- ^^^ variable.other.cs --> |
| 155 | +<!-- ^^ keyword.operator.comparison.cs --> |
| 156 | +<!-- ^ meta.number.integer.decimal.cs constant.numeric.value.cs --> |
| 157 | +<!-- ^ punctuation.section.group.end.cs --> |
| 158 | + |
| 159 | + |
| 160 | +<!-- TODO: Start the meta.group at the right place --> |
129 | 161 | @for (var i = 0; i < people.Length; i++) |
130 | | -<!-- <- comment.block - punctuation --> |
| 162 | +<!-- ^ punctuation.section.group.begin.cs --> |
| 163 | +<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.group.cs --> |
| 164 | +<!-- ^^^ storage.type.variable.cs --> |
| 165 | +<!-- ^ variable.other.cs --> |
| 166 | +<!-- ^ keyword.operator.assignment.cs --> |
| 167 | +<!-- ^ meta.number.integer.decimal.cs constant.numeric.value.cs --> |
| 168 | +<!-- ^ punctuation.terminator.statement.cs --> |
| 169 | +<!-- ^ variable.other.cs --> |
| 170 | +<!-- ^ keyword.operator.comparison.cs --> |
| 171 | +<!-- ^^^^^^ variable.other.cs --> |
| 172 | +<!-- ^ punctuation.accessor.dot.cs --> |
| 173 | +<!-- ^^^^^^ variable.other.cs --> |
| 174 | +<!-- ^ punctuation.terminator.statement.cs --> |
| 175 | +<!-- ^ variable.other.cs --> |
| 176 | +<!-- ^^ keyword.operator.arithmetic.cs --> |
| 177 | +<!-- ^ punctuation.section.group.end.cs --> |
131 | 178 | { |
132 | 179 | var person = people[i]; |
| 180 | +<!--^^^^^^^^^^^^^^^^^^^^^^^^ meta.block.cs --> |
| 181 | +<!--^^^ storage.type.variable.cs --> |
| 182 | +<!-- ^^^^^^ variable.other.cs --> |
| 183 | +<!-- ^ keyword.operator.assignment.cs --> |
| 184 | +<!-- ^^^^^^ variable.other.cs --> |
| 185 | +<!-- ^^^ meta.brackets.cs --> |
| 186 | +<!-- ^ punctuation.section.brackets.begin.cs --> |
| 187 | +<!-- ^ variable.other.cs --> |
| 188 | +<!-- ^ punctuation.section.brackets.end.cs --> |
| 189 | +<!-- ^ punctuation.terminator.statement.cs --> |
133 | 190 | <text>Name: @person.Name</text> |
| 191 | +<!--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.block.cs --> |
| 192 | +<!--^^^^^^ meta.tag.other.html --> |
| 193 | +<!--^ punctuation.definition.tag.begin.html --> |
| 194 | +<!-- ^^^^ entity.name.tag.other.html --> |
| 195 | +<!-- ^ punctuation.definition.tag.end.html --> |
| 196 | +<!-- ^ punctuation.section.embedded.line.cs-razor --> |
| 197 | +<!-- ^^^^^^ variable.other.cs --> |
| 198 | +<!-- ^ punctuation.accessor.dot.cs --> |
| 199 | +<!-- ^^^^ variable.other.cs --> |
| 200 | +<!-- ^^^^^^^ meta.tag.other.html --> |
| 201 | +<!-- ^^ punctuation.definition.tag.begin.html --> |
| 202 | +<!-- ^^^^ entity.name.tag.other.html --> |
| 203 | +<!-- ^ punctuation.definition.tag.end.html --> |
134 | 204 | } |
135 | 205 |
|
| 206 | +<!-- TODO: Start the meta.group at the right place --> |
136 | 207 | @for (var i = 0; i < people.Length; i++) |
| 208 | +<!-- ^ punctuation.section.group.begin.cs --> |
| 209 | +<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.group.cs --> |
| 210 | +<!-- ^^^ storage.type.variable.cs --> |
| 211 | +<!-- ^ variable.other.cs --> |
| 212 | +<!-- ^ keyword.operator.assignment.cs --> |
| 213 | +<!-- ^ meta.number.integer.decimal.cs constant.numeric.value.cs --> |
| 214 | +<!-- ^ punctuation.terminator.statement.cs --> |
| 215 | +<!-- ^ variable.other.cs --> |
| 216 | +<!-- ^ keyword.operator.comparison.cs --> |
| 217 | +<!-- ^^^^^^ variable.other.cs --> |
| 218 | +<!-- ^ punctuation.accessor.dot.cs --> |
| 219 | +<!-- ^^^^^^ variable.other.cs --> |
| 220 | +<!-- ^ punctuation.terminator.statement.cs --> |
| 221 | +<!-- ^ variable.other.cs --> |
| 222 | +<!-- ^^ keyword.operator.arithmetic.cs --> |
| 223 | +<!-- ^ punctuation.section.group.end.cs --> |
137 | 224 | { |
138 | 225 | var person = people[i]; |
139 | 226 | @:Name: @person.Name |
140 | | -} *@ |
| 227 | +<!--^^^^^^^^^^^^^^^^^^^^^ meta.block.cs --> |
| 228 | +<!--^^ punctuation.section.embedded.html.cs-razor --> |
| 229 | +<!-- ^^^^^^^^^^^^^^^^^^ text.html.basic - punctuation --> |
| 230 | +} |
141 | 231 |
|
142 | 232 | @{ } |
143 | 233 | <!--^^^^^^ meta.embedded.cs --> |
@@ -384,7 +474,18 @@ finally |
384 | 474 | </article> |
385 | 475 |
|
386 | 476 | @foreach (var item in Model) |
| 477 | +<!-- ^ punctuation.section.group.begin.cs --> |
| 478 | +<!-- ^^^^^^^^^^^^^^^^^^ meta.group.cs --> |
| 479 | +<!-- ^^^ storage.type.variable.cs --> |
| 480 | +<!-- ^^^^ variable.other.cs --> |
| 481 | +<!-- ^^ keyword.control.loop.in.cs --> |
| 482 | +<!-- ^^^^^ variable.language.this.razor --> |
| 483 | +<!-- ^ punctuation.section.group.end.cs --> |
387 | 484 | { |
| 485 | + <p data-foo="@item.foo"> |
| 486 | + <!-- TODO: scope at constructs in HTML attribute values correctly even when inside a razor code block --> |
| 487 | + </p> |
| 488 | + |
388 | 489 | if (item.ShouldBeDisplayed) |
389 | 490 | { |
390 | 491 | <article data-id="@item.ID"> |
|
0 commit comments