{
  "fileTypes": [
    "chpl"
  ],
  "foldingStartMarker": "(?x)\n\t\t /\\*\\*(?!\\*)\n\t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\t",
  "foldingStopMarker": "(?<!\\*)\\*\\*/|^\\s*\\}",
  "name": "Chapel",
  "patterns": [
    {
      "include": "#comments"
    },
    {
      "match": "\\b(align|as|atomic|begin|break|by|class|cobegin|coforall|continue|delete|dmapped|do|else|enum|except|export|extern|for|forall|if|index|inline|iter|label|lambda|let|local|module|new|noinit|on|only|otherwise|pragma|private|proc|public|record|reduce|require|return|scan|select|serial|then|union|use|var|when|where|while|with|yield|zip)\\b",
      "name": "keyword.control.chapel"
    },
    {
      "match": "\\b(bool|real|int|uint|imag|complex|dmap|domain|string|range|tuple)\\b",
      "name": "storage.type.chapel"
    },
    {
      "match": "\\b(config|const|param|private|public|sparse|single|type|enum)\\b",
      "name": "storage.modifier.chapel"
    },
    {
      "match": "\\b(true|false|nil)\\b",
      "name": "constant.language.chapel"
    },
    {
      "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
      "name": "constant.numeric.chapel"
    },
    {
      "match": "\\b(this|super|these|here|Locales|LocaleSpace|numLocales|locale|FileAccessMode)\\b",
      "name": "variable.language.chapel"
    },
    {
      "begin": "\"",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.string.begin.chapel"
        }
      },
      "end": "\"",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.string.end.chapel"
        }
      },
      "name": "string.quoted.double.chapel"
    },
    {
      "begin": "'",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.string.begin.chapel"
        }
      },
      "end": "'",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.string.end.chapel"
        }
      },
      "name": "string.quoted.single.chapel",
      "patterns": [
        {
          "include": "#string_escaped_char"
        }
      ]
    },
    {
      "match": "<\\=|>\\=|\\=\\=|<|>|\\!\\=",
      "name": "keyword.operator.comparison.chapel"
    },
    {
      "match": "\\+\\=|-\\=|\\*\\=|/\\=|//\\=|%\\=|&\\=|\\|\\=|\\^\\=|>>\\=|<<\\=|\\*\\*\\=",
      "name": "keyword.operator.assignment.augmented.chapel"
    },
    {
      "match": "\\+|\\-|\\*|\\*\\*|/|//|%|<<|>>|&|\\||\\^|~|<\\=>\\\\.\\.\\.",
      "name": "keyword.operator.arithmetic.chapel"
    },
    {
      "match": "\\=",
      "name": "keyword.operator.assignment.chapel"
    },
    {
      "match": ":",
      "name": "keyword.operator.others.chapel"
    },
    {
      "match": "\\[|\\]",
      "name": "keyword.operator.domain.chapel"
    },
    {
      "begin": "^\\s*(proc)\\s+(?=[A-Za-z_][A-Za-z0-9_]*)",
      "beginCaptures": {
        "1": {
          "name": "keyword.control.chapel"
        }
      },
      "end": "(\\()|\\s*($\\n?|#.*$\\n?)",
      "name": "meta.function.chapel",
      "patterns": [
        {
          "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)",
          "contentName": "entity.name.function.chapel",
          "end": "(?![A-Za-z0-9_])"
        },
        {
          "contentName": "keyword.control.chapel",
          "match": "proc"
        },
        {
          "begin": "(\\()",
          "contentName": "meta.function.parameters.chapel",
          "end": "(?=\\)).*\\{",
          "patterns": [
            {
              "captures": {
                "1": {
                  "name": "variable.parameter.function.chapel"
                }
              },
              "match": "\\b([a-zA-Z_][a-zA-Z_0-9]*)"
            }
          ]
        }
      ]
    },
    {
      "begin": "(?=[A-Za-z_][A-Za-z0-9_]*(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*\\s*\\()",
      "end": "(\\))",
      "name": "meta.function-call.chapel",
      "patterns": [
        {
          "begin": "(?=[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*\\s*\\()",
          "end": "(?=\\s*\\()",
          "patterns": [
            {
              "include": "#builtin_functions"
            }
          ]
        },
        {
          "begin": "(\\()",
          "beginCaptures": {
            "1": {
              "name": "punctuation.definition.arguments.begin.chapel"
            }
          },
          "contentName": "meta.function-call.arguments.chapel",
          "end": "(?=\\))",
          "patterns": [
            {
              "include": "$self"
            }
          ]
        }
      ]
    }
  ],
  "repository": {
    "builtin_functions": {
      "match": "(?x)\\b(\n              \tabs | max | min | sqrt | write | writeln | read | readln | open | close | \n\t\t\t\texit\n\t\t\t\n\t\t\t)\\b",
      "name": "support.function.builtin.chapel"
    },
    "comments": {
      "patterns": [
        {
          "captures": {
            "1": {
              "name": "meta.toc-list.banner.block.c"
            }
          },
          "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
          "name": "comment.block.chapel"
        },
        {
          "begin": "/\\*",
          "captures": {
            "0": {
              "name": "punctuation.definition.comment.c"
            }
          },
          "end": "\\*/",
          "name": "comment.block.chapel"
        },
        {
          "match": "\\*/.*\\n",
          "name": "invalid.illegal.stray-comment-end.c"
        },
        {
          "captures": {
            "1": {
              "name": "meta.toc-list.banner.line.c"
            }
          },
          "match": "^// =(\\s*.*?)\\s*=\\s*$\\n?",
          "name": "comment.line.banner.c++"
        },
        {
          "begin": "//",
          "beginCaptures": {
            "0": {
              "name": "punctuation.definition.comment.c"
            }
          },
          "end": "$\\n?",
          "name": "comment.line.double-slash.c++",
          "patterns": [
            {
              "match": "(?>\\\\\\s*\\n)",
              "name": "punctuation.separator.continuation.c++"
            }
          ]
        }
      ]
    },
    "entity_name_function": {
      "patterns": [
        {
          "include": "#illegal_names"
        },
        {
          "include": "#generic_names"
        }
      ]
    },
    "generic_names": {
      "match": "[A-Za-z_][A-Za-z0-9_]*"
    },
    "illegal_names": {
      "match": "\\b(align|as|atomic|begin|break|by|class|cobegin|coforall|continue|delete|dmapped|do|else|enum|except|export|extern|for|forall|if|index|inline|iter|label|lambda|let|local|module|new|noinit|on|only|otherwise|pragma|private|proc|public|record|reduce|require|return|scan|select|serial|then|union|use|var|when|where|while|with|yield|zip)\\b",
      "name": "invalid.illegal.name.chapel"
    }
  },
  "scopeName": "source.chapel",
  "uuid": "3FFA0C9B-EC75-41CA-8152-E001E11E16E3"
}