mirror of
https://github.com/topjohnwu/cxx.git
synced 2024-10-07 09:03:30 +00:00
Document the arrangements of preprocessor variables
This commit is contained in:
parent
415f23255e
commit
6c39d4b9c8
@ -55,6 +55,23 @@
|
||||
// - org$rust$cxxbridge1$Struct$invoke$f$0
|
||||
// defining characteristics:
|
||||
// - last symbol is `0` (C half) or `1` (Rust half) which are not legal identifiers on their own
|
||||
//
|
||||
//
|
||||
// Mangled preprocessor variable arrangements:
|
||||
//
|
||||
// (A) One-off internal variable.
|
||||
// pattern: {CXXBRIDGE} _ {NAME}
|
||||
// examples:
|
||||
// - CXXBRIDGE1_PANIC
|
||||
// - CXXBRIDGE1_RUST_STRING
|
||||
// defining characteristics:
|
||||
// - NAME does not begin with STRUCT or ENUM
|
||||
//
|
||||
// (B) Guard around user-defined type.
|
||||
// pattern: {CXXBRIDGE} _ {STRUCT or ENUM} _ {NAMESPACE...} $ {TYPE}
|
||||
// examples:
|
||||
// - CXXBRIDGE1_STRUCT_org$rust$Struct
|
||||
// - CXXBRIDGE1_ENUM_Enabled
|
||||
|
||||
use crate::syntax::symbol::{self, Symbol};
|
||||
use crate::syntax::{ExternFn, Pair, Types};
|
||||
|
Loading…
Reference in New Issue
Block a user