Struct glsl_lang::parse::ParseContext[][src]

pub struct ParseContext {
    pub opts: ParseOptions,
    pub data: Rc<RefCell<ParseContextData>>,
}

Parsing context

Fields

opts: ParseOptions

Parsing options

data: Rc<RefCell<ParseContextData>>

Parsing data

Implementations

impl ParseContext[src]

pub fn clone_inner(&self) -> Self[src]

Clone the parsing data and return the cloned context

pub fn into_data(self) -> Option<ParseContextData>[src]

Consume this ParseContext and return its data. Will fail if there are multiple references to this context’s data.

pub fn data(&self) -> Ref<'_, ParseContextData>[src]

Obtain a reference to the context’s data

pub fn data_mut(&self) -> RefMut<'_, ParseContextData>[src]

Obtain an exclusive reference to the context’s data

impl ParseContext[src]

pub fn is_type_name(&self, name: &str) -> bool[src]

Return true if the given name is a type name

pub fn add_type_name(&self, name: Identifier) -> TypeName[src]

Register name as a new type name

pub fn new_identifier(&self, name: &Identifier, ctx: IdentifierContext)[src]

Update the context data with a new identifier in a given context

impl ParseContext[src]

pub fn has_comments(&self) -> bool[src]

Return true if this parsing context supports comments

pub fn add_comment(&self, comment: Comment)[src]

Add a new comment to the parsed comments list

Trait Implementations

impl Clone for ParseContext[src]

impl Debug for ParseContext[src]

impl Default for ParseContext[src]

impl From<ParseOptions> for ParseContext[src]

impl PartialEq<ParseContext> for ParseContext[src]

impl StructuralPartialEq for ParseContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoResult<T> for T[src]

type Err = Infallible

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.