...

Text file src/github.com/alecthomas/chroma/lexers/testdata/phtml.expected

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

     1[
     2  {"type":"CommentPreproc","value":"\u003c!DOCTYPE html\u003e"},
     3  {"type":"Text","value":"\n"},
     4  {"type":"Punctuation","value":"\u003c"},
     5  {"type":"NameTag","value":"html"},
     6  {"type":"Punctuation","value":"\u003e"},
     7  {"type":"Text","value":"\n"},
     8  {"type":"Punctuation","value":"\u003c"},
     9  {"type":"NameTag","value":"body"},
    10  {"type":"Punctuation","value":"\u003e"},
    11  {"type":"Text","value":"\n\n"},
    12  {"type":"Punctuation","value":"\u003c"},
    13  {"type":"NameTag","value":"h1"},
    14  {"type":"Punctuation","value":"\u003e"},
    15  {"type":"Text","value":"My first PHP page"},
    16  {"type":"Punctuation","value":"\u003c/"},
    17  {"type":"NameTag","value":"h1"},
    18  {"type":"Punctuation","value":"\u003e"},
    19  {"type":"Text","value":"\n"},
    20  {"type":"CommentPreproc","value":"\u003c?php"},
    21  {"type":"Text","value":"\n\n"},
    22  {"type":"NameVariable","value":"$docs"},
    23  {"type":"Text","value":" "},
    24  {"type":"Operator","value":"="},
    25  {"type":"Text","value":" "},
    26  {"type":"NameVariable","value":"$modx"},
    27  {"type":"Operator","value":"-\u003e"},
    28  {"type":"NameAttribute","value":"getIterator"},
    29  {"type":"Punctuation","value":"("},
    30  {"type":"LiteralStringSingle","value":"'modResource'"},
    31  {"type":"Punctuation","value":","},
    32  {"type":"Text","value":" "},
    33  {"type":"Punctuation","value":"["},
    34  {"type":"LiteralStringDouble","value":"\"parent\""},
    35  {"type":"Text","value":" "},
    36  {"type":"Operator","value":"=\u003e"},
    37  {"type":"Text","value":" "},
    38  {"type":"LiteralNumberInteger","value":"84"},
    39  {"type":"Punctuation","value":"]);"},
    40  {"type":"Text","value":"\n\n"},
    41  {"type":"Keyword","value":"foreach"},
    42  {"type":"Punctuation","value":"("},
    43  {"type":"NameVariable","value":"$docs"},
    44  {"type":"Text","value":" "},
    45  {"type":"Keyword","value":"as"},
    46  {"type":"Text","value":" "},
    47  {"type":"NameVariable","value":"$doc"},
    48  {"type":"Punctuation","value":"){"},
    49  {"type":"Text","value":"\n    "},
    50  {"type":"NameVariable","value":"$q"},
    51  {"type":"Operator","value":"="},
    52  {"type":"NameVariable","value":"$doc"},
    53  {"type":"Operator","value":"-\u003e"},
    54  {"type":"NameAttribute","value":"content"},
    55  {"type":"Punctuation","value":";"},
    56  {"type":"Text","value":"\n    "},
    57  {"type":"NameVariable","value":"$doc"},
    58  {"type":"Operator","value":"-\u003e"},
    59  {"type":"NameAttribute","value":"set"},
    60  {"type":"Punctuation","value":"("},
    61  {"type":"LiteralStringDouble","value":"\"content\""},
    62  {"type":"Punctuation","value":","},
    63  {"type":"Text","value":" "},
    64  {"type":"NameOther","value":"preg_replace"},
    65  {"type":"Punctuation","value":"("},
    66  {"type":"LiteralStringDouble","value":"\"/Some value/i\""},
    67  {"type":"Punctuation","value":","},
    68  {"type":"Text","value":" "},
    69  {"type":"LiteralStringDouble","value":"\"Replacement\""},
    70  {"type":"Punctuation","value":","},
    71  {"type":"Text","value":" "},
    72  {"type":"NameVariable","value":"$q"},
    73  {"type":"Punctuation","value":"));"},
    74  {"type":"Text","value":"\n    "},
    75  {"type":"NameOther","value":"print_r"},
    76  {"type":"Punctuation","value":"("},
    77  {"type":"NameVariable","value":"$doc"},
    78  {"type":"Operator","value":"-\u003e"},
    79  {"type":"NameAttribute","value":"content"},
    80  {"type":"Punctuation","value":");"},
    81  {"type":"Text","value":"\n    "},
    82  {"type":"CommentSingle","value":"// $doc-\u003esave();\n"},
    83  {"type":"Punctuation","value":"}"},
    84  {"type":"Text","value":" \n"},
    85  {"type":"CommentSingle","value":"// some comment\n"},
    86  {"type":"CommentPreproc","value":"?\u003e"},
    87  {"type":"Text","value":"\n"},
    88  {"type":"Punctuation","value":"\u003c/"},
    89  {"type":"NameTag","value":"body"},
    90  {"type":"Punctuation","value":"\u003e"},
    91  {"type":"Text","value":"\n"},
    92  {"type":"Punctuation","value":"\u003c/"},
    93  {"type":"NameTag","value":"html"},
    94  {"type":"Punctuation","value":"\u003e"},
    95  {"type":"Text","value":"\n"}
    96]

View as plain text