Skip to content

ludus::tooling::shader_language::PreprocessResult

Ludus Wiki · API overview · Browse API

Struct

Output of Preprocess.
On Ready, Tokens is the complete translation unit after includes, conditionals and macro expansion, with comments removed. On any other outcome Tokens, SynthesizedText and Expansions are empty, while the diagnostics and read masks describe what was found.

Declared in modules/tooling/shader_language/include/ludus/tooling/shader_language/preprocessor.hpp

#include <ludus/tooling/shader_language/preprocessor.hpp>
struct ludus::tooling::shader_language::PreprocessResult final

Fields

Outcome

Status ludus::tooling::shader_language::PreprocessResult::Outcome = Status::InvalidRequest
Final outcome.

Related types: Status

Declared in modules/tooling/shader_language/include/ludus/tooling/shader_language/preprocessor.hpp

Tokens

foundation::Array<Token> ludus::tooling::shader_language::PreprocessResult::Tokens
Preprocessed tokens in order.

Related types: foundation::Array · Token

Declared in modules/tooling/shader_language/include/ludus/tooling/shader_language/preprocessor.hpp

SynthesizedText

foundation::Array<char> ludus::tooling::shader_language::PreprocessResult::SynthesizedText
Storage for spellings of tokens with Token::IsSynthesized.

Related types: foundation::Array

Declared in modules/tooling/shader_language/include/ludus/tooling/shader_language/preprocessor.hpp

Expansions

foundation::Array<SourceLocation> ludus::tooling::shader_language::PreprocessResult::Expansions
Location of each outermost macro use, indexed by Token::ExpansionIndex.

Related types: foundation::Array · SourceLocation

Declared in modules/tooling/shader_language/include/ludus/tooling/shader_language/preprocessor.hpp

SourceReadMask

foundation::Array<foundation::uint8> ludus::tooling::shader_language::PreprocessResult::SourceReadMask
One 0/1 byte per request file, set when the preprocessor read that file. Build identity records these files as dependencies.

Related types: foundation::Array · foundation::uint8

Declared in modules/tooling/shader_language/include/ludus/tooling/shader_language/preprocessor.hpp

ConfigurationReadMask

foundation::Array<foundation::uint8> ludus::tooling::shader_language::PreprocessResult::ConfigurationReadMask
One 0/1 byte per configuration value, set when the source expanded or tested it. Build identity records these values.

Related types: foundation::Array · foundation::uint8

Declared in modules/tooling/shader_language/include/ludus/tooling/shader_language/preprocessor.hpp

Diagnostics

foundation::Array<Diagnostic> ludus::tooling::shader_language::PreprocessResult::Diagnostics
Reported problems in the order found; at most MAX_DIAGNOSTICS.

Related types: foundation::Array · Diagnostic

Declared in modules/tooling/shader_language/include/ludus/tooling/shader_language/preprocessor.hpp

DroppedDiagnosticCount

foundation::usize ludus::tooling::shader_language::PreprocessResult::DroppedDiagnosticCount = 0
Number of diagnostics found after Diagnostics reached MAX_DIAGNOSTICS.

Related types: foundation::usize

Declared in modules/tooling/shader_language/include/ludus/tooling/shader_language/preprocessor.hpp