Add description of forwards-compatible behavior.

This commit is contained in:
Eric Huss 2023-06-05 11:55:16 -07:00
parent ceda03d3c7
commit d376e63384

View File

@ -25,6 +25,14 @@ There is no standardized demangled form of the symbols,
though suggestions are provided for how to demangle a symbol.
Implementers may choose to demangle in different ways.
## Extensions
This format may be extended in the future to add new tags as Rust is extended with new language items.
To be forward compatible, demanglers should gracefully handle symbols that have encodings where it encounters a tag character not described in this document.
For example, they may fall back to displaying the mangled symbol.
The format may be extended anywhere there is a tag character, such as the [type] rule.
The meaning of existing tags and encodings will not be changed.
## Grammar notation
The format of an encoded symbol is illustrated as a context free grammar in an extended BNF-like syntax.