         ]
       ]
     },
-    #
+    ######
     # Misc
-    #
+    ######
     'comma': {
       'patterns': [
         'match': ',',

        { 'include': '#mixin-declaration' },
        { 'include': '#shared-static-constructor' },
        { 'include': '#shared-static-destructor' },
        {
          'match': ';',
          'name': 'meta.semicolon.d'
        },
      ]
    },


    'module-declaration': {
      'patterns': [
        'begin': 'module\\s+',
        'beginCaptures': { '0': { 'name': 'keyword.package.module.d' } },
        'end': ';',
        'patterns': [
          { 'include': '#identifier' }
        ]
      ]
    },

    #
    # Preprocessor and other directives
    #
    'pragma': {
      'patterns': [
        {
          'match': 'pragma\\s?\\(\\s*[_\\w][_\\d\\w]*\\s*\\)',
          'name': 'gfm.markup.header.preprocessor.pragma.d'
        },
        {
          'begin': 'pragma\\s?\\(\\s*[_\\w][_\\d\\w]*\\s*,',
          'end': '\\)',
          'name': 'gfm.markup.header.preprocessor.pragma.arguments.d'
          'patterns': [
            { 'include': '#expression' },
          ]
        },
        {
          'match': '^#!.+',
          'name': 'gfm.markup.header.preprocessor.script-tag.d'
        }
      ]
    },
    #
    # Expressions
    #
    # We cheat a bit here, since highlighting expressions is overkill, and in
    # any case we want lexical entities like strings and numbers to be
    # clearly visible.  So we group expressions into a meta class for the
    # purposes of other entities.  Expression entities themselves just highlight
    # lexical elements as well as the base expression operators, and a few
    # others.
    #
    'expression': {
      'patterns': [
          { 'include': '#operator' },
          {
            'match': ',',
            'name': 'keyword.operator.comma.d'
          }
          { 'include': '#lexical' },
      ]
    },
    'conditional-expression': {
      'patterns': [
        {
          # ternary
          'match': '\\?|:',
          'name': 'keyword.operator.ternary.d'
        },
        {
          # logical
          'match': '!<>=|!<=|!>=|<>=|!<>|<=|>=|<>|!>|!<|==|!=|&&|\\|\\||<|>',
          'name': 'keyword.operator.logical.d'
        },
        { 'include': '#lexical' }
      ]
    }
    'operator': {
      'patterns': [
        {
          # assign
          'match': '=|\\+=|-=|\\*=|/=|%=|&=|\\|=|\\^=|~=|<<=|>>=|>>>=|^^=',
          'name': 'keyword.operator.assign.d'
        },
        {
          # ternary
          'match': '\\?|:',
          'name': 'keyword.operator.ternary.d'
        },
        {
          # logical
          'match': '!<>=|!<=|!>=|<>=|!<>|<=|>=|<>|!>|!<|==|!=|&&|\\|\\||<|>',
          'name': 'keyword.operator.logical.d'
        },
        {
          # bitwise
          'match': '\\||\\^|&|<<|>>|>>>',
          'name': 'keyword.operator.bitwise.d'
        },
        {
          # arithmetic
          'match': '\\+|-|\\*|/|%',
          'name': 'keyword.operator.arithmetic.d'
        },
        {
          # unary
          'match': '[=~]\s*(&|\\+\\+|\\--|\\*|-|\\+|!)',
          'name': 'keyword.operator.unary.d'
        },
        {
          # misc
          'match': '~|(\\s+!in\\s+)|(\\s+in\\s+)',
          'name': 'keyword.operator.misc.d'
        },
        {
          # primary expressions
          'match': 'this|super|null|true|false|$',
          'name': 'constant.language.primary.d'
        }

      ]
    },
    'assign-operator': {
      'patterns': [
        {
          'match': '=|\\+=|-=|\\*=|/=|%=|&=|\\|=|\\^=|~=|<<=|>>=|>>>=|^^=',
          'name': 'keyword.operator.assign.d'
        },
        { 'include': '#expression' },
      ]
    },
    'ternary-operator': {
      'patterns:': [
        {
          'match': '(\\?|:)',
          'name': 'keyword.operator.ternary.d'
        },
        {
          'include': '#expression',
        }
      ]
    },
    #
    # Template
    #
    'template-declaration': {
      'patterns': [
        {
          'match': 'template',
          'name': 'support.class.template.d',
        },
        { 'include': '#identifier' },
        { 'include': '#template-parameters' },
        { 'include': '#constraint' },
        {
          'begin': '\\{',
          'beginCaptures': { '0': { 'name': 'support.class.template.decldefs.begin.d' } },
          'end': '\\}',
          'endCaptures': { '0': { 'name': 'support.class.template.decldefs.end.d' } },
          'patterns': [
              { 'include': '#decl-defs' }
          ]
        }
      ]
    },
    'template-parameters': {
      'patterns': [
        'begin': '\\(',
        'beginCaptures': { '0': { 'name': 'support.class.template.parameters.begin.d' } },
        'end': '\\)',
        'endCaptures': { '0': { 'name': 'support.class.template.parameters.end.d' } },
        'patterns': [
          { 'include': '#template-parameter-list' }
        ]
      ]
    },
    'template-parameter-list': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.d'
        },
        { 'include': '#template-parameter' }
      ]
    }
    'template-parameter': {
      'patterns': [
        { 'include': '#template-type-parameter' },
        { 'include': '#template-value-parameter' },
        { 'include': '#template-alias-parameter' },
        { 'include': '#template-tuple-parameter' },
        { 'include': '#template-this-parameter' },
      ]
    },
    'constraint': {
      'patterns': [
        'begin': 'if\\s+\\(',
        'beginCaptures': { '0': { 'name': 'support.class.template.constraint.begin.d' } },
        'end': '\\)',
        'endCaptures': { '0': { 'name': 'support.class.template.constraint.end.d' } },
        'patterns': [
          { 'include': '#expression' }
        ]
      ]
    },
    'template-instance': {
      'patterns': [
        { 'include': '#template-arguments' },
        { 'include': '#identifier' }
      ]
    },
    'template-arguments': {
      'patterns': [
        {
          'begin': '!\\s+\\(',
          'beginCaptures': { '0': { 'name': 'support.class.template.arguments.begin.d' } },
          'end': '\\)',
          'endCaptures': { '0': { 'name': 'support.class.template.arguments.end.d' } },
          'patterns': [
            { 'include': '#template-argument-list' }
          ]
        },
        {
          'match': '!',
          'name': 'support.class.template.argument.d'
        },
        { 'include': '#template-single-argument' }
      ]
    }
    'template-argument-list': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.d'
        },
        { 'include': '#template-argument' }
      ]
    },
    'template-argument': {
      'patterns': [
        { 'include': '#type' },
        { 'include': '#expression' },
        { 'include': '#symbol' }
      ]
    },
    'symbol': {
      'patterns': [
        { 'include': '#symbol-tail' }
      ]
    },
    'symbol-tail': {
      'patterns': [
        { 'include': '#template-instance' },
        { 'include': '#identifier' },
      ]
    },
    'template-single-argument': {
      'patterns': [
        {
          'match': 'true|false|null|this',
          'name': 'constant.language.template-single-argument.d'
        },
        { 'include': '#special-keyword' },
        { 'include': '#basic-type-x' },
        { 'include': '#string-literal' },
        { 'include': '#character-literal' },
        { 'include': '#integer-literal' },
        { 'include': '#float-literal' },
        { 'include': '#identifier' }
      ]
    },
    'template-type-parameter': {
      'patterns': [
        { 'include': '#identifier' },
        { 'include': '#template-type-parameter-specialization' },
        { 'include': '#template-type-parameter-default' },
      ]
    },
    'template-type-parameter-specialization': {
      'patterns': [
        {
          'match': ':',
          'name': 'support.class.tag.d'
        },
        { 'include': '#type' }
      ]
    },
    'template-type-parameter-default': {
      'patterns': [
        {
          'match': '=',
          'name': 'support.class.template.operator.equal.d'
        },
        { 'include': '#type' }
      ]
    },
    'template-this-parameter': {
      'patterns': [
        {
          'match': 'this',
          'name': 'support.class.keyword.this.d'
        },
        { 'include': '#template-type-parameter' }
      ]
    },
    'template-value-parameter': {
      'patterns': [
        { 'include': '#basic-type' },
        { 'include': '#declarator' },
        { 'include': '#template-value-parameter-specialization' },
        { 'include': '#template-value-parameter-default' },
      ]
    },
    'template-value-parameter-specialization': {
      'patterns': [
        {
          'match': ':',
          'name': 'support.class.tag.d'
        },
        { 'include': '#conditional-expression' }
      ]
    },
    'template-value-parameter-default': {
      'patterns': [
        {
          'match': '=',
          'name': 'support.class.template.operator.equal.d'
        },
        { 'include': '#expression' },
        { 'include': '#special-keyword' }
      ]
    },
    'template-alias-parameter': {
      'patterns': [
        {
          'match': 'alias',
          'name': 'support.class.template.alias.d'
        },
        { 'include': '#identifier' },
        { 'include': '#template-alias-parameter-specialization' },
        { 'include': '#template-alias-parameter-default' },
        { 'include': '#basic-type' },
        { 'include': '#declarator' },
      ]
    },
    'template-alias-parameter-specialization': {
      'patterns': [
        {
          'match': ':',
          'name': 'support.class.tag.d'
        },
        { 'include': '#type' },
        { 'include': '#conditional-expression' }
      ]
    },
    'template-alias-parameter-default': {
      'patterns': [
        {
          'match': '=',
          'name': 'support.class.template.operator.equal.d'
        },
        { 'include': '#type' },
        { 'include': '#conditional-expression' }
      ]
    },
    'template-tuple-parameter': {
      'patterns': [
        { 'include': '#identifier' },
        {
          'match': '\\.\\.\\.',
          'name': 'support.type.tuple.d'
        }
      ]
    },
    'template-mixin-declaration': {
      'patterns': [
        'begin': 'mixin\\s+template\\s+',
        'beginCaptures': { '0': { 'name': 'support.class.template.mixin.template.begin.d' } },
        'end': '\\{(.*)\\}',
        'endCaptures': {
          '0': {
            'name': 'support.class.template.mixin.template.end.d',
            'patterns': [
              { 'include': '#decl-defs' }
            ]
          },
        },
        'patterns': [
          { 'include': '#identifier' },
          { 'include': '#template-parameters' },
          { 'include': '#constraint' }
        ]
      ]
    },
    'template-mixin': {
      'patterns': [
        'begin': 'mixin\\s+',
        'beginCaptures': { '0': { 'name': 'support.class.template.mixin.begin.d' } },
        'end': ';',
        'endCaptures': { '0': { 'name': 'support.class.template.mixin.end.d' } },
        'patterns': [
          { 'include': '#mixin-template-name' },
          { 'include': '#template-arguments' },
          { 'include': '#identifier' }
        ]
      ]
    },
    'mixin-template-name': {
      'patterns': [
        { 'include': '#qualified-identifier-list' },
        { 'include': '#typeof' },
      ]
    },
    'qualified-identifier-list': {
      'patterns': [
        { 'include': '#identifier' },
        { 'include': '#template-instance' },
      ]
    },




    #
    # Declarations
    #
    'declaration': {
      'patterns': [
        { 'include': '#alias-declaration' },
        { 'include': '#aggregate-declaration' },
        { 'include': '#enum-declaration' },
        { 'include': '#import-declaration' },
        { 'include': '#decl' }
      ]
    },
    'alias-declaration': {
      'patterns': [
        {
          'match': 'alias',
          'name': 'keyword.alias.d'
        },
        { 'include': '#storage-class' },
        { 'include': '#basic-type' },
        { 'include': '#declarator' },
        { 'include': '#alias-declaration-x' }
      ]
    },
    #
    # Initializers
    #
    'initializer': {
      'patterns': [
        { 'include': '#void-initializer' },
        { 'include': '#non-void-initializer' }
      ]
    },
    'void-initializer': {
      'patterns': [
        'match': 'void',
        'name': 'support.type.void.d'
      ]
    },
    'non-void-initializer': {
      'patterns': [
        { 'include': '#exp-initializer' },
        { 'include': '#array-initializer' },
        { 'include': '#struct-initializer' }
      ]
    },
    'exp-initializer': {
      'patterns': [
        { 'include': '#expression' }
      ]
    },
    'array-initializer': {
      'patterns': [
        'begin': '\\[',
        'beginCaptures': { '0': { 'name': 'support.type.array.initializer.begin.d' } },
        'end': '\\]',
        'endCaptures': {'0': { 'name': 'support.type.array.initializer.end.d' } },
        'patterns': [
          {
            'match': ',',
            'name': 'keyword.operator.comma.d'
          },
          { 'include': '#array-member-initialization' },
        ]
      ]
    },
    'array-member-initializations': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.d'
        },
        { 'include': '#array-member-initialization' },
      ]
    },
    'array-member-initialization': {
      'patterns': [
        { 'include': '#non-void-initializer' },
        { 'include': '#expression' },
        {
          'match': ':',
          'name': 'support.type.tag.d'
        }
      ]
    },
    'struct-initializer': {
      'patterns': [
        'begin': '\\{',
        'beginCaptures': { '0': { 'name': 'support.type.struct.initializer.begin.d' } },
        'end': '\\}',
        'endCaptures': { '0': { 'name': 'support.type.struct.initializer.end.d' } },
        'patterns': [
          { 'include': '#struct-member-initializers' }
        ]
      ]
    }
    'struct-member-initializers': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.d'
        },
        { 'include': '#struct-member-initializer' },
      ]
    },
    'struct-member-initializer': {
      'patterns': [
        { 'include': '#non-void-initializer' },
        { 'include': '#identifier' },
        {
          'match': ':',
          'name': 'support.type.tag.d'
        },
      ]
    },
    'default-initializer-expression': {
      'patterns': [
        { 'include': '#expression' },
        { 'include': '#special-keyword' }
      ]
    },
    #
    # Assembly (Iasm)
    #
    'asm-statement': {
      'patterns': [
        'begin': 'asm\\s*\\{',
        'end': '\\}',
        'beginCaptures': { '0': { 'name': 'keyword.control.asm.begin.d' } },
        'endCaptures': { '0': { 'name': 'keyword.control.asm.end.d' } },
        'patterns': [
          { 'include': '#asm-instruction' },
        ],
      ]
    },
    'asm-instruction': {
      'patterns': [
        {
          'match': 'align|even|naked|db|ds|di|dl|df|dd|de|:',
          'name': 'keyword.asm-instruction.d',
        },
        { 'include': '#operands' },
        { 'include': '#integer-expression' }
      ]
    },
    'operands': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.assembly.d'
        }
        { 'include': '#asm-exp' },
      ]
    },
    'asm-exp': {
      'patterns': [
        {
          'match': '\\?|:',
          'name': 'keyword.operator.ternary.assembly.d',
        },
        {
          'match': '\\]|\\[',
          'name': 'keyword.operator.bracket.assembly.d',
        },
        {
          'match': '>>>|\\|\\||&&|==|!=|<=|>=|<<|>>|\\||\\^|&|<|>|\\+|-|\\*|/|%|~|!',
          'name': 'keyword.operator.assembly.d'
        },
        { 'include': '#asm-una-exp' },
      ]
    }
    'integer-expression': {
      'patterns': [
        { 'include': '#integer-literal' },
        { 'include': '#identifier' },
      ]
    },
    'asm-una-exp': {
      'patterns': [
        { 'include': '#asm-type-prefix' },
        {
          'match': 'offsetof|seg',
          'name': 'support.type.assembly.d'
        },
        { 'include': '#asm-primary-expression' },
      ]
    },
    'asm-primary-expression': {
      'patterns': [
        { 'include': '#integer-literal' },
        { 'include': '#float-literal' },
        {
          'match': '__LOCAL_SIZE',
          'name': 'constant.language.assembly.d'
        },
        { 'include': '#register' },
        { 'include': '#register-64' },
        { 'include': '#identifier' }
      ]
    },
    'asm-type-prefix': {
      'patterns': [
        'match': '(near\\s+ptr)|(far\\s+ptr)|(byte\\s+ptr)|(short\\s+ptr)|(int\\s+ptr)|(word\\s+ptr)|(dword\\s+ptr)|(qword\\s+ptr)|(float\\s+ptr)|(double\\s+ptr)|(real\\s+ptr)',
        'name': 'support.type.asm-type-prefix.d',
      ]
    },
    'register': {
      'patterns': [
        'match': 'XMM0|XMM1|XMM2|XMM3|XMM4|XMM5|XMM6|XMM7|MM0|MM1|MM2|MM3|MM4|MM5|MM6|MM7|ST\\(0\\)|ST\\(1\\)|ST\\(2\\)|ST\\(3\\)|ST\\(4\\)|ST\\(5\\)|ST\\(6\\)|ST\\(7\\)|ST|TR1|TR2|TR3|TR4|TR5|TR6|TR7|DR0|DR1|DR2|DR3|DR4|DR5|DR6|DR7|CR0|CR2|CR3|CR4|EAX|EBX|ECX|EDX|EBP|ESP|EDI|ESI|AL|AH|AX|BL|BH|BX|CL|CH|CX|DL|DH|DX|BP|SP|DI|SI|ES|CS|SS|DS|GS|FS',
        'name': 'storage.type.assembly.register.d',
      ]
    },
    'register-64': {
      'patterns': [
        'match': 'RAX|RBX|RCX|RDX|BPL|RBP|SPL|RSP|DIL|RDI|SIL|RSI|R8B|R8W|R8D|R8|R9B|R9W|R9D|R9|R10B|R10W|R10D|R10|R11B|R11W|R11D|R11|R12B|R12W|R12D|R12|R13B|R13W|R13D|R13|R14B|R14W|R14D|R14|R15B|R15W|R15D|R15|XMM8|XMM9|XMM10|XMM11|XMM12|XMM13|XMM14|XMM15|YMM0|YMM1|YMM2|YMM3|YMM4|YMM5|YMM6|YMM7|YMM8|YMM9|YMM10|YMM11|YMM12|YMM13|YMM14|YMM15',
        'name': 'storage.type.assembly.register-64.d'
      ]
    },
    #
    # Import Declarations
    #
    'import-declaration': {
      'patterns': [
        {

    #
    # Condition
    #


    #
    # Preprocessor and other directives
    #
    'pragma': {
      'patterns': [
        {
          'match': 'pragma\\s?\\(\\s*[_\\w][_\\d\\w]*\\s*\\)',
          'name': 'gfm.markup.header.preprocessor.pragma.d'
        },
        {
          'begin': 'pragma\\s?\\(\\s*[_\\w][_\\d\\w]*\\s*,',
          'end': '\\)',
          'name': 'gfm.markup.header.preprocessor.pragma.arguments.d'
          'patterns': [
            { 'include': '#expression' },
          ]
        },
        {
          'match': '^#!.+',
          'name': 'gfm.markup.header.preprocessor.script-tag.d'
        }
      ]
    },
    #
    # Expressions
    #
    # We cheat a bit here, since highlighting expressions is overkill, and in
    # any case we want lexical entities like strings and numbers to be
    # clearly visible.  So we group expressions into a meta class for the
    # purposes of other entities.  Expression entities themselves just highlight
    # lexical elements as well as the base expression operators, and a few
    # others.
    #
    'expression': {
      'patterns': [
          { 'include': '#operator' },
          {
            'match': ',',
            'name': 'keyword.operator.comma.d'
          }
          { 'include': '#lexical' },
      ]
    },
    'conditional-expression': {
      'patterns': [
        {
          # ternary
          'match': '\\?|:',
          'name': 'keyword.operator.ternary.d'
        },
        {
          # logical
          'match': '!<>=|!<=|!>=|<>=|!<>|<=|>=|<>|!>|!<|==|!=|&&|\\|\\||<|>',
          'name': 'keyword.operator.logical.d'
        },
        { 'include': '#lexical' }
      ]
    }
    'operator': {
      'patterns': [
        {
          # assign
          'match': '=|\\+=|-=|\\*=|/=|%=|&=|\\|=|\\^=|~=|<<=|>>=|>>>=|^^=',
          'name': 'keyword.operator.assign.d'
        },
        {
          # ternary
          'match': '\\?|:',
          'name': 'keyword.operator.ternary.d'
        },
        {
          # logical
          'match': '!<>=|!<=|!>=|<>=|!<>|<=|>=|<>|!>|!<|==|!=|&&|\\|\\||<|>',
          'name': 'keyword.operator.logical.d'
        },
        {
          # bitwise
          'match': '\\||\\^|&|<<|>>|>>>',
          'name': 'keyword.operator.bitwise.d'
        },
        {
          # arithmetic
          'match': '\\+|-|\\*|/|%',
          'name': 'keyword.operator.arithmetic.d'
        },
        {
          # unary
          'match': '[=~]\s*(&|\\+\\+|\\--|\\*|-|\\+|!)',
          'name': 'keyword.operator.unary.d'
        },
        {
          # misc
          'match': '~|(\\s+!in\\s+)|(\\s+in\\s+)',
          'name': 'keyword.operator.misc.d'
        },
        {
          # primary expressions
          'match': 'this|super|null|true|false|$',
          'name': 'constant.language.primary.d'
        }

      ]
    },
    'assign-operator': {
      'patterns': [
        {
          'match': '=|\\+=|-=|\\*=|/=|%=|&=|\\|=|\\^=|~=|<<=|>>=|>>>=|^^=',
          'name': 'keyword.operator.assign.d'
        },
        { 'include': '#expression' },
      ]
    },
    'ternary-operator': {
      'patterns:': [
        {
          'match': '(\\?|:)',
          'name': 'keyword.operator.ternary.d'
        },
        {
          'include': '#expression',
        }
      ]
    },
    #
    # Template
    #
    'template-declaration': {
      'patterns': [
        {
          'match': 'template',
          'name': 'support.class.template.d',
        },
        { 'include': '#identifier' },
        { 'include': '#template-parameters' },
        { 'include': '#constraint' },
        {
          'begin': '\\{',
          'beginCaptures': { '0': { 'name': 'support.class.template.decldefs.begin.d' } },
          'end': '\\}',
          'endCaptures': { '0': { 'name': 'support.class.template.decldefs.end.d' } },
          'patterns': [
              { 'include': '#decl-defs' }
          ]
        }
      ]
    },
    'template-parameters': {
      'patterns': [
        'begin': '\\(',
        'beginCaptures': { '0': { 'name': 'support.class.template.parameters.begin.d' } },
        'end': '\\)',
        'endCaptures': { '0': { 'name': 'support.class.template.parameters.end.d' } },
        'patterns': [
          { 'include': '#template-parameter-list' }
        ]
      ]
    },
    'template-parameter-list': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.d'
        },
        { 'include': '#template-parameter' }
      ]
    }
    'template-parameter': {
      'patterns': [
        { 'include': '#template-type-parameter' },
        { 'include': '#template-value-parameter' },
        { 'include': '#template-alias-parameter' },
        { 'include': '#template-tuple-parameter' },
        { 'include': '#template-this-parameter' },
      ]
    },
    'constraint': {
      'patterns': [
        'begin': 'if\\s+\\(',
        'beginCaptures': { '0': { 'name': 'support.class.template.constraint.begin.d' } },
        'end': '\\)',
        'endCaptures': { '0': { 'name': 'support.class.template.constraint.end.d' } },
        'patterns': [
          { 'include': '#expression' }
        ]
      ]
    },
    'template-instance': {
      'patterns': [
        { 'include': '#template-arguments' },
        { 'include': '#identifier' }
      ]
    },
    'template-arguments': {
      'patterns': [
        {
          'begin': '!\\s+\\(',
          'beginCaptures': { '0': { 'name': 'support.class.template.arguments.begin.d' } },
          'end': '\\)',
          'endCaptures': { '0': { 'name': 'support.class.template.arguments.end.d' } },
          'patterns': [
            { 'include': '#template-argument-list' }
          ]
        },
        {
          'match': '!',
          'name': 'support.class.template.argument.d'
        },
        { 'include': '#template-single-argument' }
      ]
    }
    'template-argument-list': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.d'
        },
        { 'include': '#template-argument' }
      ]
    },
    'template-argument': {
      'patterns': [
        { 'include': '#type' },
        { 'include': '#expression' },
        { 'include': '#symbol' }
      ]
    },
    'symbol': {
      'patterns': [
        { 'include': '#symbol-tail' }
      ]
    },
    'symbol-tail': {
      'patterns': [
        { 'include': '#template-instance' },
        { 'include': '#identifier' },
      ]
    },
    'template-single-argument': {
      'patterns': [
        {
          'match': 'true|false|null|this',
          'name': 'constant.language.template-single-argument.d'
        },
        { 'include': '#special-keyword' },
        { 'include': '#basic-type-x' },
        { 'include': '#string-literal' },
        { 'include': '#character-literal' },
        { 'include': '#integer-literal' },
        { 'include': '#float-literal' },
        { 'include': '#identifier' }
      ]
    },
    'template-type-parameter': {
      'patterns': [
        { 'include': '#identifier' },
        { 'include': '#template-type-parameter-specialization' },
        { 'include': '#template-type-parameter-default' },
      ]
    },
    'template-type-parameter-specialization': {
      'patterns': [
        {
          'match': ':',
          'name': 'support.class.tag.d'
        },
        { 'include': '#type' }
      ]
    },
    'template-type-parameter-default': {
      'patterns': [
        {
          'match': '=',
          'name': 'support.class.template.operator.equal.d'
        },
        { 'include': '#type' }
      ]
    },
    'template-this-parameter': {
      'patterns': [
        {
          'match': 'this',
          'name': 'support.class.keyword.this.d'
        },
        { 'include': '#template-type-parameter' }
      ]
    },
    'template-value-parameter': {
      'patterns': [
        { 'include': '#basic-type' },
        { 'include': '#declarator' },
        { 'include': '#template-value-parameter-specialization' },
        { 'include': '#template-value-parameter-default' },
      ]
    },
    'template-value-parameter-specialization': {
      'patterns': [
        {
          'match': ':',
          'name': 'support.class.tag.d'
        },
        { 'include': '#conditional-expression' }
      ]
    },
    'template-value-parameter-default': {
      'patterns': [
        {
          'match': '=',
          'name': 'support.class.template.operator.equal.d'
        },
        { 'include': '#expression' },
        { 'include': '#special-keyword' }
      ]
    },
    'template-alias-parameter': {
      'patterns': [
        {
          'match': 'alias',
          'name': 'support.class.template.alias.d'
        },
        { 'include': '#identifier' },
        { 'include': '#template-alias-parameter-specialization' },
        { 'include': '#template-alias-parameter-default' },
        { 'include': '#basic-type' },
        { 'include': '#declarator' },
      ]
    },
    'template-alias-parameter-specialization': {
      'patterns': [
        {
          'match': ':',
          'name': 'support.class.tag.d'
        },
        { 'include': '#type' },
        { 'include': '#conditional-expression' }
      ]
    },
    'template-alias-parameter-default': {
      'patterns': [
        {
          'match': '=',
          'name': 'support.class.template.operator.equal.d'
        },
        { 'include': '#type' },
        { 'include': '#conditional-expression' }
      ]
    },
    'template-tuple-parameter': {
      'patterns': [
        { 'include': '#identifier' },
        {
          'match': '\\.\\.\\.',
          'name': 'support.type.tuple.d'
        }
      ]
    },
    'template-mixin-declaration': {
      'patterns': [
        'begin': 'mixin\\s+template\\s+',
        'beginCaptures': { '0': { 'name': 'support.class.template.mixin.template.begin.d' } },
        'end': '\\{(.*)\\}',
        'endCaptures': {
          '0': {
            'name': 'support.class.template.mixin.template.end.d',
            'patterns': [
              { 'include': '#decl-defs' }
            ]
          },
        },
        'patterns': [
          { 'include': '#identifier' },
          { 'include': '#template-parameters' },
          { 'include': '#constraint' }
        ]
      ]
    },
    'template-mixin': {
      'patterns': [
        'begin': 'mixin\\s+',
        'beginCaptures': { '0': { 'name': 'support.class.template.mixin.begin.d' } },
        'end': ';',
        'endCaptures': { '0': { 'name': 'support.class.template.mixin.end.d' } },
        'patterns': [
          { 'include': '#mixin-template-name' },
          { 'include': '#template-arguments' },
          { 'include': '#identifier' }
        ]
      ]
    },
    'mixin-template-name': {
      'patterns': [
        { 'include': '#qualified-identifier-list' },
        { 'include': '#typeof' },
      ]
    },
    'qualified-identifier-list': {
      'patterns': [
        { 'include': '#identifier' },
        { 'include': '#template-instance' },
      ]
    },




    #
    # Declarations
    #
    'declaration': {
      'patterns': [
        { 'include': '#alias-declaration' },
        { 'include': '#aggregate-declaration' },
        { 'include': '#enum-declaration' },
        { 'include': '#import-declaration' },
        { 'include': '#decl' }
      ]
    },
    'alias-declaration': {
      'patterns': [
        {
          'match': 'alias',
          'name': 'keyword.alias.d'
        },
        { 'include': '#storage-class' },
        { 'include': '#basic-type' },
        { 'include': '#declarator' },
        { 'include': '#alias-declaration-x' }
      ]
    },
    #
    # Initializers
    #
    'initializer': {
      'patterns': [
        { 'include': '#void-initializer' },
        { 'include': '#non-void-initializer' }
      ]
    },
    'void-initializer': {
      'patterns': [
        'match': 'void',
        'name': 'support.type.void.d'
      ]
    },
    'non-void-initializer': {
      'patterns': [
        { 'include': '#exp-initializer' },
        { 'include': '#array-initializer' },
        { 'include': '#struct-initializer' }
      ]
    },
    'exp-initializer': {
      'patterns': [
        { 'include': '#expression' }
      ]
    },
    'array-initializer': {
      'patterns': [
        'begin': '\\[',
        'beginCaptures': { '0': { 'name': 'support.type.array.initializer.begin.d' } },
        'end': '\\]',
        'endCaptures': {'0': { 'name': 'support.type.array.initializer.end.d' } },
        'patterns': [
          {
            'match': ',',
            'name': 'keyword.operator.comma.d'
          },
          { 'include': '#array-member-initialization' },
        ]
      ]
    },
    'array-member-initializations': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.d'
        },
        { 'include': '#array-member-initialization' },
      ]
    },
    'array-member-initialization': {
      'patterns': [
        { 'include': '#non-void-initializer' },
        { 'include': '#expression' },
        {
          'match': ':',
          'name': 'support.type.tag.d'
        }
      ]
    },
    'struct-initializer': {
      'patterns': [
        'begin': '\\{',
        'beginCaptures': { '0': { 'name': 'support.type.struct.initializer.begin.d' } },
        'end': '\\}',
        'endCaptures': { '0': { 'name': 'support.type.struct.initializer.end.d' } },
        'patterns': [
          { 'include': '#struct-member-initializers' }
        ]
      ]
    }
    'struct-member-initializers': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.d'
        },
        { 'include': '#struct-member-initializer' },
      ]
    },
    'struct-member-initializer': {
      'patterns': [
        { 'include': '#non-void-initializer' },
        { 'include': '#identifier' },
        {
          'match': ':',
          'name': 'support.type.tag.d'
        },
      ]
    },
    'default-initializer-expression': {
      'patterns': [
        { 'include': '#expression' },
        { 'include': '#special-keyword' }
      ]
    },
    #
    # Assembly (Iasm)
    #
    'asm-statement': {
      'patterns': [
        'begin': 'asm\\s*\\{',
        'end': '\\}',
        'beginCaptures': { '0': { 'name': 'keyword.control.asm.begin.d' } },
        'endCaptures': { '0': { 'name': 'keyword.control.asm.end.d' } },
        'patterns': [
          { 'include': '#asm-instruction' },
        ],
      ]
    },
    'asm-instruction': {
      'patterns': [
        {
          'match': 'align|even|naked|db|ds|di|dl|df|dd|de|:',
          'name': 'keyword.asm-instruction.d',
        },
        { 'include': '#operands' },
        { 'include': '#integer-expression' }
      ]
    },
    'operands': {
      'patterns': [
        {
          'match': ',',
          'name': 'keyword.operator.comma.assembly.d'
        }
        { 'include': '#asm-exp' },
      ]
    },
    'asm-exp': {
      'patterns': [
        {
          'match': '\\?|:',
          'name': 'keyword.operator.ternary.assembly.d',
        },
        {
          'match': '\\]|\\[',
          'name': 'keyword.operator.bracket.assembly.d',
        },
        {
          'match': '>>>|\\|\\||&&|==|!=|<=|>=|<<|>>|\\||\\^|&|<|>|\\+|-|\\*|/|%|~|!',
          'name': 'keyword.operator.assembly.d'
        },
        { 'include': '#asm-una-exp' },
      ]
    }
    'integer-expression': {
      'patterns': [
        { 'include': '#integer-literal' },
        { 'include': '#identifier' },
      ]
    },
    'asm-una-exp': {
      'patterns': [
        { 'include': '#asm-type-prefix' },
        {
          'match': 'offsetof|seg',
          'name': 'support.type.assembly.d'
        },
        { 'include': '#asm-primary-expression' },
      ]
    },
    'asm-primary-expression': {
      'patterns': [
        { 'include': '#integer-literal' },
        { 'include': '#float-literal' },
        {
          'match': '__LOCAL_SIZE',
          'name': 'constant.language.assembly.d'
        },
        { 'include': '#register' },
        { 'include': '#register-64' },
        { 'include': '#identifier' }
      ]
    },
    'asm-type-prefix': {
      'patterns': [
        'match': '(near\\s+ptr)|(far\\s+ptr)|(byte\\s+ptr)|(short\\s+ptr)|(int\\s+ptr)|(word\\s+ptr)|(dword\\s+ptr)|(qword\\s+ptr)|(float\\s+ptr)|(double\\s+ptr)|(real\\s+ptr)',
        'name': 'support.type.asm-type-prefix.d',
      ]
    },
    'register': {
      'patterns': [
        'match': 'XMM0|XMM1|XMM2|XMM3|XMM4|XMM5|XMM6|XMM7|MM0|MM1|MM2|MM3|MM4|MM5|MM6|MM7|ST\\(0\\)|ST\\(1\\)|ST\\(2\\)|ST\\(3\\)|ST\\(4\\)|ST\\(5\\)|ST\\(6\\)|ST\\(7\\)|ST|TR1|TR2|TR3|TR4|TR5|TR6|TR7|DR0|DR1|DR2|DR3|DR4|DR5|DR6|DR7|CR0|CR2|CR3|CR4|EAX|EBX|ECX|EDX|EBP|ESP|EDI|ESI|AL|AH|AX|BL|BH|BX|CL|CH|CX|DL|DH|DX|BP|SP|DI|SI|ES|CS|SS|DS|GS|FS',
        'name': 'storage.type.assembly.register.d',
      ]
    },
    'register-64': {
      'patterns': [
        'match': 'RAX|RBX|RCX|RDX|BPL|RBP|SPL|RSP|DIL|RDI|SIL|RSI|R8B|R8W|R8D|R8|R9B|R9W|R9D|R9|R10B|R10W|R10D|R10|R11B|R11W|R11D|R11|R12B|R12W|R12D|R12|R13B|R13W|R13D|R13|R14B|R14W|R14D|R14|R15B|R15W|R15D|R15|XMM8|XMM9|XMM10|XMM11|XMM12|XMM13|XMM14|XMM15|YMM0|YMM1|YMM2|YMM3|YMM4|YMM5|YMM6|YMM7|YMM8|YMM9|YMM10|YMM11|YMM12|YMM13|YMM14|YMM15',
        'name': 'storage.type.assembly.register-64.d'
      ]
    },

    #############
    # Conditional
    #############
    'conditional-declaration': {
      'patterns': [
        { 'include': '#condition' },
