{"name":"S-expressions","scopeName":"source.sexp","patterns":[{"include":"#main"}],"repository":{"car":{"name":"meta.car.sexp","begin":"^|\\G","end":"(?x)\n# Terminate after the closing delimiter of multi-line tokens\n(?\u003c=\\)|\"|\\])\n|\n\\s*\n(?:\n\t# Match an unbracketed token\n\t('?(?!\")(?:[^\\s();\\\\]|\\\\.)++)\n\t|\n\t\n\t# Match balanced brackets recursively\n\t# - TODO: Deal with nested vectors like “[1 (foo)]” or “(foo [1, 2])”\n\t(\\( (?\u003cbrackets\u003e\n\t\t\\g\u003cnonbracket\u003e++\n\t\t|\n\t\t\\g\u003cnonbracket\u003e*+\n\t\t\\( \\g\u003cbrackets\u003e? \\)\n\t\t\\g\u003cnonbracket\u003e*+\n\t) \\))\n\t\n\t# Pattern for matching a non-bracket or escaped character\n\t(?\u003cnonbracket\u003e[^()\\\\] | \\\\(?:\\\\|\\))){0}\n)","patterns":[{"include":"#comment"},{"include":"#list"},{"include":"#vector"},{"include":"#string"}],"endCaptures":{"1":{"patterns":[{"include":"#car-innards"}]},"2":{"patterns":[{"include":"#list"}]}}},"car-innards":{"patterns":[{"include":"#quote"},{"match":"(?:^|\\G)(?:(-?\\d*\\.\\d+)|(-?\\d+))$","captures":{"1":{"name":"constant.numeric.float.real.sexp"},"2":{"name":"constant.numeric.integer.int.sexp"}}},{"name":"string.quoted.double.sexp","match":"(?:^|\\G)(\")(.+)(\")$","captures":{"1":{"name":"punctuation.definition.string.begin.sexp"},"2":{"patterns":[{"include":"#escape"}]},"3":{"name":"punctuation.definition.string.end.sexp"}}},{"name":"entity.name.function.sexp","begin":"(?:^|\\G)","end":"$","patterns":[{"include":"#escape"}]}]},"cdr":{"contentName":"meta.cdr.sexp","begin":"(?!\\G)(?:(?:(?\u003c![)\"\\]])\\s+|\\s*)(\\.)(?=$|\\s|\\()[ \\t]*)?","end":"(?=\\))","patterns":[{"include":"#main"}],"beginCaptures":{"1":{"name":"keyword.operator.pair-separator.dot.sexp"}}},"comment":{"name":"comment.line.semicolon.sexp","begin":";+","end":"$","beginCaptures":{"0":{"name":"punctuation.definition.comment.sexp"}}},"escape":{"name":"constant.character.escape.sexp","match":"(\\\\).","captures":{"1":{"name":"punctuation.definition.escape.backslash.sexp"}}},"list":{"patterns":[{"name":"meta.list.empty.sexp","match":"(\\()\\s*(\\))","captures":{"1":{"name":"punctuation.section.list.begin.sexp"},"2":{"name":"punctuation.section.list.end.sexp"}}},{"name":"meta.list.sexp","begin":"\\(","end":"\\)","patterns":[{"include":"#car"},{"include":"#cdr"}],"beginCaptures":{"0":{"name":"punctuation.section.list.begin.sexp"}},"endCaptures":{"0":{"name":"punctuation.section.list.end.sexp"}}}]},"main":{"patterns":[{"include":"#comment"},{"include":"#list"},{"include":"#vector"},{"include":"#string"},{"include":"#number"},{"include":"#nil"},{"include":"#quote"},{"include":"#symbol"}]},"nil":{"name":"constant.language.null.nil.sexp","match":"(?i)(?\u003c=^|\\G|\\s|\\()nil(?=$|\\s|\\)|;)"},"number":{"match":"(?\u003c=^|\\G|\\s|\\()(?:(-?\\d*\\.\\d+)|(-?\\d+))(?=$|\\s|\\)|;)","captures":{"1":{"name":"constant.numeric.float.real.sexp"},"2":{"name":"constant.numeric.integer.int.sexp"}}},"quote":{"match":"(')(?:(?=[(\\[\"])|((?:[^\\s();\\\\]|\\\\.)++))","captures":{"1":{"name":"keyword.operator.quote.sexp"},"2":{"name":"markup.quote.symbol.sexp","patterns":[{"include":"#escape"}]}}},"string":{"name":"string.quoted.double.sexp","begin":"\"","end":"\"","patterns":[{"include":"#escape"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sexp"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.sexp"}}},"symbol":{"name":"constant.other.symbol.sexp","match":"(?\u003c=^|\\G|\\s|\\()(?:[^\"\\s();\\\\]|\\\\.)++","captures":{"0":{"patterns":[{"include":"#escape"}]}}},"vector":{"name":"meta.vector.sexp","begin":"\\[","end":"\\]","patterns":[{"include":"#main"}],"beginCaptures":{"0":{"name":"punctuation.definition.vector.begin.sexp"}},"endCaptures":{"0":{"name":"punctuation.definition.vector.end.sexp"}}}}}
