pub struct ParseContextData { /* private fields */ }
Expand description
Parsing context data
Implementations§
Source§impl ParseContextData
impl ParseContextData
Sourcepub fn new() -> ParseContextData
pub fn new() -> ParseContextData
Create a new ParseContextData object
Sourcepub fn with_policy(policy: impl TypeTablePolicy + 'static) -> ParseContextData
pub fn with_policy(policy: impl TypeTablePolicy + 'static) -> ParseContextData
Create a new ParseContextData object with the given type table policy
§Parameters
policy
: policy object managing the type table
Sourcepub fn with_comments() -> ParseContextData
pub fn with_comments() -> ParseContextData
Create a new ParseContextData object with comments parsing enabled
Sourcepub fn with_comments_and_policy(
policy: impl TypeTablePolicy + 'static,
) -> ParseContextData
pub fn with_comments_and_policy( policy: impl TypeTablePolicy + 'static, ) -> ParseContextData
Create a new ParseContextData object with comments parsing enabled and the given type table policy
§Parameters
policy
: policy object managing the type table
Source§impl ParseContextData
impl ParseContextData
Sourcepub fn is_type_name(&self, name: &str) -> bool
pub fn is_type_name(&self, name: &str) -> bool
Return true
if the given name is a type name
Sourcepub fn add_type_name(
&mut self,
name: Node<IdentifierData>,
) -> Node<TypeNameData>
pub fn add_type_name( &mut self, name: Node<IdentifierData>, ) -> Node<TypeNameData>
Register name
as a new type name
Sourcepub fn push_scope(&mut self)
pub fn push_scope(&mut self)
Enter a new nesting level for declarations
Sourcepub fn new_identifier(
&mut self,
name: &Node<IdentifierData>,
ctx: IdentifierContext,
)
pub fn new_identifier( &mut self, name: &Node<IdentifierData>, ctx: IdentifierContext, )
Update the context data with a new identifier in a given context
Source§impl ParseContextData
impl ParseContextData
Sourcepub fn add_comment(&mut self, comment: Node<CommentData>)
pub fn add_comment(&mut self, comment: Node<CommentData>)
Add a new comment to the parsed comments list
Trait Implementations§
Source§impl Clone for ParseContextData
impl Clone for ParseContextData
Source§fn clone(&self) -> ParseContextData
fn clone(&self) -> ParseContextData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ParseContextData
impl Debug for ParseContextData
Source§impl Default for ParseContextData
impl Default for ParseContextData
Source§fn default() -> ParseContextData
fn default() -> ParseContextData
Returns the “default value” for a type. Read more
Source§impl From<ParseContextData> for ParseContext
impl From<ParseContextData> for ParseContext
Source§fn from(data: ParseContextData) -> ParseContext
fn from(data: ParseContextData) -> ParseContext
Converts to this type from the input type.
Source§impl PartialEq for ParseContextData
impl PartialEq for ParseContextData
Auto Trait Implementations§
impl Freeze for ParseContextData
impl !RefUnwindSafe for ParseContextData
impl !Send for ParseContextData
impl !Sync for ParseContextData
impl Unpin for ParseContextData
impl !UnwindSafe for ParseContextData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more