Repository: alecthomas/chroma
Pull request #356 (2020-05-02 15:56:44)

Add ReasonML lexer
Used `pygments2chroma.py` to create this lexer for Facebook's [ReasonML](https://reasonml.github.io/) from pygments.

alecthomas: Awesome thanks!

Patch:
diff --git a/lexers/r/reasonml.go b/lexers/r/reasonml.go
new file mode 100644
index 0000000..0bceb18
--- /dev/null
+++ b/lexers/r/reasonml.go
@@ -0,0 +1,67 @@
+package r
+
+import (
+	. "github.com/alecthomas/chroma" // nolint
+	"github.com/alecthomas/chroma/lexers/internal"
+)
+
+// Reasonml lexer.
+var Reasonml = internal.Register(MustNewLexer(
+	&Config{
+		Name:      "ReasonML",
+		Aliases:   []string{"reason", "reasonml"},
+		Filenames: []string{"*.re", "*.rei"},
+		MimeTypes: []string{"text/x-reasonml"},
+	},
+	Rules{
+		"escape-sequence": {
+			{`\\[\\"\'ntbr]`, LiteralStringEscape, nil},
+			{`\\[0-9]{3}`, LiteralStringEscape, nil},
+			{`\\x[0-9a-fA-F]{2}`, LiteralStringEscape, nil},
+		},
+		"root": {
+			{`\s+`, Text, nil},
+			{`false|true|\(\)|\[\]`, NameBuiltinPseudo, nil},
+			{`\b([A-Z][\w\']*)(?=\s*\.)`, NameNamespace, Push("dotted")},
+			{`\b([A-Z][\w\']*)`, NameClass, nil},
+			{`//.*?\n`, CommentSingle, nil},
+			{`\/\*(?![\/])`, CommentMultiline, Push("comment")},
+			{`\b(as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|false|for|fun|esfun|function|functor|if|in|include|inherit|initializer|lazy|let|switch|module|pub|mutable|new|nonrec|object|of|open|pri|rec|sig|struct|then|to|true|try|type|val|virtual|when|while|with)\b`, Keyword, nil},
+			{"(~|\\}|\\|]|\\||\\|\\||\\{<|\\{|`|_|]|\\[\\||\\[>|\\[<|\\[|\\?\\?|\\?|>\\}|>]|>|=|<-|<|;;|;|:>|:=|::|:|\\.\\.\\.|\\.\\.|\\.|=>|-\\.|-|,|\\+|\\*|\\)|\\(|&&|&|#|!=)", OperatorWord, nil},
+			{`([=<>@^|&+\*/$%-]|[!?~])?[!$%&*+\./:<=>?@^|~-]`, Operator, nil},
+			{`\b(and|asr|land|lor|lsl|lsr|lxor|mod|or)\b`, OperatorWord, nil},
+			{`\b(unit|int|float|bool|string|char|list|array)\b`, KeywordType, nil},
+			{`[^\W\d][\w']*`, Name, nil},
+			{`-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)`, LiteralNumberFloat, nil},
+			{`0[xX][\da-fA-F][\da-fA-F_]*`, LiteralNumberHex, nil},
+			{`0[oO][0-7][0-7_]*`, LiteralNumberOct, nil},
+			{`0[bB][01][01_]*`, LiteralNumberBin, nil},
+			{`\d[\d_]*`, LiteralNumberInteger, nil},
+			{`'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'`, LiteralStringChar, nil},
+			{`'.'`, LiteralStringChar, nil},
+			{`'`, Keyword, nil},
+			{`"`, LiteralStringDouble, Push("string")},
+			{`[~?][a-z][\w\']*:`, NameVariable, nil},
+		},
+		"comment": {
+			{`[^\/*]+`, CommentMultiline, nil},
+			{`\/\*`, CommentMultiline, Push()},
+			{`\*\/`, CommentMultiline, Pop(1)},
+			{`[\*]`, CommentMultiline, nil},
+		},
+		"string": {
+			{`[^\\"]+`, LiteralStringDouble, nil},
+			Include("escape-sequence"),
+			{`\\\n`, LiteralStringDouble, nil},
+			{`"`, LiteralStringDouble, Pop(1)},
+		},
+		"dotted": {
+			{`\s+`, Text, nil},
+			{`\.`, Punctuation, nil},
+			{`[A-Z][\w\']*(?=\s*\.)`, NameNamespace, nil},
+			{`[A-Z][\w\']*`, NameClass, Pop(1)},
+			{`[a-z_][\w\']*`, Name, Pop(1)},
+			Default(Pop(1)),
+		},
+	},
+))


Test patch:
diff --git a/lexers/testdata/reasonml.actual b/lexers/testdata/reasonml.actual
new file mode 100644
index 0000000..8f74ff4
--- /dev/null
+++ b/lexers/testdata/reasonml.actual
@@ -0,0 +1,70 @@
+// This is a single line comment.
+/* A multi line comment, in a single line... */
+/* This is a multi line comment
+   Second Line...
+*/
+/* This is a nested comment
+  /* Nested Line... */
+*/
+
+module Process_Bind_Without_Do =
+       (W: Monad_Bind with type m('a) = writer(string, 'a)) => {
+  let process = s => W.(up_case(s) >>= (up_str => to_words(up_str)));
+};
+
+let a = 1 or 2;
+let b = 1 || 2;
+let c = 1 && 2;
+
+let str = "Hello, Lexer!";
+
+let chr = 'a';
+
+type test;
+
+open Belt;
+
+include Pervasives;
+
+let test: unit => Map.String.t(string) = () => Map.String.empty;
+
+let tup = (1: int, 2: int);
+
+let myRec = {x: 0, y: 10};
+
+let myFuncs = {
+  myFun: (x) => x + 1,
+  your: (a, b) => a + b
+};
+
+let lst = [1, 2, 3];
+
+let logRest = (lst) => 
+  switch (lst) {
+    | [] => Js.log("no entry")
+    | [hd, ...rest] => Js.log2("Rest: ", rest);
+  };
+
+let arr = [|1, 2, 3|];
+
+let res = (x) =>
+  switch (x) {
+  | HasNothing => 0
+  | HasSingleInt(x) => 0
+  | HasSingleTuple((x, y)) => 0
+  | HasMultipleInts(x, y) => 0
+  | HasMultipleTuples((x, y), (q, r)) => 0
+  };
+
+module View = {
+  [@react.component]
+  let make = () => {
+    <div className="view"> 
+      <ul>
+      <li> React.string("Hello, World!") </li>
+      <li> "pipe"->React.string </li>
+      <li> <span> "nested"->React.string </span> </li>
+      </ul>
+    </div>
+  }
+}
\ No newline at end of file
diff --git a/lexers/testdata/reasonml.expected b/lexers/testdata/reasonml.expected
new file mode 100644
index 0000000..6f55f92
--- /dev/null
+++ b/lexers/testdata/reasonml.expected
@@ -0,0 +1,549 @@
+[
+  {"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":"}"}
+]