     # defined in object.di, not actually part of grammar
     'defined-type': {
       'patterns': [
-        'match': '(wstring|dstring|string|size_t|ptrdiff_t)\\**(?!\\w)',
+        'match': '(wstring|dstring|string|size_t|ptrdiff_t)\\**\\b',
         'name': 'storage.type.defined.d'
       ]
     },

    'enum-declaration': {
      'patterns': [
        {
          'match': 'enum',
          'name': 'storage.type.enum.d'
        },
      ]

    'constructor': {
      'patterns': [
        {
          'match': 'this\\b',
          'name': 'entity.name.function.constructor.d'
        },
      ]
