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

549 lines
20 KiB
Text

[
{"type":"CommentSingle","value":"// This is a single line comment.\n"},
{"type":"CommentMultiline","value":"/* A multi line comment, in a single line... */"},
{"type":"Text","value":"\n"},
{"type":"CommentMultiline","value":"/* This is a multi line comment\n Second Line...\n*/"},
{"type":"Text","value":"\n"},
{"type":"CommentMultiline","value":"/* This is a nested comment\n /* Nested Line... */\n*/"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"module"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"Process_Bind_Without_Do"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"("},
{"type":"NameClass","value":"W"},
{"type":"OperatorWord","value":":"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"Monad_Bind"},
{"type":"Text","value":" "},
{"type":"Keyword","value":"with"},
{"type":"Text","value":" "},
{"type":"Keyword","value":"type"},
{"type":"Text","value":" "},
{"type":"Name","value":"m"},
{"type":"OperatorWord","value":"("},
{"type":"Keyword","value":"'"},
{"type":"Name","value":"a"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"Name","value":"writer"},
{"type":"OperatorWord","value":"("},
{"type":"KeywordType","value":"string"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Keyword","value":"'"},
{"type":"Name","value":"a"},
{"type":"OperatorWord","value":"))"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"{"},
{"type":"Text","value":"\n "},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"process"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"Name","value":"s"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"NameNamespace","value":"W"},
{"type":"Punctuation","value":"."},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"up_case"},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"s"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"\u003e\u003e="},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"up_str"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"Name","value":"to_words"},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"up_str"},
{"type":"OperatorWord","value":")));"},
{"type":"Text","value":"\n"},
{"type":"OperatorWord","value":"};"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"a"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"Name","value":"1"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"or"},
{"type":"Text","value":" "},
{"type":"Name","value":"2"},
{"type":"OperatorWord","value":";"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"b"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"Name","value":"1"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"||"},
{"type":"Text","value":" "},
{"type":"Name","value":"2"},
{"type":"OperatorWord","value":";"},
{"type":"Text","value":"\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"c"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"Name","value":"1"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"\u0026\u0026"},
{"type":"Text","value":" "},
{"type":"Name","value":"2"},
{"type":"OperatorWord","value":";"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"str"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralStringDouble","value":"\"Hello, Lexer!\""},
{"type":"OperatorWord","value":";"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"chr"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"LiteralStringChar","value":"'a'"},
{"type":"OperatorWord","value":";"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"type"},
{"type":"Text","value":" "},
{"type":"Name","value":"test"},
{"type":"OperatorWord","value":";"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"open"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"Belt"},
{"type":"OperatorWord","value":";"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"include"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"Pervasives"},
{"type":"OperatorWord","value":";"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"test"},
{"type":"OperatorWord","value":":"},
{"type":"Text","value":" "},
{"type":"KeywordType","value":"unit"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"NameNamespace","value":"Map"},
{"type":"Punctuation","value":"."},
{"type":"NameNamespace","value":"String"},
{"type":"Punctuation","value":"."},
{"type":"Name","value":"t"},
{"type":"OperatorWord","value":"("},
{"type":"KeywordType","value":"string"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"NameBuiltinPseudo","value":"()"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"NameNamespace","value":"Map"},
{"type":"Punctuation","value":"."},
{"type":"NameNamespace","value":"String"},
{"type":"Punctuation","value":"."},
{"type":"Name","value":"empty"},
{"type":"OperatorWord","value":";"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"tup"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"1"},
{"type":"OperatorWord","value":":"},
{"type":"Text","value":" "},
{"type":"KeywordType","value":"int"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"2"},
{"type":"OperatorWord","value":":"},
{"type":"Text","value":" "},
{"type":"KeywordType","value":"int"},
{"type":"OperatorWord","value":");"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"myRec"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"{"},
{"type":"Name","value":"x"},
{"type":"OperatorWord","value":":"},
{"type":"Text","value":" "},
{"type":"Name","value":"0"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"y"},
{"type":"OperatorWord","value":":"},
{"type":"Text","value":" "},
{"type":"Name","value":"10"},
{"type":"OperatorWord","value":"};"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"myFuncs"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"{"},
{"type":"Text","value":"\n "},
{"type":"Name","value":"myFun"},
{"type":"OperatorWord","value":":"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"x"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"Name","value":"x"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"+"},
{"type":"Text","value":" "},
{"type":"Name","value":"1"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":"\n "},
{"type":"Name","value":"your"},
{"type":"OperatorWord","value":":"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"a"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"b"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"Name","value":"a"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"+"},
{"type":"Text","value":" "},
{"type":"Name","value":"b"},
{"type":"Text","value":"\n"},
{"type":"OperatorWord","value":"};"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"lst"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"["},
{"type":"Name","value":"1"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"2"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"3"},
{"type":"OperatorWord","value":"];"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"logRest"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"lst"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" \n "},
{"type":"Keyword","value":"switch"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"lst"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"{"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"|"},
{"type":"Text","value":" "},
{"type":"NameBuiltinPseudo","value":"[]"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"NameNamespace","value":"Js"},
{"type":"Punctuation","value":"."},
{"type":"Name","value":"log"},
{"type":"OperatorWord","value":"("},
{"type":"LiteralStringDouble","value":"\"no entry\""},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"|"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"["},
{"type":"Name","value":"hd"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"..."},
{"type":"Name","value":"rest"},
{"type":"OperatorWord","value":"]"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"NameNamespace","value":"Js"},
{"type":"Punctuation","value":"."},
{"type":"Name","value":"log2"},
{"type":"OperatorWord","value":"("},
{"type":"LiteralStringDouble","value":"\"Rest: \""},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"rest"},
{"type":"OperatorWord","value":");"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"};"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"arr"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"[|"},
{"type":"Name","value":"1"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"2"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"3"},
{"type":"OperatorWord","value":"|];"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"res"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"x"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":"\n "},
{"type":"Keyword","value":"switch"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"x"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"{"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"|"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"HasNothing"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"Name","value":"0"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"|"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"HasSingleInt"},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"x"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"Name","value":"0"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"|"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"HasSingleTuple"},
{"type":"OperatorWord","value":"(("},
{"type":"Name","value":"x"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"y"},
{"type":"OperatorWord","value":"))"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"Name","value":"0"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"|"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"HasMultipleInts"},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"x"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"y"},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"Name","value":"0"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"|"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"HasMultipleTuples"},
{"type":"OperatorWord","value":"(("},
{"type":"Name","value":"x"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"y"},
{"type":"OperatorWord","value":"),"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"("},
{"type":"Name","value":"q"},
{"type":"OperatorWord","value":","},
{"type":"Text","value":" "},
{"type":"Name","value":"r"},
{"type":"OperatorWord","value":"))"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"Name","value":"0"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"};"},
{"type":"Text","value":"\n\n"},
{"type":"Keyword","value":"module"},
{"type":"Text","value":" "},
{"type":"NameClass","value":"View"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"{"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"["},
{"type":"Operator","value":"@"},
{"type":"Name","value":"react"},
{"type":"OperatorWord","value":"."},
{"type":"Name","value":"component"},
{"type":"OperatorWord","value":"]"},
{"type":"Text","value":"\n "},
{"type":"Keyword","value":"let"},
{"type":"Text","value":" "},
{"type":"Name","value":"make"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"="},
{"type":"Text","value":" "},
{"type":"NameBuiltinPseudo","value":"()"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"=\u003e"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"{"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Name","value":"div"},
{"type":"Text","value":" "},
{"type":"Name","value":"className"},
{"type":"OperatorWord","value":"="},
{"type":"LiteralStringDouble","value":"\"view\""},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":" \n "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Name","value":"ul"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Name","value":"li"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":" "},
{"type":"NameNamespace","value":"React"},
{"type":"Punctuation","value":"."},
{"type":"Name","value":"string"},
{"type":"OperatorWord","value":"("},
{"type":"LiteralStringDouble","value":"\"Hello, World!\""},
{"type":"OperatorWord","value":")"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Operator","value":"/"},
{"type":"Name","value":"li"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Name","value":"li"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":" "},
{"type":"LiteralStringDouble","value":"\"pipe\""},
{"type":"OperatorWord","value":"-\u003e"},
{"type":"NameNamespace","value":"React"},
{"type":"Punctuation","value":"."},
{"type":"Name","value":"string"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Operator","value":"/"},
{"type":"Name","value":"li"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Name","value":"li"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Name","value":"span"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":" "},
{"type":"LiteralStringDouble","value":"\"nested\""},
{"type":"OperatorWord","value":"-\u003e"},
{"type":"NameNamespace","value":"React"},
{"type":"Punctuation","value":"."},
{"type":"Name","value":"string"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Operator","value":"/"},
{"type":"Name","value":"span"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Operator","value":"/"},
{"type":"Name","value":"li"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Operator","value":"/"},
{"type":"Name","value":"ul"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"\u003c"},
{"type":"Operator","value":"/"},
{"type":"Name","value":"div"},
{"type":"OperatorWord","value":"\u003e"},
{"type":"Text","value":"\n "},
{"type":"OperatorWord","value":"}"},
{"type":"Text","value":"\n"},
{"type":"OperatorWord","value":"}"}
]