     ]
   'reserved-names':
     # Not to be used somewhere a local could be
-    'patterns': [
-      {
-        'match': '\\b(_all|_b|byte|_coef|_cons|double|float|if|in|int|long|_n|_N|_pi|_pred|_rc|_skip|str[0-9]+|strL|using|with)\\b'
-        'name': 'invalid.illegal.name.stata'
-      }
-      {
-        'match': '[^\\w\'`\\$\\(\\)\\s]'
-        'name': 'invalid.illegal.name.stata'
-      }
-      {
-        'match': '[0-9][\\w]{31,}'
-        'name': 'invalid.illegal.name.stata'
-      }
-      {
-        'match': '\\w{33,}'
-        'name': 'invalid.illegal.name.stata'
+    patterns: [
+      {
+        match: '\\b(_all|_b|byte|_coef|_cons|double|float|if|in|int|long|_n|_N|_pi|_pred|_rc|_skip|str[0-9]+|strL|using|with)\\b'
+        name: 'invalid.illegal.name.stata'
+      }
+      {
+        match: '[^\\w\'`\\$\\(\\)\\s]'
+        name: 'invalid.illegal.name.stata'
+      }
+      {
+        match: '[0-9][\\w]{31,}'
+        name: 'invalid.illegal.name.stata'
+      }
+      {
+        match: '\\w{33,}'
+        name: 'invalid.illegal.name.stata'
       }
     ]
   'macro-local-identifiers':
-    'patterns': [
-      {
-        'match': '[^\\w\'`\\$\\(\\)\\s]'
-        'name': 'invalid.illegal.name.stata'
-      }
-      {
-        'match': '\\w{32,}'
-        'name': 'invalid.illegal.name.stata'
-      }
-      {
-        'match': '\\w{1,31}'
-        'name': 'entity.name.type.class.stata'
+    patterns: [
+      {
+        match: '[^\\w\'`\\$\\(\\)\\s]'
+        name: 'invalid.illegal.name.stata'
+      }
+      {
+        match: '\\w{32,}'
+        name: 'invalid.illegal.name.stata'
+      }
+      {
+        match: '\\w{1,31}'
+        name: 'entity.name.type.class.stata'
       }
     ]
   'ascii-regex-functions':
-    'patterns': [
-      {
-        'comment': 'color regexm with regular quotes i.e. " '
-        'match': '\\b(regexm)(\\()([^,]+)(,)\\s*(\")([^"]+)(\"(\')?)\\s*(\\))'
-        'captures':
-          '1':
-            'name': 'support.function.builtin.stata'
-          '2':
-            'name': 'punctuation.definition.parameters.begin.stata'
-          '3':
-            'patterns': [
+    patterns: [
+      {
+        comment: 'color regexm with regular quotes i.e. " '
+        match: '\\b(regexm)(\\()([^,]+)(,)\\s*(\")([^"]+)(\"(\')?)\\s*(\\))'
+        captures:
+          1: name: 'support.function.builtin.stata'
+          2: name: 'punctuation.definition.parameters.begin.stata'
+          3:
+            patterns: [
               {include: '#string-compound'}
               {include: '#string-regular'}
               {include: '#macro-local'}
               {include: '#macro-global'}
               {include: '#functions'}
               {
-                'match': '[\\w&&[^0-9]]\\w{0,31}'
-                'name': 'variable.parameter.function.stata'
+                match: '[\\w&&[^0-9]]\\w{0,31}'
+                name: 'variable.parameter.function.stata'
               }
               {include: '#comments-triple-slash'}
             ]
-          '4':
-            'name': 'punctuation.definition.variable.begin.stata' # the comma
-          '5':
-            'name': 'punctuation.definition.string.begin.stata'
-          '6':
-            'patterns': [
+          4: name: 'punctuation.definition.variable.begin.stata' # the comma
+          5: name: 'punctuation.definition.string.begin.stata'
+          6:
+            patterns: [
               {include: '#ascii-regex-internals'}
               # {
               #   'include': '#comments-triple-slash'
               # }
               # Unknown if this helps. Regex not colored when regexm split over multiple lines as of 9/11/2017, 1:32:26 AM
             ]
-          '7':
-            'name': 'punctuation.definition.string.end.stata'
-          '8':
-            'name': 'invalid.illegal.punctuation.stata'
-          '9':
-            'name': 'punctuation.definition.parameters.end.stata'
-      }
-      {
-        'comment': 'color regexm with compound quotes'
-        'match': '\\b(regexm)(\\()([^,]+)(,)\\s*(`\")([^"]+)(\"\')\\s*(\\))'
-        'captures':
-          '1':
-            'name': 'support.function.builtin.stata'
-          '2':
-            'name': 'punctuation.definition.parameters.begin.stata'
-          '3':
-            'patterns': [
+          7: name: 'punctuation.definition.string.end.stata'
+          8: name: 'invalid.illegal.punctuation.stata'
+          9: name: 'punctuation.definition.parameters.end.stata'
+      }
+      {
+        comment: 'color regexm with compound quotes'
+        match: '\\b(regexm)(\\()([^,]+)(,)\\s*(`\")([^"]+)(\"\')\\s*(\\))'
+        captures:
+          1: name: 'support.function.builtin.stata'
+          2: name: 'punctuation.definition.parameters.begin.stata'
+          3:
+            patterns: [
               {include: '#string-compound'}
               {include: '#string-regular'}
               {include: '#macro-local'}
               {include: '#macro-global'}
               {include: '#functions'}
               {
-                'match': '[\\w&&[^0-9]]\\w{0,31}'
-                'name': 'variable.parameter.function.stata'
+                match: '[\\w&&[^0-9]]\\w{0,31}'
+                name: 'variable.parameter.function.stata'
               }
               {include: '#comments-triple-slash'}
             ]
-          '4':
-            'name': 'punctuation.definition.variable.begin.stata' # the comma
-          '5':
-            'name': 'punctuation.definition.string.begin.stata'
-          '6':
-            'patterns': [
+          4: name: 'punctuation.definition.variable.begin.stata' # the comma
+          5: name: 'punctuation.definition.string.begin.stata'
+          6:
+            patterns: [
               {include: '#ascii-regex-internals'}
               # {
               #   'include': '#comments-triple-slash'
               # }
               # Unknown if this helps. Regex not colored when regexm split over multiple lines as of 9/11/2017, 1:32:26 AM
             ]
-          '7':
-            'name': 'punctuation.definition.string.end.stata'
-          '8':
-            'name': 'punctuation.definition.parameters.end.stata'
-      }
-      {
-        'comment': 'color regexr with regular quotes i.e. " '
-        'match': '\\b(regexr)(\\()([^,]+)(,)\\s*(\")([^"]+)(\"(\')?)\\s*([^\\)]*)(\\))'
-        'captures':
-          '1':
-            'name': 'support.function.builtin.stata'
-          '2':
-            'name': 'punctuation.definition.parameters.begin.stata'
-          '3':
-            'patterns': [
+          7: name: 'punctuation.definition.string.end.stata'
+          8: name: 'punctuation.definition.parameters.end.stata'
+      }
+      {
+        comment: 'color regexr with regular quotes i.e. " '
+        match: '\\b(regexr)(\\()([^,]+)(,)\\s*(\")([^"]+)(\"(\')?)\\s*([^\\)]*)(\\))'
+        captures:
+          1: name: 'support.function.builtin.stata'
+          2: name: 'punctuation.definition.parameters.begin.stata'
+          3: patterns: [
               {include: '#string-compound'}
               {include: '#string-regular'}
               {include: '#macro-local'}
               {include: '#macro-global'}
               {include: '#functions'}
               {
-                'match': '[\\w&&[^0-9]]\\w{0,31}'
-                'name': 'variable.parameter.function.stata'
+                match: '[\\w&&[^0-9]]\\w{0,31}'
+                name: 'variable.parameter.function.stata'
               }
               {include: '#comments'}
             ]
-          '4':
-            'name': 'punctuation.definition.variable.begin.stata' # the comma
-          '5':
-            'name': 'punctuation.definition.string.begin.stata'
-          '6':
-            'patterns': [
+          4: name: 'punctuation.definition.variable.begin.stata' # the comma
+          5: name: 'punctuation.definition.string.begin.stata'
+          6:
+            patterns: [
               {include: '#ascii-regex-internals'}
             ]
-          '7':
-            'name': 'punctuation.definition.string.end.stata'
-          '8':
-            'name': 'invalid.illegal.punctuation.stata'
-          '9':
-            'patterns': [
-              {
-                'match': ','
-                'name': 'punctuation.definition.variable.begin.stata' # the comma
+          7: name: 'punctuation.definition.string.end.stata'
+          8: name: 'invalid.illegal.punctuation.stata'
+          9:
+            patterns: [
+              {
+                match: ','
+                name: 'punctuation.definition.variable.begin.stata' # the comma
               }
               {include: '#string-compound'}
               {include: '#string-regular'}

              {include: '#macro-global'}
              {include: '#functions'}
              {
                'match': '[\\w&&[^0-9]]\\w{0,31}'
                'name': 'variable.parameter.function.stata'
              }
              {include: '#comments-triple-slash'}
            ]
          '10':
            'name': 'punctuation.definition.parameters.end.stata'
      }
      {
        'comment': 'color regexr with compound quotes i.e. `"text"\' '
        'match': '\\b(regexr)(\\()([^,]+)(,)\\s*(`\")([^"]+)(\"\')\\s*([^\\)]*)(\\))'
        'captures':
          '1':
            'name': 'support.function.builtin.stata'
          '2':
            'name': 'punctuation.definition.parameters.begin.stata'
          '3':
            'patterns': [
              {include: '#string-compound'}
              {include: '#string-regular'}
              {include: '#macro-local'}
              {include: '#macro-global'}
              {include: '#functions'}
              {
                'match': '[\\w&&[^0-9]]\\w{0,31}'
                'name': 'variable.parameter.function.stata'
              }
              {include: '#comments'}
            ]
          '4':
            'name': 'punctuation.definition.variable.begin.stata' # the comma
          '5':
            'name': 'punctuation.definition.string.begin.stata'
          '6':
            'patterns': [
              {include: '#ascii-regex-internals'}
            ]
          '7':
            'name': 'punctuation.definition.string.end.stata'
          '8':
            'patterns': [
              {
                'match': ','
                'name': 'punctuation.definition.variable.begin.stata' # the comma
              }
              {include: '#string-compound'}
              {include: '#string-regular'}

        ]
      }
      {
        begin: '\\b(ma(cro|cr|c)?)\\s+(drop|l(ist|is|i)?)\\s*(?=\\s)'
        beginCaptures:
          0: name: 'keyword.macro.stata'
        end: '\\n'
        patterns: [
          {
            begin: '///'
            end: '\\n'
            name: 'comment.block.stata'
          }
          {
            match: '\\*'
            name: 'keyword.operator.arithmetic.stata'
          }
          {include: '#constants'}
          {include: '#macro-global'}
          {include: '#macro-local'}
          {include: '#comments'}
          {
            match: '\\w{1,31}'
            name: 'entity.name.type.class.stata'
          }
        ]
      }
    ]
  'macro-extended-functions':
    patterns: [
      {
        match: '\\b(properties)\\b'
        name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '\\b(t(ype|yp|y)?|f(ormat|orma|orm|or|o)?|val(ue|u)?\\s+l(able|abl|ab|a)?|var(iable|iabl|iab|ia|i)?\\s+l(abel|abe|ab|a)?|data\\s+l(able|abl|ab|a)?|sort(edby|edb|ed|e)?|lab(el|e)?|maxlength|constraint|char)\\b'
        name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '\\b(permname)\\b'
        name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '\\b(adosubdir|dir|files?|dirs?|other|sysdir)\\b'
        name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '\\b(env(ironment|ironmen|ironme|ironm|iron|iro|ir|i)?)\\b'
        name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '\\b(all\\s+(globals|scalars|matrices)|((numeric|string)\\s+scalars))\\b'
        name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '\\b(list)\\b'
        name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '\\b(rown(ames|ame|am|a)?|coln(ames|ame|am|a)?|rowf(ullnames|ullname|ullnam|ullna|ulln|ull|ul|u)?|colf(ullnames|ullname|ullnam|ullna|ulln|ull|ul|u)?|roweq?|coleq?|rownumb|colnumb|roweqnumb|coleqnumb|rownfreeparms|colnfreeparms|rownlfs|colnlfs|rowsof|colsof|rowvarlist|colvarlist|rowlfnames|collfnames)\\b'
        name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '\\b(tsnorm)\\b'
        name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '\\b((copy|(ud|u)?strlen)\\s+(loc(al|a)?|gl(obal|oba|ob|o)?))\\s+([^\']+)'
        captures:
          1: name: 'keyword.macro.extendedfcn.stata'
          7:
            patterns: [
              {include: '#macro-local'}
              {include: '#macro-global'}
            ]
      }
      {
        match: '\\b(word\\s+count)'
        captures:
          1: name: 'keyword.macro.extendedfcn.stata'
      }
      {
        match: '(word|piece)\\s+([\\s`\'\\w]+)\\s+(of)'
        captures:
          1: name: 'keyword.macro.extendedfcn.stata'
          2:
            patterns: [
              {include: '#macro-local'}
              {include: '#constants'}
            ]
          3: name: 'keyword.macro.extendedfcn.stata'
      }
      {
        begin: '\\b(subinstr\\s+(loc(al|a)?|gl(obal|oba|ob|o)?))\\s+(\\w{1,32})'
        end: '(?=//|\\n)'
        beginCaptures:
          1: name: 'keyword.macro.extendedfcn.stata'
          5: name: 'entity.name.type.class.stata'
        patterns: [
          {include: '#macro-local'}
          {include: '#macro-global'}
          {include: '#string-compound'}
          {include: '#string-regular'}
          {
            match: '(count|coun|cou|co|c)(\\()(local|loca|loc|global|globa|glob|glo|gl)\\s+(\\w{1,32})(\\))'
            captures:
              1: name: 'support.function.builtin.stata'
              2: name: 'punctuation.definition.parameters.begin.stata'
              3: name: 'keyword.macro.extendedfcn.stata'
              4: name: 'entity.name.type.class.stata'
              5: name: 'punctuation.definition.parameters.end.stata'
          }
        ]
      }
