Module cpp_demangle::ast

source ·
Expand description

Abstract syntax tree types for mangled symbols.

Structs

  • An ArgScopeStack represents the current function and template demangling scope we are within. As we enter new demangling scopes, we construct new ArgScopeStacks whose prev references point back to the old ones. These ArgScopeStacks are kept on the native stack, and as functions return, they go out of scope and we use the previous ArgScopeStacks again.
  • The <bare-function-type> production.
  • ::= [ . ] [ . ]*
  • The <clone-type-identifier> pseudo-terminal.
  • The <closure-type-name> production.
  • The <CV-qualifiers> production.
  • The <data-member-prefix> production.
  • The <discriminator> production.
  • The production.
  • The <function-type> production.
  • The <identifier> pseudo-terminal.
  • The <initializer> production.
  • The <lambda-sig> production.
  • In libiberty, Member and DerefMember expressions have special handling. They parse an UnqualifiedName (not an UnscopedName as the cxxabi docs say) and optionally a TemplateArgs if it is present. We can’t just parse a Name or an UnscopedTemplateName here because that allows other inputs that libiberty does not.
  • A handle to a component that is usually substitutable, and lives in the substitutions table, but in this particular case does not qualify for substitutions.
  • A non-virtual offset, as described by the production.
  • Common context needed when parsing.
  • The <pointer-to-member-type> production.
  • A built-in type with CV-qualifiers.
  • The <resource name> pseudo-terminal.
  • A production encoding a base-36 positive number.
  • The <simple-id> production.
  • The <source-name> non-terminal.
  • The subobject expression production.
  • The <tagged-name> non-terminal.
  • The <template-args> production.
  • The <template-param> production.
  • The <template-template-param> production.
  • The <unnamed-type-name> production.
  • The <unresolved-qualifier-level> production.
  • The <unscoped-template-name> production.
  • A virtual offset, as described by the production.

Enums