Skip to content

ludus::tooling::shader_language::SourceLocation

Ludus Wiki · API overview · Browse API

Struct

A position in a snapshot file or configuration value.
For a file, FileIndex indexes the request's files and ByteOffset counts bytes from the start of that file. For CONFIGURATION_SOURCE, Line is the one-based index of the configuration value and ByteOffset counts bytes inside its value text.

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

#include <ludus/tooling/shader_language/diagnostic.hpp>
struct ludus::tooling::shader_language::SourceLocation final

Fields

FileIndex

foundation::uint16 ludus::tooling::shader_language::SourceLocation::FileIndex = NO_SOURCE
Index of the file in the request, CONFIGURATION_SOURCE or NO_SOURCE.

Related types: foundation::uint16

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

ByteOffset

foundation::uint32 ludus::tooling::shader_language::SourceLocation::ByteOffset = 0
Zero-based byte offset of the position.

Related types: foundation::uint32

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

Line

foundation::uint32 ludus::tooling::shader_language::SourceLocation::Line = 0
One-based line number.

Related types: foundation::uint32

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

Column

foundation::uint32 ludus::tooling::shader_language::SourceLocation::Column = 0
One-based column, counted in bytes.

Related types: foundation::uint32

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

Methods

IsValid

constexpr bool ludus::tooling::shader_language::SourceLocation::IsValid() const noexcept
True when the location names a file or configuration value.

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