Struct glsl_lang::parse::ParseContextData[][src]

pub struct ParseContextData {
    pub names: HashSet<String>,
    pub comments: Option<CommentList>,
    // some fields omitted
}

Parsing context data

Fields

names: HashSet<String>

List of known type names

comments: Option<CommentList>

List of parsed comments (or None to disable comment parsing)

Implementations

impl ParseContextData[src]

pub fn new() -> Self[src]

Create a new ParseContextData object

pub fn with_policy(policy: impl TypeTablePolicy + 'static) -> Self[src]

Create a new ParseContextData object with the given type table policy

Parameters

  • policy: policy object managing the type table

pub fn with_comments() -> Self[src]

Create a new ParseContextData object with comments parsing enabled

pub fn with_comments_and_policy(policy: impl TypeTablePolicy + 'static) -> Self[src]

Create a new ParseContextData object with comments parsing enabled and the given type table policy

Parameters

  • policy: policy object managing the type table

impl ParseContextData[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(&mut self, name: Identifier) -> TypeName[src]

Register name as a new type name

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

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

impl ParseContextData[src]

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

Add a new comment to the parsed comments list

Trait Implementations

impl Clone for ParseContextData[src]

impl Debug for ParseContextData[src]

impl Default for ParseContextData[src]

impl PartialEq<ParseContextData> for ParseContextData[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.