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 newArgScopeStack
s whoseprev
references point back to the old ones. TheseArgScopeStack
s are kept on the native stack, and as functions return, they go out of scope and we use the previousArgScopeStack
s 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 anUnscopedName
as the cxxabi docs say) and optionally aTemplateArgs
if it is present. We can’t just parse aName
or anUnscopedTemplateName
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
<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
- The
<array-type>
production. - The
<base-unresolved-name>
production. - The
<builtin-type>
production. - The
<call-offset>
production. - The
<class-enum-type>
production. - The
<ctor-dtor-name>
production. - The
<decltype>
production. - The
<destructor-name>
production. - The
<encoding>
production. - The
<expr-primary>
production. - The
<expression>
production. - A global constructor or destructor.
- The
<local-name>
production. - The root AST node, and starting production.
- The
<name>
production. - The
<nested-name>
production. - The
<operator-name>
production. - The
<prefix>
production. - A reference to a parsed
<prefix>
production. - A
production. - The
<simple-operator-name>
production. - The
<special-name>
production. - A one of the standard variants of the
production. - The
<substitution>
form: a back-reference to some component we’ve already parsed. - A
production. - A reference to a parsed
TemplateTemplateParam
. - The
<type>
production. - A reference to a parsed
Type
production. - The
<unqualified-name>
production. - The
<unresolved-name>
production. - The
<unresolved-type>
production. - A reference to a parsed
<unresolved-type>
production. - The
<unscoped-name>
production. - A handle to an
UnscopedTemplateName
. - The
<vector-type>
production. - The
<substitution>
variants that are encoded directly in the grammar, rather than as back references to other components in the substitution table.