...

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

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

     1[
     2  {"type":"KeywordNamespace","value":"use"},
     3  {"type":"Text","value":" "},
     4  {"type":"Punctuation","value":"\u003c"},
     5  {"type":"CommentPreprocFile","value":"write.scad"},
     6  {"type":"Punctuation","value":"\u003e"},
     7  {"type":"Text","value":"\n"},
     8  {"type":"KeywordNamespace","value":"include"},
     9  {"type":"Text","value":" "},
    10  {"type":"Punctuation","value":"\u003c"},
    11  {"type":"CommentPreprocFile","value":"../common/base.scad"},
    12  {"type":"Punctuation","value":"\u003e"},
    13  {"type":"Text","value":"\n\n"},
    14  {"type":"CommentMultiline","value":"/*\n\tMultiline\n\tComment\n*/"},
    15  {"type":"Text","value":"\n\n"},
    16  {"type":"CommentSingle","value":"//draw a foobar\n"},
    17  {"type":"KeywordNamespace","value":"module"},
    18  {"type":"Text","value":" "},
    19  {"type":"NameNamespace","value":"foobar"},
    20  {"type":"Punctuation","value":"(){"},
    21  {"type":"Text","value":"\n    "},
    22  {"type":"NameBuiltin","value":"translate"},
    23  {"type":"Punctuation","value":"(["},
    24  {"type":"LiteralNumber","value":"0"},
    25  {"type":"Punctuation","value":","},
    26  {"type":"Operator","value":"-"},
    27  {"type":"LiteralNumber","value":"10"},
    28  {"type":"Punctuation","value":","},
    29  {"type":"LiteralNumber","value":"0"},
    30  {"type":"Punctuation","value":"])"},
    31  {"type":"Text","value":"\n    "},
    32  {"type":"NameBuiltin","value":"difference"},
    33  {"type":"Punctuation","value":"(){"},
    34  {"type":"Text","value":"\n    \t"},
    35  {"type":"Name","value":"height"},
    36  {"type":"Operator","value":"="},
    37  {"type":"LiteralNumber","value":"5"},
    38  {"type":"Operator","value":"+"},
    39  {"type":"LiteralNumber","value":"6"},
    40  {"type":"Punctuation","value":";"},
    41  {"type":"Text","value":"\n        "},
    42  {"type":"NameBuiltin","value":"cube"},
    43  {"type":"Punctuation","value":"(["},
    44  {"type":"Name","value":"height"},
    45  {"type":"Punctuation","value":","},
    46  {"type":"LiteralNumber","value":"10.04"},
    47  {"type":"Punctuation","value":","},
    48  {"type":"LiteralNumber","value":"2.99e+8"},
    49  {"type":"Punctuation","value":"]);"},
    50  {"type":"Text","value":"\n        "},
    51  {"type":"NameBuiltin","value":"sphere"},
    52  {"type":"Punctuation","value":"("},
    53  {"type":"Name","value":"r"},
    54  {"type":"Operator","value":"="},
    55  {"type":"KeywordConstant","value":"PI"},
    56  {"type":"Punctuation","value":","},
    57  {"type":"NameVariableMagic","value":"$fn"},
    58  {"type":"Operator","value":"="},
    59  {"type":"LiteralNumber","value":"100"},
    60  {"type":"Punctuation","value":");"},
    61  {"type":"Text","value":"\n    "},
    62  {"type":"Punctuation","value":"}"},
    63  {"type":"Text","value":"\n"},
    64  {"type":"Punctuation","value":"}"},
    65  {"type":"Text","value":"\n\n"},
    66  {"type":"Name","value":"foobar"},
    67  {"type":"Punctuation","value":"();"},
    68  {"type":"Text","value":"\n"},
    69  {"type":"Operator","value":"#"},
    70  {"type":"NameBuiltin","value":"cube"},
    71  {"type":"Text","value":" "},
    72  {"type":"Punctuation","value":"(["},
    73  {"type":"LiteralNumber","value":"5"},
    74  {"type":"Punctuation","value":","},
    75  {"type":"LiteralNumber","value":"5"},
    76  {"type":"Punctuation","value":","},
    77  {"type":"LiteralNumber","value":"5"},
    78  {"type":"Punctuation","value":"]);"},
    79  {"type":"Text","value":"\n"},
    80  {"type":"NameBuiltin","value":"echo"},
    81  {"type":"Punctuation","value":"("},
    82  {"type":"LiteralStringDouble","value":"\"done\""},
    83  {"type":"Punctuation","value":");"},
    84  {"type":"Text","value":"\n    \n"},
    85  {"type":"KeywordDeclaration","value":"function"},
    86  {"type":"Text","value":" "},
    87  {"type":"NameFunction","value":"func0"},
    88  {"type":"Punctuation","value":"()"},
    89  {"type":"Text","value":" "},
    90  {"type":"Operator","value":"="},
    91  {"type":"Text","value":" "},
    92  {"type":"LiteralNumber","value":"5"},
    93  {"type":"Punctuation","value":";"},
    94  {"type":"Text","value":"\n"},
    95  {"type":"KeywordDeclaration","value":"function"},
    96  {"type":"Text","value":" "},
    97  {"type":"NameFunction","value":"func1"},
    98  {"type":"Punctuation","value":"("},
    99  {"type":"Name","value":"x"},
   100  {"type":"Operator","value":"="},
   101  {"type":"LiteralNumber","value":"3"},
   102  {"type":"Punctuation","value":")"},
   103  {"type":"Text","value":" "},
   104  {"type":"Operator","value":"="},
   105  {"type":"Text","value":" "},
   106  {"type":"LiteralNumber","value":"2"},
   107  {"type":"Operator","value":"*"},
   108  {"type":"Name","value":"x"},
   109  {"type":"Operator","value":"+"},
   110  {"type":"LiteralNumber","value":"1"},
   111  {"type":"Punctuation","value":";"},
   112  {"type":"Text","value":"\n"},
   113  {"type":"KeywordDeclaration","value":"function"},
   114  {"type":"Text","value":" "},
   115  {"type":"NameFunction","value":"func2"},
   116  {"type":"Punctuation","value":"()"},
   117  {"type":"Text","value":" "},
   118  {"type":"Operator","value":"="},
   119  {"type":"Text","value":" "},
   120  {"type":"Punctuation","value":"["},
   121  {"type":"LiteralNumber","value":"1"},
   122  {"type":"Punctuation","value":","},
   123  {"type":"LiteralNumber","value":"2"},
   124  {"type":"Punctuation","value":","},
   125  {"type":"LiteralNumber","value":"3"},
   126  {"type":"Punctuation","value":","},
   127  {"type":"LiteralNumber","value":"4"},
   128  {"type":"Punctuation","value":"];"},
   129  {"type":"Text","value":"\n"},
   130  {"type":"KeywordDeclaration","value":"function"},
   131  {"type":"Text","value":" "},
   132  {"type":"NameFunction","value":"func3"},
   133  {"type":"Punctuation","value":"("},
   134  {"type":"Name","value":"y"},
   135  {"type":"Operator","value":"="},
   136  {"type":"LiteralNumber","value":"7"},
   137  {"type":"Punctuation","value":")"},
   138  {"type":"Text","value":" "},
   139  {"type":"Operator","value":"="},
   140  {"type":"Text","value":" "},
   141  {"type":"Punctuation","value":"("},
   142  {"type":"Name","value":"y"},
   143  {"type":"Operator","value":"=="},
   144  {"type":"LiteralNumber","value":"7"},
   145  {"type":"Punctuation","value":")"},
   146  {"type":"Text","value":" "},
   147  {"type":"Operator","value":"?"},
   148  {"type":"Text","value":" "},
   149  {"type":"LiteralNumber","value":"5"},
   150  {"type":"Text","value":" "},
   151  {"type":"Punctuation","value":":"},
   152  {"type":"Text","value":" "},
   153  {"type":"LiteralNumber","value":"2"},
   154  {"type":"Text","value":" "},
   155  {"type":"Punctuation","value":";"},
   156  {"type":"Text","value":"\n"},
   157  {"type":"KeywordDeclaration","value":"function"},
   158  {"type":"Text","value":" "},
   159  {"type":"NameFunction","value":"func4"},
   160  {"type":"Punctuation","value":"("},
   161  {"type":"Name","value":"p0"},
   162  {"type":"Punctuation","value":","},
   163  {"type":"Name","value":"p1"},
   164  {"type":"Punctuation","value":","},
   165  {"type":"Name","value":"p2"},
   166  {"type":"Punctuation","value":","},
   167  {"type":"Name","value":"p3"},
   168  {"type":"Punctuation","value":")"},
   169  {"type":"Text","value":" "},
   170  {"type":"Operator","value":"="},
   171  {"type":"Text","value":" "},
   172  {"type":"Punctuation","value":"["},
   173  {"type":"Name","value":"p0"},
   174  {"type":"Punctuation","value":","},
   175  {"type":"Name","value":"p1"},
   176  {"type":"Punctuation","value":","},
   177  {"type":"Name","value":"p2"},
   178  {"type":"Punctuation","value":","},
   179  {"type":"Name","value":"p3"},
   180  {"type":"Punctuation","value":"];"},
   181  {"type":"Text","value":"\n    \n"},
   182  {"type":"NameBuiltin","value":"echo"},
   183  {"type":"Text","value":" "},
   184  {"type":"Punctuation","value":"("},
   185  {"type":"Name","value":"func0"},
   186  {"type":"Punctuation","value":"());"},
   187  {"type":"Text","value":"           "},
   188  {"type":"CommentSingle","value":"// 5\n"},
   189  {"type":"Name","value":"a"},
   190  {"type":"Text","value":" "},
   191  {"type":"Operator","value":"="},
   192  {"type":"Text","value":"   "},
   193  {"type":"Name","value":"func1"},
   194  {"type":"Punctuation","value":"();"},
   195  {"type":"Text","value":"            "},
   196  {"type":"CommentSingle","value":"// 7\n"},
   197  {"type":"Name","value":"b"},
   198  {"type":"Operator","value":"="},
   199  {"type":"Text","value":"    "},
   200  {"type":"Name","value":"func1"},
   201  {"type":"Punctuation","value":"("},
   202  {"type":"LiteralNumber","value":"5"},
   203  {"type":"Punctuation","value":");"},
   204  {"type":"Text","value":"           "},
   205  {"type":"CommentSingle","value":"// 11\n"},
   206  {"type":"NameBuiltin","value":"echo"},
   207  {"type":"Text","value":" "},
   208  {"type":"Punctuation","value":"("},
   209  {"type":"Name","value":"func2"},
   210  {"type":"Punctuation","value":"());"},
   211  {"type":"Text","value":"           "},
   212  {"type":"CommentSingle","value":"// [1, 2, 3, 4]\n"},
   213  {"type":"NameBuiltin","value":"echo"},
   214  {"type":"Punctuation","value":"("},
   215  {"type":"Text","value":" "},
   216  {"type":"Name","value":"func3"},
   217  {"type":"Punctuation","value":"("},
   218  {"type":"LiteralNumber","value":"2"},
   219  {"type":"Punctuation","value":"),"},
   220  {"type":"Name","value":"func3"},
   221  {"type":"Punctuation","value":"());"},
   222  {"type":"Text","value":"  "},
   223  {"type":"CommentSingle","value":"// 2, 5\n"},
   224  {"type":"Text","value":"   \n"},
   225  {"type":"Name","value":"z"},
   226  {"type":"Operator","value":"="},
   227  {"type":"Text","value":" "},
   228  {"type":"Name","value":"func4"},
   229  {"type":"Punctuation","value":"("},
   230  {"type":"Name","value":"func0"},
   231  {"type":"Punctuation","value":"(),"},
   232  {"type":"Name","value":"func1"},
   233  {"type":"Punctuation","value":"(),"},
   234  {"type":"Name","value":"func2"},
   235  {"type":"Punctuation","value":"(),"},
   236  {"type":"Name","value":"func3"},
   237  {"type":"Punctuation","value":"());"},
   238  {"type":"Text","value":" "},
   239  {"type":"CommentSingle","value":"//  [5, 7, [1, 2, 3, 4], 5]\n"},
   240  {"type":"Text","value":"   \n"},
   241  {"type":"NameBuiltin","value":"translate"},
   242  {"type":"Punctuation","value":"(["},
   243  {"type":"LiteralNumber","value":"0"},
   244  {"type":"Punctuation","value":","},
   245  {"type":"Operator","value":"-"},
   246  {"type":"LiteralNumber","value":"4"},
   247  {"type":"Operator","value":"*"},
   248  {"type":"Name","value":"func0"},
   249  {"type":"Punctuation","value":"(),"},
   250  {"type":"LiteralNumber","value":"0"},
   251  {"type":"Punctuation","value":"])"},
   252  {"type":"NameBuiltin","value":"cube"},
   253  {"type":"Punctuation","value":"(["},
   254  {"type":"Name","value":"func0"},
   255  {"type":"Punctuation","value":"(),"},
   256  {"type":"LiteralNumber","value":"2"},
   257  {"type":"Operator","value":"*"},
   258  {"type":"Name","value":"func0"},
   259  {"type":"Punctuation","value":"(),"},
   260  {"type":"Name","value":"func0"},
   261  {"type":"Punctuation","value":"()]);"},
   262  {"type":"Text","value":"\n\n"},
   263  {"type":"KeywordNamespace","value":"module"},
   264  {"type":"Text","value":" "},
   265  {"type":"NameNamespace","value":"parallelogram"},
   266  {"type":"Punctuation","value":"("},
   267  {"type":"Name","value":"x"},
   268  {"type":"Operator","value":"="},
   269  {"type":"LiteralNumber","value":"1"},
   270  {"type":"Punctuation","value":","},
   271  {"type":"Name","value":"y"},
   272  {"type":"Operator","value":"="},
   273  {"type":"LiteralNumber","value":"1"},
   274  {"type":"Punctuation","value":","},
   275  {"type":"Name","value":"angle"},
   276  {"type":"Operator","value":"="},
   277  {"type":"LiteralNumber","value":"90"},
   278  {"type":"Punctuation","value":")"},
   279  {"type":"Text","value":"\n    "},
   280  {"type":"Punctuation","value":"{"},
   281  {"type":"NameBuiltin","value":"polygon"},
   282  {"type":"Punctuation","value":"([["},
   283  {"type":"LiteralNumber","value":"0"},
   284  {"type":"Punctuation","value":","},
   285  {"type":"LiteralNumber","value":"0"},
   286  {"type":"Punctuation","value":"],["},
   287  {"type":"Name","value":"x"},
   288  {"type":"Punctuation","value":","},
   289  {"type":"LiteralNumber","value":"0"},
   290  {"type":"Punctuation","value":"],"},
   291  {"type":"Text","value":"\n              "},
   292  {"type":"Punctuation","value":"["},
   293  {"type":"Name","value":"x"},
   294  {"type":"Operator","value":"+"},
   295  {"type":"Name","value":"x"},
   296  {"type":"Operator","value":"*"},
   297  {"type":"NameBuiltin","value":"cos"},
   298  {"type":"Punctuation","value":"("},
   299  {"type":"Name","value":"angle"},
   300  {"type":"Punctuation","value":")"},
   301  {"type":"Operator","value":"/"},
   302  {"type":"NameBuiltin","value":"sin"},
   303  {"type":"Punctuation","value":"("},
   304  {"type":"Name","value":"angle"},
   305  {"type":"Punctuation","value":"),"},
   306  {"type":"Name","value":"y"},
   307  {"type":"Punctuation","value":"],"},
   308  {"type":"Text","value":"\n              "},
   309  {"type":"Punctuation","value":"["},
   310  {"type":"Name","value":"x"},
   311  {"type":"Operator","value":"*"},
   312  {"type":"NameBuiltin","value":"cos"},
   313  {"type":"Punctuation","value":"("},
   314  {"type":"Name","value":"angle"},
   315  {"type":"Punctuation","value":")"},
   316  {"type":"Operator","value":"/"},
   317  {"type":"NameBuiltin","value":"sin"},
   318  {"type":"Punctuation","value":"("},
   319  {"type":"Name","value":"angle"},
   320  {"type":"Punctuation","value":"),"},
   321  {"type":"Name","value":"y"},
   322  {"type":"Punctuation","value":"]]);};"},
   323  {"type":"Text","value":"\n  \n"},
   324  {"type":"Name","value":"parallelogram"},
   325  {"type":"Punctuation","value":"("},
   326  {"type":"LiteralNumber","value":"10"},
   327  {"type":"Punctuation","value":","},
   328  {"type":"LiteralNumber","value":"10"},
   329  {"type":"Punctuation","value":","},
   330  {"type":"LiteralNumber","value":"35"},
   331  {"type":"Punctuation","value":");"},
   332  {"type":"Text","value":"\n\n "},
   333  {"type":"KeywordDeclaration","value":"function"},
   334  {"type":"Text","value":" "},
   335  {"type":"NameFunction","value":"add_up_to"},
   336  {"type":"Punctuation","value":"("},
   337  {"type":"Name","value":"n"},
   338  {"type":"Punctuation","value":")"},
   339  {"type":"Text","value":" "},
   340  {"type":"Operator","value":"="},
   341  {"type":"Text","value":" "},
   342  {"type":"Punctuation","value":"("},
   343  {"type":"Text","value":" "},
   344  {"type":"Name","value":"n"},
   345  {"type":"Operator","value":"=="},
   346  {"type":"LiteralNumber","value":"0"},
   347  {"type":"Text","value":" "},
   348  {"type":"Operator","value":"?"},
   349  {"type":"Text","value":" "},
   350  {"type":"LiteralNumber","value":"0"},
   351  {"type":"Text","value":" "},
   352  {"type":"Punctuation","value":":"},
   353  {"type":"Text","value":" "},
   354  {"type":"Name","value":"n"},
   355  {"type":"Text","value":" "},
   356  {"type":"Operator","value":"+"},
   357  {"type":"Text","value":" "},
   358  {"type":"Name","value":"add_up_to"},
   359  {"type":"Punctuation","value":"("},
   360  {"type":"Name","value":"n"},
   361  {"type":"Operator","value":"-"},
   362  {"type":"LiteralNumber","value":"1"},
   363  {"type":"Punctuation","value":")"},
   364  {"type":"Text","value":" "},
   365  {"type":"Punctuation","value":");"},
   366  {"type":"Text","value":"\n"}
   367]

View as plain text