...

Text file src/github.com/alecthomas/chroma/v2/lexers/testdata/rust/lifetimes_and_loop_labels.expected

Documentation: github.com/alecthomas/chroma/v2/lexers/testdata/rust

     1[
     2  {"type":"Keyword","value":"struct"},
     3  {"type":"Text","value":" "},
     4  {"type":"NameClass","value":"Bar"},
     5  {"type":"Operator","value":"\u003c"},
     6  {"type":"NameAttribute","value":"'b"},
     7  {"type":"Operator","value":"\u003e"},
     8  {"type":"Punctuation","value":"("},
     9  {"type":"Operator","value":"\u0026"},
    10  {"type":"NameAttribute","value":"'b"},
    11  {"type":"TextWhitespace","value":" "},
    12  {"type":"KeywordType","value":"str"},
    13  {"type":"Punctuation","value":");"},
    14  {"type":"TextWhitespace","value":"\n\n"},
    15  {"type":"Keyword","value":"struct"},
    16  {"type":"Text","value":" "},
    17  {"type":"NameClass","value":"Foo"},
    18  {"type":"Operator","value":"\u003c"},
    19  {"type":"NameAttribute","value":"'b"},
    20  {"type":"Punctuation","value":","},
    21  {"type":"TextWhitespace","value":" "},
    22  {"type":"NameAttribute","value":"'a"},
    23  {"type":"Text","value":": "},
    24  {"type":"NameAttribute","value":"'b"},
    25  {"type":"Operator","value":"\u003e"},
    26  {"type":"Punctuation","value":"("},
    27  {"type":"Operator","value":"\u0026"},
    28  {"type":"NameAttribute","value":"'a"},
    29  {"type":"TextWhitespace","value":" "},
    30  {"type":"Name","value":"Bar"},
    31  {"type":"Operator","value":"\u003c"},
    32  {"type":"NameAttribute","value":"'b"},
    33  {"type":"Operator","value":"\u003e"},
    34  {"type":"Punctuation","value":");"},
    35  {"type":"TextWhitespace","value":"\n\n"},
    36  {"type":"Keyword","value":"fn"},
    37  {"type":"Text","value":" "},
    38  {"type":"NameFunction","value":"foo"},
    39  {"type":"Operator","value":"\u003c"},
    40  {"type":"NameAttribute","value":"'some_name"},
    41  {"type":"Operator","value":"\u003e"},
    42  {"type":"Punctuation","value":"("},
    43  {"type":"Name","value":"_"},
    44  {"type":"Text","value":": "},
    45  {"type":"NameClass","value":"Bar"},
    46  {"type":"Operator","value":"\u003c"},
    47  {"type":"NameBuiltin","value":"'_"},
    48  {"type":"Operator","value":"\u003e"},
    49  {"type":"Punctuation","value":","},
    50  {"type":"TextWhitespace","value":" "},
    51  {"type":"Name","value":"_"},
    52  {"type":"Text","value":": "},
    53  {"type":"NameClass","value":"impl"},
    54  {"type":"TextWhitespace","value":" "},
    55  {"type":"NameBuiltin","value":"Iterator"},
    56  {"type":"Operator","value":"\u003c"},
    57  {"type":"Name","value":"Item"},
    58  {"type":"TextWhitespace","value":" "},
    59  {"type":"Operator","value":"="},
    60  {"type":"TextWhitespace","value":" "},
    61  {"type":"Name","value":"Bar"},
    62  {"type":"Operator","value":"\u003c"},
    63  {"type":"NameBuiltin","value":"'static"},
    64  {"type":"Operator","value":"\u003e\u003e"},
    65  {"type":"TextWhitespace","value":" "},
    66  {"type":"Operator","value":"+"},
    67  {"type":"TextWhitespace","value":" "},
    68  {"type":"NameBuiltin","value":"'static"},
    69  {"type":"Punctuation","value":")"},
    70  {"type":"TextWhitespace","value":" "},
    71  {"type":"Punctuation","value":"{"},
    72  {"type":"TextWhitespace","value":"\n    "},
    73  {"type":"NameAttribute","value":"'im_a_loop_label"},
    74  {"type":"Text","value":": "},
    75  {"type":"NameClass","value":"loop"},
    76  {"type":"TextWhitespace","value":" "},
    77  {"type":"Punctuation","value":"{"},
    78  {"type":"TextWhitespace","value":"\n        "},
    79  {"type":"Keyword","value":"break"},
    80  {"type":"TextWhitespace","value":" "},
    81  {"type":"NameLabel","value":"'im_a_loop_label"},
    82  {"type":"Punctuation","value":";"},
    83  {"type":"TextWhitespace","value":"\n    "},
    84  {"type":"Punctuation","value":"}"},
    85  {"type":"TextWhitespace","value":"\n\n    "},
    86  {"type":"CommentSingle","value":"// None of these should have lifetimes\n"},
    87  {"type":"TextWhitespace","value":"    "},
    88  {"type":"KeywordDeclaration","value":"let"},
    89  {"type":"TextWhitespace","value":" "},
    90  {"type":"Name","value":"_"},
    91  {"type":"TextWhitespace","value":" "},
    92  {"type":"Operator","value":"="},
    93  {"type":"TextWhitespace","value":" "},
    94  {"type":"LiteralStringChar","value":"'a'"},
    95  {"type":"Punctuation","value":";"},
    96  {"type":"TextWhitespace","value":"\n    "},
    97  {"type":"KeywordDeclaration","value":"let"},
    98  {"type":"TextWhitespace","value":" "},
    99  {"type":"Name","value":"_"},
   100  {"type":"TextWhitespace","value":" "},
   101  {"type":"Operator","value":"="},
   102  {"type":"TextWhitespace","value":" "},
   103  {"type":"LiteralStringAffix","value":"b"},
   104  {"type":"LiteralStringChar","value":"'a'"},
   105  {"type":"Punctuation","value":";"},
   106  {"type":"TextWhitespace","value":"\n    "},
   107  {"type":"KeywordDeclaration","value":"let"},
   108  {"type":"TextWhitespace","value":" "},
   109  {"type":"Name","value":"_"},
   110  {"type":"TextWhitespace","value":" "},
   111  {"type":"Operator","value":"="},
   112  {"type":"TextWhitespace","value":" "},
   113  {"type":"LiteralString","value":"\"\n        'not_a_lifetime_or_label\n    \""},
   114  {"type":"Punctuation","value":";"},
   115  {"type":"TextWhitespace","value":"\n"},
   116  {"type":"Punctuation","value":"}"},
   117  {"type":"TextWhitespace","value":"\n"}
   118]

View as plain text