Enum glsl_lang_types::ast::PreprocessorData
source · pub enum PreprocessorData {
Show 14 variants
Define(PreprocessorDefine),
Else,
ElseIf(PreprocessorElseIf),
EndIf,
Error(PreprocessorError),
If(PreprocessorIf),
IfDef(PreprocessorIfDef),
IfNDef(PreprocessorIfNDef),
Include(PreprocessorInclude),
Line(PreprocessorLine),
Pragma(PreprocessorPragma),
Undef(PreprocessorUndef),
Version(PreprocessorVersion),
Extension(PreprocessorExtension),
}Expand description
Some basic preprocessor directives.
As it’s important to carry them around the AST because they cannot be substituted in a normal preprocessor (they’re used by GPU’s compilers), those preprocessor directives are available for inspection.
Variants§
Define(PreprocessorDefine)
#define preprocessor directive
Else
#else preprocessor directive
ElseIf(PreprocessorElseIf)
#elseif preprocessor directive
EndIf
#endif preprocessor directive
Error(PreprocessorError)
#error preprocessor directive
If(PreprocessorIf)
#if preprocessor directive
IfDef(PreprocessorIfDef)
#ifdef preprocessor directive
IfNDef(PreprocessorIfNDef)
#ifndef preprocessor directive
Include(PreprocessorInclude)
#include preprocessor directive
Line(PreprocessorLine)
#line preprocessor directive
Pragma(PreprocessorPragma)
#pragma preprocessor directive
Undef(PreprocessorUndef)
#undef preprocessor directive
Version(PreprocessorVersion)
#version preprocessor directive
Extension(PreprocessorExtension)
#extension preprocessor directive
Trait Implementations§
source§impl Clone for PreprocessorData
impl Clone for PreprocessorData
source§fn clone(&self) -> PreprocessorData
fn clone(&self) -> PreprocessorData
Returns a copy 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 PreprocessorData
impl Debug for PreprocessorData
source§impl From<Node<PreprocessorData>> for PreprocessorData
impl From<Node<PreprocessorData>> for PreprocessorData
source§fn from(node: Node<PreprocessorData>) -> Self
fn from(node: Node<PreprocessorData>) -> Self
Converts to this type from the input type.
source§impl NodeContent for PreprocessorData
impl NodeContent for PreprocessorData
source§fn into_node<T>(self) -> Node<T>where
T: From<Self> + NodeContent,
fn into_node<T>(self) -> Node<T>where T: From<Self> + NodeContent,
Convert the contents into a node
source§fn spanned(self, start: LexerPosition, end: LexerPosition) -> Node<Self>
fn spanned(self, start: LexerPosition, end: LexerPosition) -> Node<Self>
Add span information to a syntax node
source§impl PartialEq for PreprocessorData
impl PartialEq for PreprocessorData
source§fn eq(&self, other: &PreprocessorData) -> bool
fn eq(&self, other: &PreprocessorData) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for PreprocessorData
impl StructuralEq for PreprocessorData
impl StructuralPartialEq for PreprocessorData
Auto Trait Implementations§
impl RefUnwindSafe for PreprocessorData
impl Send for PreprocessorData
impl Sync for PreprocessorData
impl Unpin for PreprocessorData
impl UnwindSafe for PreprocessorData
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