...

Text file src/github.com/alecthomas/chroma/v2/lexers/testdata/python/test_decorators.expected

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

     1[
     2  {"type":"NameDecorator","value":"@decorator1"},
     3  {"type":"Text","value":"\n"},
     4  {"type":"Keyword","value":"def"},
     5  {"type":"Text","value":" "},
     6  {"type":"NameFunction","value":"foo"},
     7  {"type":"Punctuation","value":"():"},
     8  {"type":"Text","value":"\n    "},
     9  {"type":"NameBuiltin","value":"print"},
    10  {"type":"Punctuation","value":"("},
    11  {"type":"LiteralStringDouble","value":"\"foo\""},
    12  {"type":"Punctuation","value":")"},
    13  {"type":"Text","value":"\n\n"},
    14  {"type":"NameDecorator","value":"@decorator2.member"},
    15  {"type":"Text","value":"\n"},
    16  {"type":"Keyword","value":"def"},
    17  {"type":"Text","value":" "},
    18  {"type":"NameFunction","value":"bar"},
    19  {"type":"Punctuation","value":"():"},
    20  {"type":"Text","value":"\n    "},
    21  {"type":"NameBuiltin","value":"print"},
    22  {"type":"Punctuation","value":"("},
    23  {"type":"LiteralStringDouble","value":"\"bar\""},
    24  {"type":"Punctuation","value":")"},
    25  {"type":"Text","value":"\n\n"},
    26  {"type":"NameDecorator","value":"@decorator3 . member"},
    27  {"type":"Punctuation","value":"("},
    28  {"type":"Name","value":"param"},
    29  {"type":"Operator","value":"="},
    30  {"type":"LiteralNumberInteger","value":"1"},
    31  {"type":"Punctuation","value":")"},
    32  {"type":"Text","value":"\n"},
    33  {"type":"Keyword","value":"def"},
    34  {"type":"Text","value":" "},
    35  {"type":"NameFunction","value":"baz"},
    36  {"type":"Punctuation","value":"():"},
    37  {"type":"Text","value":"\n    "},
    38  {"type":"NameBuiltin","value":"print"},
    39  {"type":"Punctuation","value":"("},
    40  {"type":"LiteralStringDouble","value":"\"baz\""},
    41  {"type":"Punctuation","value":")"},
    42  {"type":"Text","value":"\n\n"},
    43  {"type":"NameDecorator","value":"@decorator4 . member1 .member2"},
    44  {"type":"Text","value":" "},
    45  {"type":"Punctuation","value":"("},
    46  {"type":"Name","value":"param"},
    47  {"type":"Operator","value":"="},
    48  {"type":"LiteralNumberInteger","value":"1"},
    49  {"type":"Punctuation","value":")"},
    50  {"type":"Text","value":"\n"},
    51  {"type":"Keyword","value":"def"},
    52  {"type":"Text","value":" "},
    53  {"type":"NameFunction","value":"bat"},
    54  {"type":"Punctuation","value":"():"},
    55  {"type":"Text","value":"\n    "},
    56  {"type":"NameBuiltin","value":"print"},
    57  {"type":"Punctuation","value":"("},
    58  {"type":"LiteralStringDouble","value":"\"bat\""},
    59  {"type":"Punctuation","value":")"},
    60  {"type":"Text","value":"\n"}
    61]

View as plain text