@@ -272,6 +272,7 @@ test('highlights generated documentation syntax', () => {
272272 const tokens = tokenize (
273273 [
274274 '\0(parameter) mut value' ,
275+ '\0(parameter) plain' ,
275276 '(field) description' ,
276277 'let immutable' ,
277278 'const @constant' ,
@@ -286,6 +287,7 @@ test('highlights generated documentation syntax', () => {
286287 expectScope ( tokens , '(parameter)' , 'entity.name.label.mira' ) ;
287288 expectScope ( tokens , '(field)' , 'entity.name.label.mira' ) ;
288289 expectScope ( tokens , 'value' , 'variable.emphasis.mira' ) ;
290+ expectScope ( tokens , 'plain' , 'variable.other.constant.emphasis.mira' ) ;
289291 expectScope ( tokens , 'immutable' , 'variable.other.constant.mira' ) ;
290292 expectScope ( tokens , '@constant' , 'variable.other.constant.mira' ) ;
291293 expectScope ( tokens , 'mutable' , 'variable.other.readwrite.mira' ) ;
@@ -296,9 +298,11 @@ test('highlights generated documentation syntax', () => {
296298 expectScope ( tokens , 'callback' , 'entity.name.function.emphasis.mira' ) ;
297299 expectScope ( tokens , 'boolean' , 'support.type.builtin.mira' ) ;
298300 expectScope ( tokens , 'MyValue' , 'variable.other.mira' ) ;
299- expectScope ( tokens , 'field' , 'variable.other.constant.emphasis.mira' ) ;
301+ expectScope ( tokens , 'field' , 'variable.emphasis.mira' ) ;
302+ expectScope ( tokens , 'nested' , 'variable.emphasis.mira' ) ;
303+ expectScope ( tokens , 'name' , 'variable.other.property.mira' ) ;
300304 assert . ok (
301- ! tokens . filter ( ( token ) => token . line === 8 ) . some ( ( token ) => token . scopes . includes ( 'entity.name.label.mira' ) ) ,
305+ ! tokens . filter ( ( token ) => token . line === 9 ) . some ( ( token ) => token . scopes . includes ( 'entity.name.label.mira' ) ) ,
302306 ) ;
303307 expectScope ( tokens , '->' , 'keyword.operator.type.mira' ) ;
304308} ) ;
@@ -327,9 +331,9 @@ test('distinguishes doc declarations, globals, and nested function types', () =>
327331 expectScope ( tokens , '(global)' , 'entity.name.label.mira' , 0 ) ;
328332 expectScope ( tokens , 'fn' , 'keyword.declaration.function.mira' , 0 ) ;
329333 expectScope ( tokens , 'fn' , 'support.type.function.mira' , 2 ) ;
330- expectScope ( tokens , 'data' , 'variable.other.constant. emphasis.mira' , 1 ) ;
334+ expectScope ( tokens , 'data' , 'variable.emphasis.mira' , 1 ) ;
331335 expectScope ( tokens , 'f' , 'entity.name.function.emphasis.mira' ) ;
332- expectScope ( tokens , 'value' , 'variable.other.constant. emphasis.mira' ) ;
336+ expectScope ( tokens , 'value' , 'variable.emphasis.mira' ) ;
333337 expectScope ( tokens , 'type' , 'keyword.operator.expression.mira' ) ;
334338 expectScope ( tokens , 'data' , 'variable.other.mira' , 2 ) ;
335339} ) ;
@@ -381,8 +385,8 @@ test('keeps tuple and array element types inside their type context', () => {
381385 ] . join ( '\n' ) ,
382386 'mirascript-doc' ,
383387 ) ;
384- expectScope ( tokens , 'matrix' , 'variable.other.constant. emphasis.mira' ) ;
385- expectScope ( tokens , 'size' , 'variable.other.constant. emphasis.mira' , 1 ) ;
388+ expectScope ( tokens , 'matrix' , 'variable.emphasis.mira' ) ;
389+ expectScope ( tokens , 'size' , 'variable.emphasis.mira' , 1 ) ;
386390 for ( const token of tokens . filter ( ( candidate ) => candidate . text === 'number' ) ) {
387391 assert . ok (
388392 token . scopes . includes ( 'support.type.builtin.mira' ) ,
0 commit comments