{"name":"moonbit","scopeName":"source.moonbit","patterns":[{"include":"#strings"},{"include":"#comments"},{"include":"#constants"},{"include":"#keywords"},{"include":"#functions"},{"include":"#support"},{"include":"#types"},{"include":"#modules"},{"include":"#variables"}],"repository":{"comments":{"patterns":[{"name":"comment.line","match":"//.*"}]},"constants":{"patterns":[{"name":"constant.numeric.moonbit","match":"\\b\\d(\\d|_)*(?!\\.)(U)?(L)?\\b"},{"name":"constant.numeric.moonbit","match":"(?\u003c=\\.)\\d((?=\\.)|\\b)"},{"name":"constant.numeric.moonbit","match":"\\b\\d+(\\.)\\d+\\b"},{"name":"constant.numeric.moonbit","match":"\\b0[XxOoBb][\\dAaBbCcDdEeFf]+(U)?(L)?\\b"},{"name":"constant.language.moonbit","match":"\\b(true|false|\\(\\))\\b"}]},"escape":{"patterns":[{"name":"constant.character.escape.moonbit","match":"\\\\[0\\\\tnrb\"']"},{"name":"constant.character.escape.moonbit","match":"\\\\x[0-9a-fA-F]{2}"},{"name":"constant.character.escape.moonbit","match":"\\\\o[0-3][0-7]{2}"},{"name":"constant.character.escape.unicode.moonbit","match":"\\\\u[0-9a-fA-F]{4}"},{"name":"constant.character.escape.unicode.moonbit","match":"\\\\u{[0-9a-fA-F]*}"}]},"functions":{"patterns":[{"match":"\\b(fn)\\s*(?:([A-Z][A-Za-z0-9_]*)::)?([a-z0-9_][A-Za-z0-9_]*)?\\b","captures":{"1":{"name":"keyword.moonbit"},"2":{"name":"entity.name.type.moonbit"},"3":{"name":"entity.name.function.moonbit"}}},{"name":"meta.function.call.moonbit","begin":"(?!\\bfn\\s+)(?:\\.|::)?([a-z0-9_][A-Za-z0-9_]*(\\!|\\?)?)(\\()","end":"\\)","patterns":[{"include":"#comments"},{"include":"#constants"},{"include":"#functions"},{"include":"#support"},{"include":"#types"},{"include":"#keywords"},{"include":"#modules"},{"include":"#strings"},{"include":"#variables"}],"beginCaptures":{"1":{"name":"entity.name.function.moonbit"},"2":{"name":"punctuation.brackets.round.moonbit"}},"endCaptures":{"0":{"name":"punctuation.brackets.round.moonbit"}}}]},"interpolation":{"patterns":[{"name":"meta.embedded.line.moonbit","contentName":"source.moonbit","begin":"\\\\{","end":"}","patterns":[{"include":"$self"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.moonbit"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.moonbit"}}}]},"keywords":{"patterns":[{"name":"keyword.control.moonbit","match":"\\b(guard|if|while|break|continue|return|try|catch|except|raise|match|else|as|in|loop|for)\\b"},{"name":"keyword.moonbit","match":"\\b(type!|(type|typealias|let|enum|struct|import|trait|derive|test|impl|with)\\b)"},{"name":"variable.language.moonbit","match":"\\b(self)\\b"},{"name":"storage.modifier.moonbit","match":"\\b(mut|pub|priv|readonly|extern)\\b"},{"name":"storage.type.function.arrow.moonbit","match":"-\u003e"},{"name":"storage.type.function.arrow.moonbit","match":"=\u003e"},{"name":"keyword.operator.assignment.moonbit","match":"="},{"name":"keyword.operator.other.moonbit","match":"\\|\u003e"},{"name":"keyword.operator.comparison.moonbit","match":"(===|==|!=|\u003e=|\u003c=|(?\u003c!-)\u003e|\u003c)"},{"name":"keyword.operator.logical.moonbit","match":"(\\bnot\\b|\u0026\u0026|\\|\\|)"},{"name":"keyword.operator.math.moonbit","match":"(\\+|-(?!\u003e)|\\*|%|/)"}]},"modules":{"patterns":[{"name":"entity.name.namespace.moonbit","match":"@[A-Za-z][A-Za-z0-9_/]*"}]},"strings":{"patterns":[{"name":"string.line","match":"(#\\|).*","captures":{"1":{"name":"keyword.operator.other.moonbit"}}},{"name":"string.line","match":"(\\$\\|)(.*)","captures":{"1":{"name":"keyword.operator.other.moonbit"},"2":{"patterns":[{"include":"#escape"},{"include":"#interpolation"}]}}},{"name":"string.quoted.single.moonbit","begin":"'","end":"'","patterns":[{"include":"#escape"}]},{"name":"string.quoted.double.moonbit","begin":"\"","end":"\"","patterns":[{"include":"#escape"},{"include":"#interpolation"}]}]},"support":{"patterns":[{"name":"support.class.moonbit","match":"\\b(Eq|Compare|Hash|Show|Default|ToJson|FromJson)\\b"}]},"types":{"patterns":[{"name":"entity.name.type.moonbit","match":"\\b(?\u003c!@)[A-Z][A-Za-z0-9_]*((\\?)+|\\b)"}]},"variables":{"patterns":[{"name":"variable.other.moonbit","match":"\\b(?\u003c!\\.|::)[a-z_][a-zA-Z0-9_]*\\b"}]}}}