Enum glsl::syntax::Preprocessor [−][src]
pub enum Preprocessor { Version(PreprocessorVersion), Extension(PreprocessorExtension), }
Some basic preprocessor commands.
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 commands are available for inspection.
Important note: others preprocessor commands can be used in your source. However, they’ll get substituted upfront. For instance, if you use have
#define foo 42
defined in your file, every occurrence tofoo
will get replaced by42
and then treated as a normal GLSL expression (in that case, ending as anExpr::IntConst(42)
value). This might be unfortunate for people seeking minimal size. However, you’re free to use a minifier aftewards to re-enable _that kind of feature. To be honest, it’s not worth it to interleave the AST with preprocessor command annotations just so that the resulting code size is minimal. Just use a minifier.
Variants
Version(PreprocessorVersion)
Extension(PreprocessorExtension)
Trait Implementations
impl Clone for Preprocessor
[src]
impl Clone for Preprocessor
fn clone(&self) -> Preprocessor
[src]
fn clone(&self) -> Preprocessor
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Preprocessor
[src]
impl Debug for Preprocessor
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Preprocessor
[src]
impl PartialEq for Preprocessor
fn eq(&self, other: &Preprocessor) -> bool
[src]
fn eq(&self, other: &Preprocessor) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Preprocessor) -> bool
[src]
fn ne(&self, other: &Preprocessor) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for Preprocessor
impl Send for Preprocessor
impl Sync for Preprocessor
impl Sync for Preprocessor