       '1': 'keyword.functions.data.stata.test'
   }
   {
-    'comment': ' If you put braces following the if or else, (same with foreach, etc)
-        1.  the open brace must appear on the same line as the if or else;
-        2.  nothing may follow the open brace except, of course, comments;
-            the first command to be executed must appear on a new line;
-        3.  the close brace must appear on a line by itself.'
-    'begin': '(\\{)\\s*([^\\n]*)(?=\\n)'
-    'beginCaptures':
-      '1':
-        'name': 'keyword.control.block.begin.stata'
-      '2':
-        'patterns': [
-          {
-            'include': '#comments'
-          }
-          {
-            'match': '[^\\n]+'
-            'name': 'illegal.invalid.name.stata'
-          }
-        ]
-    'comment': 'It\'s a complicated regex so that it\'ll alert you if you have text on the same line as the }'
-    'comment': 'correct with nothing else on the line but whitespace; before and after; before; after; correct'
-    'end': '^\\s*(\\})\\s*$|^\\s*([^\\*"\\}]+)\\s+(\\})\\s*([^\\*"\\}/\\n]+)|^\\s*([^"\\*\\}]+)\\s+(\\})|\\s*(\\})\\s*([^"\\*\\}/\\n]+)|(\\})$'
-    'endCaptures':
-      '1':
-        'name': 'keyword.control.block.end.stata'
-      '2':
-        'name': 'invalid.illegal.name.stata'
-      '3':
-        'name': 'keyword.control.block.end.stata'
-      '4':
-        'name': 'invalid.illegal.name.stata'
-      '5':
-        'name': 'invalid.illegal.name.stata'
-      '6':
-        'name': 'keyword.control.block.end.stata'
-      '7':
-        'name': 'keyword.control.block.end.stata'
-      '8':
-        'name': 'invalid.illegal.name.stata'
-      '9':
-        'name': 'keyword.control.block.end.stata'
-    'patterns': [
-      {
-        'include': '$self'
-      }
-    ]
+    'include': '#braces-with-error'
   }
   # Start manual functions:
   {

      {
        'match': '\\b(_b|_coef|_cons|_n|_N|_rc|_se)\\b'
        'name': 'variable.object.stata'
      }
    ]
  'commands-other':

            'name': 'variable.parameter.function.stata'
          }
          {
            'include': '#constants'
          }
          {
            'include': '#comments'
          }
          {
            'include': '#operators'
          }
          {
            'include': '#macro-local'
          }
          {
            'include': '#macro-global'
          }
          {
            'include': '#string-compound'
          }
          {
            'include': '#string-regular'
          }
          {
            'include': '#builtin_variables'
          }
          {
            'include': '#macro-commands'
          }
          {
            'include': '#braces-without-error'
          }
        ]
      }
