{"name":"Mercury","scopeName":"source.mercury","patterns":[{"include":"#number"},{"include":"#string_quoted_double"},{"include":"#inline_bin_op"},{"include":"#atom"},{"include":"#block_comment"},{"include":"#line_comment"},{"include":"#decl_keywords"},{"include":"#purity_level"},{"include":"#declarations"},{"include":"#common_ops"},{"include":"#determ_keywords"},{"include":"#logic_keywords"},{"include":"#foreign_mods"},{"include":"#variables"}],"repository":{"atom":{"name":"string.quoted.single.source.mercury","begin":"'","end":"'(?!['])","patterns":[{"name":"constant.character.escape.source.mercury","match":"\\\\."},{"name":"constant.character.escape.quote.source.mercury","match":"\\'\\'"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.source.mercury"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.source.mercury"}}},"block_comment":{"name":"comment.block.source.mercury","begin":"/\\*","end":"\\*/","captures":{"0":{"name":"punctuation.definition.comment.source.mercury"}}},"common_ops":{"patterns":[{"name":"keyword.operator.arithmetic.source.mercury","match":"(-(?![\u003e-])|[+](?![+])|[*][*]?|/(?![\\\\/])|//|\\\\(?![/=]))"},{"name":"keyword.operator.comparison.source.mercury","match":"(=\u003c|\u003e=|\u003c(?![=])|(?![-])\u003e)"},{"name":"keyword.operator.logic.source.mercury","match":"(\u003c=\u003e|\u003c=|=\u003e|\\\\=|==|:-|=(?![=\u003c\u003e])|,|;|-\u003e|/\\\\(?![=])|\\\\/|@)"},{"name":"keyword.operator.other.source.mercury","match":"(--\u003e|---\u003e|[+][+](?![+])|::|:=|![\\.:]?|\\||\\^)"},{"name":"keyword.operator.list.source.mercury","match":"(\\(|\\)|\\[|\\]|\\{|\\})"},{"name":"keyword.operator.terminator.source.mercury","match":"\\.(?=[ \\t]*($|%))"}]},"decl_keywords":{"name":"keyword.control.declaration.source.mercury","match":"\\b(is|where)\\b"},"declarations":{"patterns":[{"name":"keyword.control.declaration.source.mercury","match":"(?x)(^[ \\t]*:-)[ ]((use|include|end|import|)_module|module |func|pred|type(class)?|inst(ance)? |mode|interface|implementation )\\b","captures":{"1":{"name":"keyword.operator.logic.source.mercury"}}},{"name":"constant.language.pragma.source.mercury","match":"(?x)(^[ \\t]*:-)[ ](pragma)[ ](check_termination|does_not_terminate|fact_table |inline|loop_check|memo|minimal_model|no_inline |obsolete|promise_equivalent_clauses|source_file |terminates|type_spec |foreign_(proc|type|decl|code|export(_enum)? |enum|import_module) )\\b","captures":{"1":{"name":"keyword.operator.logic.source.mercury"},"2":{"name":"keyword.control.pragma.source.mercury"}}}]},"determ_keywords":{"name":"constant.language.determ.source.mercury","match":"(?x)\\b(require_(_switch_arms)?)?(multi|cc_(multi|nondet) |det|semidet|nondet |errorneous|failure )\\b"},"foreign_mods":{"name":"storage.type.source.mercury","match":"(?x)\\b(affects_liveness|(does_not|doesnt)_affect_liveness |attach_to_io_state |can_pass_as_mercury_type|stable |(may_call|will_not)(_call_mercury|_modify) |(may_)(not_)?_duplicate |(no_|unknown_)?sharing|tabled_for_io|local |(un)?trailed |(not_|maybe_)?thread_safe |will_not_throw_exception )\\b"},"impl_defined_variable":{"name":"variable.language.source.mercury","match":"[$][a-zA-Z0-9_]*\\b"},"inline_bin_op":{"name":"keyword.operator.other.source.mercury","match":"`[^`]+`"},"line_comment":{"name":"comment.comment.source.mercury","begin":"(^[ \\t]+)?(%([-]+%)?)","end":"(?!\\G)","patterns":[{"match":"(([ \\t]+(XXX|TODO|FIXME|WARNING|IMPORTANT|NOTE(_TO_IMPLEMENTORS)?)\\b)*)(.*)","captures":{"0":{"name":"comment.comment.source.mercury"},"1":{"name":"constant.language.warn.source.mercury"}}}],"beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.source.mercury"},"2":{"name":"comment.line.percentage.source.mercury"}}},"logic_keywords":{"name":"constant.language.logic.source.mercury","match":"(?x)\\b(yes|no|true|false|(semidet_)?succeed|(semidet_)?fail |some|all|require_complete_switch )\\b"},"number":{"name":"constant.numeric.source.mercury","match":"\\b(0(?!['])[0-7]*|0['].|[1-9][0-9]*|\\.[0-9]+([eE][0-9]+)?|0[xX][0-9a-fA-F]+|0[bB][01]+)\\b"},"purity_level":{"name":"storage.type.source.mercury","match":"\\b((promise_)(semi)?pure|(im|semi)?pure)\\b"},"singleton_variable":{"name":"support.variable","match":"\\b_[A-Z]?[a-zA-Z0-9_]*\\b"},"string_quoted_double":{"name":"string.quoted.double.source.mercury","begin":"\"","end":"\"(?!\")","patterns":[{"name":"constant.character.escapesource.mercury","match":"\\\\."},{"name":"constant.character.escape.quote.source.mercury","match":"\"\""},{"name":"constant.character.escape.format.source.mercury","match":"%[I]?[-+# *\\.0-9]*[dioxXucsfeEgGp]"}],"beginCaptures":{"0":{"name":"punctuation.literal.string.begin.source.mercury"}},"endCaptures":{"0":{"name":"punctuation.literal.string.end.source.mercury"}}},"variable":{"name":"variable.other","match":"\\b[A-Z][a-zA-Z0-9_]*\\b"},"variables":{"patterns":[{"include":"#impl_defined_variable"},{"include":"#singleton_variable"},{"include":"#variable"}]}}}
