           }
           {
             'include': '#string-regular'
+          }
+        ]
+      }
+      {
+        'begin': '(`)(macval)(\\()'
+        'beginCaptures':
+          '1':
+            'name': 'punctuation.definition.string.begin.stata'
+          '2':
+            'name': 'support.function.builtin.stata'
+          '3':
+            'name': 'punctuation.definition.parameters.begin.stata'
+        'end': '(\\))(\')'
+        'endCaptures':
+          '1':
+            'name': 'punctuation.definition.parameters.begin.stata'
+          '2':
+            'name': 'punctuation.definition.string.end.stata'
+        'contentName': 'meta.macro-extended-function.stata'
+        'patterns': [
+          {
+            'include': '#macro-local'
+          }
+          {
+            'include': '#macro-global'
+          }
+          {
+            'match': '[A-Za-z_][A-Za-z0-9_]{0,31}'
+            'name': 'entity.name.type.class.stata'
           }
         ]
       }

        'end': '\''
        'endCaptures':
          '0':
            'name': 'punctuation.definition.blahblah.string.end.stata'
        'contentName': 'meta.macro-extended-function.stata'
        'patterns': [
          {

              {
                'include': '#macro-global'
              }
            ]
      }
      {
