def _parse_trailing_type_spec(self) -> ASTTrailingTypeSpec:
    self.skip_ws()
    for t in self._simple_fundemental_types:
        if self.skip_word(t):
            return ASTTrailingTypeSpecFundamental(t)
    elements = []
    if self.skip_word_and_ws('signed'):
        elements.append('signed')
    elif self.skip_word_and_ws('unsigned'):
        elements.append('unsigned')
    while 1:
        if self.skip_word_and_ws('short'):
            elements.append('short')
        elif self.skip_word_and_ws('long'):
            elements.append('long')
        else:
            break
    if self.skip_word_and_ws('char'):
        elements.append('char')
    elif self.skip_word_and_ws('int'):
        elements.append('int')
    elif self.skip_word_and_ws('double'):
        elements.append('double')
    if (len(elements) > 0):
        return ASTTrailingTypeSpecFundamental(' '.join(elements))
    self.skip_ws()
    if self.skip_word_and_ws('decltype'):
        if (not self.skip_string_and_ws('(')):
            self.fail("Expected '(' after 'decltype'.")
        if self.skip_word_and_ws('auto'):
            if (not self.skip_string(')')):
                self.fail("Expected ')' after 'decltype(auto'.")
            return ASTTrailingTypeSpecDecltypeAuto()
        expr = self._parse_expression()
        self.skip_ws()
        if (not self.skip_string(')')):
            self.fail("Expected ')' after 'decltype(<expr>'.")
        return ASTTrailingTypeSpecDecltype(expr)
    prefix = None
    self.skip_ws()
    for k in self._prefix_keys:
        if self.skip_word_and_ws(k):
            prefix = k
            break
    nestedName = self._parse_nested_name()
    return ASTTrailingTypeSpecName(prefix, nestedName)
def _parse_trailing_type_spec(self) -> ASTTrailingTypeSpec:
    self.skip_ws()
    for t in self._simple_fundemental_types:
        if self.skip_word(t):
            return ASTTrailingTypeSpecFundamental(t)
    elements = []
    if self.skip_word_and_ws('signed'):
        elements.append('signed')
    elif self.skip_word_and_ws('unsigned'):
        elements.append('unsigned')
    while 1:
        if self.skip_word_and_ws('short'):
            elements.append('short')
        elif self.skip_word_and_ws('long'):
            elements.append('long')
        else:
            break
    if self.skip_word_and_ws('char'):
        elements.append('char')
    elif self.skip_word_and_ws('int'):
        elements.append('int')
    elif self.skip_word_and_ws('double'):
        elements.append('double')
    if (len(elements) > 0):
        return ASTTrailingTypeSpecFundamental(' '.join(elements))
    self.skip_ws()
    if self.skip_word_and_ws('decltype'):
        if (not self.skip_string_and_ws('(')):
            self.fail("Expected '(' after 'decltype'.")
        if self.skip_word_and_ws('auto'):
            if (not self.skip_string(')')):
                self.fail("Expected ')' after 'decltype(auto'.")
            return ASTTrailingTypeSpecDecltypeAuto()
        expr = self._parse_expression()
        self.skip_ws()
        if (not self.skip_string(')')):
            self.fail("Expected ')' after 'decltype(<expr>'.")
        return ASTTrailingTypeSpecDecltype(expr)
    prefix = None
    self.skip_ws()
    for k in self._prefix_keys:
        if self.skip_word_and_ws(k):
            prefix = k
            break
    nestedName = self._parse_nested_name()
    return ASTTrailingTypeSpecName(prefix, nestedName)