...

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

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

     1[
     2  {"type":"KeywordNamespace","value":"using"},
     3  {"type":"Text","value":" "},
     4  {"type":"NameNamespace","value":"Toybox.Application"},
     5  {"type":"Text","value":" "},
     6  {"type":"KeywordNamespace","value":"as"},
     7  {"type":"Text","value":" "},
     8  {"type":"NameNamespace","value":"App"},
     9  {"type":"Punctuation","value":";"},
    10  {"type":"Text","value":"\n"},
    11  {"type":"KeywordNamespace","value":"using"},
    12  {"type":"Text","value":" "},
    13  {"type":"NameNamespace","value":"Toybox.System"},
    14  {"type":"Punctuation","value":";"},
    15  {"type":"Text","value":"\n\n"},
    16  {"type":"KeywordType","value":"const"},
    17  {"type":"Text","value":" "},
    18  {"type":"Name","value":"PI"},
    19  {"type":"Text","value":" "},
    20  {"type":"Operator","value":"="},
    21  {"type":"Text","value":" "},
    22  {"type":"LiteralNumberFloat","value":"3.14"},
    23  {"type":"Punctuation","value":";"},
    24  {"type":"Text","value":"\n\n"},
    25  {"type":"KeywordDeclaration","value":"class"},
    26  {"type":"Text","value":" "},
    27  {"type":"NameClass","value":"MyProjectApp"},
    28  {"type":"Text","value":" "},
    29  {"type":"KeywordDeclaration","value":"extends"},
    30  {"type":"Text","value":" "},
    31  {"type":"NameClass","value":"App.AppBase"},
    32  {"type":"Text","value":" "},
    33  {"type":"Punctuation","value":"{"},
    34  {"type":"Text","value":"\n    "},
    35  {"type":"KeywordType","value":"protected"},
    36  {"type":"Text","value":" "},
    37  {"type":"KeywordDeclaration","value":"var"},
    38  {"type":"Text","value":" "},
    39  {"type":"Name","value":"y"},
    40  {"type":"Punctuation","value":";"},
    41  {"type":"Text","value":"\n\n    "},
    42  {"type":"KeywordDeclaration","value":"function"},
    43  {"type":"Text","value":" "},
    44  {"type":"NameFunctionMagic","value":"initialize"},
    45  {"type":"Text","value":" "},
    46  {"type":"Punctuation","value":"()"},
    47  {"type":"Text","value":" "},
    48  {"type":"Punctuation","value":"{"},
    49  {"type":"Text","value":"\n        "},
    50  {"type":"NameBuiltinPseudo","value":"me"},
    51  {"type":"Punctuation","value":"."},
    52  {"type":"Name","value":"y"},
    53  {"type":"Text","value":" "},
    54  {"type":"Operator","value":"="},
    55  {"type":"Text","value":" "},
    56  {"type":"LiteralStringDouble","value":"\"Hello\""},
    57  {"type":"Punctuation","value":";"},
    58  {"type":"Text","value":"\n        "},
    59  {"type":"NameBuiltinPseudo","value":"self"},
    60  {"type":"Punctuation","value":"."},
    61  {"type":"Name","value":"y"},
    62  {"type":"Text","value":" "},
    63  {"type":"Operator","value":"="},
    64  {"type":"Text","value":" "},
    65  {"type":"LiteralStringDouble","value":"\"World\""},
    66  {"type":"Punctuation","value":";"},
    67  {"type":"Text","value":"\n        "},
    68  {"type":"KeywordDeclaration","value":"var"},
    69  {"type":"Text","value":" "},
    70  {"type":"Name","value":"x"},
    71  {"type":"Text","value":" "},
    72  {"type":"Operator","value":"="},
    73  {"type":"Text","value":" "},
    74  {"type":"Name","value":"add"},
    75  {"type":"Punctuation","value":"("},
    76  {"type":"Text","value":" "},
    77  {"type":"LiteralNumberInteger","value":"3"},
    78  {"type":"Punctuation","value":","},
    79  {"type":"Text","value":" "},
    80  {"type":"LiteralNumberInteger","value":"4"},
    81  {"type":"Text","value":" "},
    82  {"type":"Punctuation","value":");"},
    83  {"type":"Text","value":"\n        "},
    84  {"type":"KeywordDeclaration","value":"var"},
    85  {"type":"Text","value":" "},
    86  {"type":"Name","value":"array"},
    87  {"type":"Text","value":" "},
    88  {"type":"Operator","value":"="},
    89  {"type":"Text","value":" "},
    90  {"type":"OperatorWord","value":"new"},
    91  {"type":"Text","value":" "},
    92  {"type":"Punctuation","value":"["},
    93  {"type":"Name","value":"x"},
    94  {"type":"Punctuation","value":"];"},
    95  {"type":"Text","value":"\n\n        "},
    96  {"type":"CommentSingle","value":"// Initialize the sub-arrays\n"},
    97  {"type":"Text","value":"        "},
    98  {"type":"Keyword","value":"for"},
    99  {"type":"Punctuation","value":"("},
   100  {"type":"Text","value":" "},
   101  {"type":"KeywordDeclaration","value":"var"},
   102  {"type":"Text","value":" "},
   103  {"type":"Name","value":"i"},
   104  {"type":"Text","value":" "},
   105  {"type":"Operator","value":"="},
   106  {"type":"Text","value":" "},
   107  {"type":"LiteralNumberInteger","value":"0"},
   108  {"type":"Punctuation","value":";"},
   109  {"type":"Text","value":" "},
   110  {"type":"Name","value":"i"},
   111  {"type":"Text","value":" "},
   112  {"type":"Operator","value":"\u003c"},
   113  {"type":"Text","value":" "},
   114  {"type":"Name","value":"x"},
   115  {"type":"Punctuation","value":";"},
   116  {"type":"Text","value":" "},
   117  {"type":"Name","value":"i"},
   118  {"type":"Text","value":" "},
   119  {"type":"Operator","value":"+="},
   120  {"type":"Text","value":" "},
   121  {"type":"LiteralNumberInteger","value":"1"},
   122  {"type":"Text","value":" "},
   123  {"type":"Punctuation","value":")"},
   124  {"type":"Text","value":" "},
   125  {"type":"Punctuation","value":"{"},
   126  {"type":"Text","value":"\n            "},
   127  {"type":"Name","value":"array"},
   128  {"type":"Punctuation","value":"["},
   129  {"type":"Name","value":"i"},
   130  {"type":"Punctuation","value":"]"},
   131  {"type":"Text","value":" "},
   132  {"type":"Operator","value":"="},
   133  {"type":"Text","value":" "},
   134  {"type":"OperatorWord","value":"new"},
   135  {"type":"Text","value":" "},
   136  {"type":"Punctuation","value":"["},
   137  {"type":"LiteralNumberInteger","value":"5"},
   138  {"type":"Punctuation","value":"];"},
   139  {"type":"Text","value":"\n        "},
   140  {"type":"Punctuation","value":"}"},
   141  {"type":"Text","value":"\n\n        "},
   142  {"type":"KeywordDeclaration","value":"var"},
   143  {"type":"Text","value":" "},
   144  {"type":"Name","value":"dict"},
   145  {"type":"Text","value":" "},
   146  {"type":"Operator","value":"="},
   147  {"type":"Text","value":" "},
   148  {"type":"Punctuation","value":"{"},
   149  {"type":"Text","value":" "},
   150  {"type":"LiteralStringDouble","value":"\"a\""},
   151  {"type":"Text","value":" "},
   152  {"type":"Operator","value":"=\u003e"},
   153  {"type":"Text","value":" "},
   154  {"type":"LiteralNumberInteger","value":"1"},
   155  {"type":"Punctuation","value":","},
   156  {"type":"Text","value":" "},
   157  {"type":"LiteralStringDouble","value":"\"b\""},
   158  {"type":"Text","value":" "},
   159  {"type":"Operator","value":"=\u003e"},
   160  {"type":"Text","value":" "},
   161  {"type":"LiteralNumberInteger","value":"2"},
   162  {"type":"Text","value":" "},
   163  {"type":"Punctuation","value":"};"},
   164  {"type":"Text","value":"\n        "},
   165  {"type":"KeywordDeclaration","value":"var"},
   166  {"type":"Text","value":" "},
   167  {"type":"Name","value":"person"},
   168  {"type":"Text","value":" "},
   169  {"type":"Operator","value":"="},
   170  {"type":"Text","value":" "},
   171  {"type":"Punctuation","value":"{"},
   172  {"type":"Text","value":" "},
   173  {"type":"LiteralStringSymbol","value":":firstName"},
   174  {"type":"Operator","value":"=\u003e"},
   175  {"type":"LiteralStringDouble","value":"\"Bob\""},
   176  {"type":"Punctuation","value":","},
   177  {"type":"Text","value":" "},
   178  {"type":"LiteralStringSymbol","value":":lastName"},
   179  {"type":"Operator","value":"=\u003e"},
   180  {"type":"LiteralStringDouble","value":"\"Jones\""},
   181  {"type":"Text","value":" "},
   182  {"type":"Punctuation","value":"};"},
   183  {"type":"Text","value":"\n    "},
   184  {"type":"Punctuation","value":"}"},
   185  {"type":"Text","value":"\n\n    "},
   186  {"type":"KeywordType","value":"public"},
   187  {"type":"Text","value":" "},
   188  {"type":"KeywordDeclaration","value":"function"},
   189  {"type":"Text","value":" "},
   190  {"type":"NameFunction","value":"onStart"},
   191  {"type":"Punctuation","value":"("},
   192  {"type":"Name","value":"state"},
   193  {"type":"Punctuation","value":")"},
   194  {"type":"Text","value":" "},
   195  {"type":"Punctuation","value":"{"},
   196  {"type":"Text","value":"\n        "},
   197  {"type":"KeywordDeclaration","value":"var"},
   198  {"type":"Text","value":" "},
   199  {"type":"Name","value":"v"},
   200  {"type":"Text","value":" "},
   201  {"type":"Operator","value":"="},
   202  {"type":"Text","value":" "},
   203  {"type":"OperatorWord","value":"new"},
   204  {"type":"Text","value":" "},
   205  {"type":"Name","value":"Foo"},
   206  {"type":"Punctuation","value":"();"},
   207  {"type":"Text","value":"\n        "},
   208  {"type":"KeywordDeclaration","value":"var"},
   209  {"type":"Text","value":" "},
   210  {"type":"Name","value":"m"},
   211  {"type":"Text","value":" "},
   212  {"type":"Operator","value":"="},
   213  {"type":"Text","value":" "},
   214  {"type":"Name","value":"v"},
   215  {"type":"Punctuation","value":"."},
   216  {"type":"NameBuiltin","value":"method"},
   217  {"type":"Punctuation","value":"("},
   218  {"type":"LiteralStringSymbol","value":":op"},
   219  {"type":"Punctuation","value":");"},
   220  {"type":"Text","value":"\n        "},
   221  {"type":"Name","value":"m"},
   222  {"type":"Punctuation","value":"."},
   223  {"type":"Name","value":"invoke"},
   224  {"type":"Punctuation","value":"("},
   225  {"type":"LiteralNumberInteger","value":"1"},
   226  {"type":"Punctuation","value":","},
   227  {"type":"LiteralNumberInteger","value":"2l"},
   228  {"type":"Punctuation","value":");"},
   229  {"type":"Text","value":"\n    "},
   230  {"type":"Punctuation","value":"}"},
   231  {"type":"Text","value":"\n\n    "},
   232  {"type":"KeywordDeclaration","value":"function"},
   233  {"type":"Text","value":" "},
   234  {"type":"NameFunction","value":"getInitialView"},
   235  {"type":"Punctuation","value":"()"},
   236  {"type":"Text","value":" "},
   237  {"type":"Punctuation","value":"{"},
   238  {"type":"Text","value":"\n        "},
   239  {"type":"Keyword","value":"return"},
   240  {"type":"Text","value":" "},
   241  {"type":"Punctuation","value":"["},
   242  {"type":"Text","value":" "},
   243  {"type":"OperatorWord","value":"new"},
   244  {"type":"Text","value":" "},
   245  {"type":"Name","value":"MyProjectView"},
   246  {"type":"Punctuation","value":"()"},
   247  {"type":"Text","value":" "},
   248  {"type":"Punctuation","value":"];"},
   249  {"type":"Text","value":"\n    "},
   250  {"type":"Punctuation","value":"}"},
   251  {"type":"Text","value":"\n\n    "},
   252  {"type":"KeywordDeclaration","value":"function"},
   253  {"type":"Text","value":" "},
   254  {"type":"NameFunction","value":"add"},
   255  {"type":"Punctuation","value":"("},
   256  {"type":"Text","value":" "},
   257  {"type":"Name","value":"a"},
   258  {"type":"Punctuation","value":","},
   259  {"type":"Text","value":" "},
   260  {"type":"Name","value":"b"},
   261  {"type":"Text","value":" "},
   262  {"type":"Punctuation","value":")"},
   263  {"type":"Text","value":" "},
   264  {"type":"Punctuation","value":"{"},
   265  {"type":"Text","value":"\n        "},
   266  {"type":"Keyword","value":"return"},
   267  {"type":"Text","value":" "},
   268  {"type":"Name","value":"a"},
   269  {"type":"Text","value":" "},
   270  {"type":"Operator","value":"+"},
   271  {"type":"Text","value":" "},
   272  {"type":"Name","value":"b"},
   273  {"type":"Punctuation","value":";"},
   274  {"type":"Text","value":"\n    "},
   275  {"type":"Punctuation","value":"}"},
   276  {"type":"Text","value":"\n\n    "},
   277  {"type":"KeywordDeclaration","value":"function"},
   278  {"type":"Text","value":" "},
   279  {"type":"NameFunction","value":"thisFunctionUsesAdd"},
   280  {"type":"Punctuation","value":"()"},
   281  {"type":"Text","value":" "},
   282  {"type":"Punctuation","value":"{"},
   283  {"type":"Text","value":"\n        "},
   284  {"type":"KeywordDeclaration","value":"var"},
   285  {"type":"Text","value":" "},
   286  {"type":"Name","value":"a"},
   287  {"type":"Text","value":" "},
   288  {"type":"Operator","value":"="},
   289  {"type":"Text","value":" "},
   290  {"type":"Name","value":"add"},
   291  {"type":"Punctuation","value":"("},
   292  {"type":"Text","value":" "},
   293  {"type":"LiteralNumberInteger","value":"1"},
   294  {"type":"Punctuation","value":","},
   295  {"type":"Text","value":" "},
   296  {"type":"LiteralNumberHex","value":"0x03f"},
   297  {"type":"Text","value":" "},
   298  {"type":"Punctuation","value":");"},
   299  {"type":"Text","value":" "},
   300  {"type":"CommentSingle","value":"// Return  4\n"},
   301  {"type":"Text","value":"        "},
   302  {"type":"KeywordDeclaration","value":"var"},
   303  {"type":"Text","value":" "},
   304  {"type":"Name","value":"b"},
   305  {"type":"Text","value":" "},
   306  {"type":"Operator","value":"="},
   307  {"type":"Text","value":" "},
   308  {"type":"Name","value":"add"},
   309  {"type":"Punctuation","value":"("},
   310  {"type":"Text","value":" "},
   311  {"type":"LiteralStringDouble","value":"\"Hello \""},
   312  {"type":"Punctuation","value":","},
   313  {"type":"Text","value":" "},
   314  {"type":"LiteralStringDouble","value":"\"World\""},
   315  {"type":"Text","value":" "},
   316  {"type":"Punctuation","value":");"},
   317  {"type":"Text","value":" "},
   318  {"type":"CommentSingle","value":"// Returns \"Hello World\"\n"},
   319  {"type":"Text","value":"    "},
   320  {"type":"Punctuation","value":"}"},
   321  {"type":"Text","value":"\n    \n"},
   322  {"type":"Punctuation","value":"}"},
   323  {"type":"Text","value":"\n\n"},
   324  {"type":"KeywordDeclaration","value":"class"},
   325  {"type":"Text","value":" "},
   326  {"type":"NameClass","value":"Foo"},
   327  {"type":"Text","value":"  "},
   328  {"type":"Punctuation","value":"{"},
   329  {"type":"Text","value":"\n    "},
   330  {"type":"KeywordDeclaration","value":"function"},
   331  {"type":"Text","value":" "},
   332  {"type":"NameFunction","value":"op"},
   333  {"type":"Punctuation","value":"("},
   334  {"type":"Name","value":"a"},
   335  {"type":"Punctuation","value":","},
   336  {"type":"Text","value":" "},
   337  {"type":"Name","value":"b"},
   338  {"type":"Punctuation","value":")"},
   339  {"type":"Text","value":" "},
   340  {"type":"Punctuation","value":"{}"},
   341  {"type":"Text","value":"\n"},
   342  {"type":"Punctuation","value":"}"}
   343]

View as plain text