pub struct SymbolTable { /* private fields */ }Expand description
The symbol and macro tables, re-exported so a caller can seed a
parse with names a header would have introduced. The canonical
plugin exports the same pair from ts/src/symbols.ts, and the Go
port exports them as SymbolTable and MacroTable.
The symbol and macro tables, re-exported so a caller can seed a
parse with names a header would have introduced. The canonical
plugin exports the same pair from ts/src/symbols.ts, and the Go
port exports them as SymbolTable and MacroTable.
The symbol and macro tables, re-exported so a caller can seed a
parse with names a header would have introduced. The canonical
plugin exports the same pair from ts/src/symbols.ts, and the Go
port exports them as SymbolTable and MacroTable.
The classic identifier / typedef-name disambiguation table.
Implementations§
Source§impl SymbolTable
impl SymbolTable
pub fn new() -> Self
pub fn enter(&mut self, kind: ScopeKind)
pub fn exit(&mut self)
pub fn depth(&self) -> usize
Sourcepub fn is_typedef(&self, name: &str) -> bool
pub fn is_typedef(&self, name: &str) -> bool
True when name resolves to a typedef-name in any visible
scope, with the innermost binding winning.
Sourcepub fn is_bound(&self, name: &str) -> bool
pub fn is_bound(&self, name: &str) -> bool
True when name is bound at all, as a typedef or otherwise.
pub fn bind_typedef(&mut self, name: &str)
pub fn bind_ordinary(&mut self, name: &str)
pub fn bind_tag(&mut self, name: &str, kind: TagKind)
Sourcepub fn typedef_names(&self) -> Vec<String>
pub fn typedef_names(&self) -> Vec<String>
Every name bound as a typedef in any visible scope, innermost
binding winning, in no particular order. This is what a
crate::CMeta carries into a parse.