chroma/lexers/testdata/python/test_decorators.expected
2025-03-22 20:46:00 +13:00

61 lines
2.3 KiB
Text

[
{"type":"NameDecorator","value":"@decorator1"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"def"},
{"type":"Text","value":" "},
{"type":"NameFunction","value":"foo"},
{"type":"Punctuation","value":"():"},
{"type":"Text","value":"\n "},
{"type":"NameBuiltin","value":"print"},
{"type":"Punctuation","value":"("},
{"type":"LiteralStringDouble","value":"\"foo\""},
{"type":"Punctuation","value":")"},
{"type":"Text","value":"\n\n"},
{"type":"NameDecorator","value":"@decorator2.member"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"def"},
{"type":"Text","value":" "},
{"type":"NameFunction","value":"bar"},
{"type":"Punctuation","value":"():"},
{"type":"Text","value":"\n "},
{"type":"NameBuiltin","value":"print"},
{"type":"Punctuation","value":"("},
{"type":"LiteralStringDouble","value":"\"bar\""},
{"type":"Punctuation","value":")"},
{"type":"Text","value":"\n\n"},
{"type":"NameDecorator","value":"@decorator3 . member"},
{"type":"Punctuation","value":"("},
{"type":"Name","value":"param"},
{"type":"Operator","value":"="},
{"type":"LiteralNumberInteger","value":"1"},
{"type":"Punctuation","value":")"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"def"},
{"type":"Text","value":" "},
{"type":"NameFunction","value":"baz"},
{"type":"Punctuation","value":"():"},
{"type":"Text","value":"\n "},
{"type":"NameBuiltin","value":"print"},
{"type":"Punctuation","value":"("},
{"type":"LiteralStringDouble","value":"\"baz\""},
{"type":"Punctuation","value":")"},
{"type":"Text","value":"\n\n"},
{"type":"NameDecorator","value":"@decorator4 . member1 .member2"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"("},
{"type":"Name","value":"param"},
{"type":"Operator","value":"="},
{"type":"LiteralNumberInteger","value":"1"},
{"type":"Punctuation","value":")"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"def"},
{"type":"Text","value":" "},
{"type":"NameFunction","value":"bat"},
{"type":"Punctuation","value":"():"},
{"type":"Text","value":"\n "},
{"type":"NameBuiltin","value":"print"},
{"type":"Punctuation","value":"("},
{"type":"LiteralStringDouble","value":"\"bat\""},
{"type":"Punctuation","value":")"},
{"type":"Text","value":"\n"}
]