       {include: '#macro-local'}
       {include: '#macro-global'}
       {
-        'comment': 'NOTE: Error if I have \.+ No idea why but it works fine it seems with just \.'
-        'match': '.'
-        'name': 'string.quoted.stata'
+        comment: 'NOTE: Error if I have \.+ No idea why but it works fine it seems with just \.'
+        match: '.'
+        name: 'string.quoted.stata'
       }
     ]
   'ascii-regex-character-class':
-    'patterns': [
-      {
-        'match': '\\\\[\\*\\+\\?\\-\\.\\^\\$\\|\\[\\]\\(\\)\\\\]'
-        'name': 'constant.character.escape.backslash.stata'
-      }
-      {
-        'match': '\\.'
-        'name': 'constant.character.character-class.stata'
-      }
-      {
-        'match': '\\\\.'
-        'name': 'illegal.invalid.character-class.stata'
-      }
-      {
-        'begin': '(\\[)(\\^)?'
-        'beginCaptures':
-          '1':
-            'name': 'punctuation.definition.character-class.stata'
-          '2':
-            'name': 'keyword.operator.negation.stata'
-        'end': '(\\])'
-        'endCaptures':
-          '1':
-            'name': 'punctuation.definition.character-class.stata'
-        'name': 'constant.other.character-class.set.stata'
-        'patterns': [
+    patterns: [
+      {
+        match: '\\\\[\\*\\+\\?\\-\\.\\^\\$\\|\\[\\]\\(\\)\\\\]'
+        name: 'constant.character.escape.backslash.stata'
+      }
+      {
+        match: '\\.'
+        name: 'constant.character.character-class.stata'
+      }
+      {
+        match: '\\\\.'
+        name: 'illegal.invalid.character-class.stata'
+      }
+      {
+        begin: '(\\[)(\\^)?'
+        beginCaptures:
+          1: name: 'punctuation.definition.character-class.stata'
+          2: name: 'keyword.operator.negation.stata'
+        end: '(\\])'
+        endCaptures:
+          1: name: 'punctuation.definition.character-class.stata'
+        name: 'constant.other.character-class.set.stata'
+        patterns: [
           {include: '#ascii-regex-character-class'}
           {
-            'captures':
-              '2':
-                'name': 'constant.character.escape.backslash.stata'
-              '4':
-                'name': 'constant.character.escape.backslash.stata'
-            'match': '((\\\\.)|.)\\-((\\\\.)|[^\\]])'
-            'name': 'constant.other.character-class.range.stata'
+            captures:
+              2: name: 'constant.character.escape.backslash.stata'
+              4: name: 'constant.character.escape.backslash.stata'
+            match: '((\\\\.)|.)\\-((\\\\.)|[^\\]])'
+            name: 'constant.other.character-class.range.stata'
           }
         ]
       }
     ]
   'unicode-regex-functions':
-    'patterns': [
-      {
-        'comment': 'color regexm with regular quotes i.e. " '
-        'match': '\\b(ustrregexm)(\\()([^,]+)(,)\\s*(\")([^"]+)(\"(\')?)([,0-9\\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(ustrregexm)(\\()([^,]+)(,)\\s*(\")([^"]+)(\"(\')?)([,0-9\\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: '#unicode-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':
-            'patterns': [
+          7: name: 'punctuation.definition.string.end.stata'
+          8: name: 'invalid.illegal.punctuation.stata'
+          9:
+            patterns: [
               {include: '#constants'}
               {
-                'match': ','
-                'name': 'punctuation.definition.variable.begin.stata' # the comma
+                match: ','
+                name: 'punctuation.definition.variable.begin.stata' # the comma
               }
             ]
           '10':
-            'name': 'punctuation.definition.parameters.end.stata'
-      }
-      {
-        'comment': 'color regexm with compound quotes'
-        'match': '\\b(ustrregexm)(\\()([^,]+)(,)\\s*(`\")([^"]+)(\"\')([,0-9\\s]*)?\\s*(\\))'
-        'captures':
-          '1':
-            'name': 'support.function.builtin.stata'
-          '2':
-            'name': 'punctuation.definition.parameters.begin.stata'
-          '3':
-            'patterns': [
+            name: 'punctuation.definition.parameters.end.stata'
+      }
+      {
+        comment: 'color regexm with compound quotes'
+        match: '\\b(ustrregexm)(\\()([^,]+)(,)\\s*(`\")([^"]+)(\"\')([,0-9\\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: '#unicode-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':
-            'patterns': [
+          7: name: 'punctuation.definition.string.end.stata'
+          8:
+            patterns: [
               {include: '#constants'}
               {
-                'match': ','
-                'name': 'punctuation.definition.variable.begin.stata' # the comma
-              }
-            ]
-          '9':
-            'name': 'punctuation.definition.parameters.end.stata'
-      }
-      {
-        'comment': 'color regexr with regular quotes i.e. " '
-        'match': '\\b(ustrregexrf|ustrregexra)(\\()([^,]+)(,)\\s*(\")([^"]+)(\"(\')?)\\s*([^\\)]*)(\\))'
-        'captures':
-          '1':
-            'name': 'support.function.builtin.stata'
-          '2':
-            'name': 'punctuation.definition.parameters.begin.stata'
-          '3':
-            'patterns': [
+                match: ','
+                name: 'punctuation.definition.variable.begin.stata' # the comma
+              }
+            ]
+          9: name: 'punctuation.definition.parameters.end.stata'
+      }
+      {
+        comment: 'color regexr with regular quotes i.e. " '
+        match: '\\b(ustrregexrf|ustrregexra)(\\()([^,]+)(,)\\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: '#unicode-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'}

    ]
  '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'
      }
    ]
  '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'
      }
    ]
  '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': [
              {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-triple-slash'}
            ]
          '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': [
              {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-triple-slash'}
            ]
          '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': [
              {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':
            'name': 'invalid.illegal.punctuation.stata'
          '9':
            'patterns': [
              {
                'match': ','
                'name': 'punctuation.definition.variable.begin.stata' # the comma
              }
              {include: '#string-compound'}
              {include: '#string-regular'}

      }
    ]
  'subscripts':
    patterns: [
      {
        comment: 'highlight expressions, like [_n], when using subscripts on a variable'
        begin: '(?<=[\\w\'])(\\[)'
        beginCaptures:
          1: name: 'punctuation.definition.parameters.begin.stata'
        end: '(\\])'
        endCaptures:
          1: name: 'punctuation.definition.parameters.end.stata'
        name: 'meta.subscripts.stata'
        patterns: [
          {include: '#macro-local'}
          {include: '#macro-global'}
          {include: '#builtin_variables'}
