pub struct GlmProject { /* private fields */ }Expand description
Source project and expanded syntax, without electrical interpretation.
Syntax spans address the expansion; Self::original_spans locates the
corresponding original bytes, including substitutions and included files.
Implementations§
Source§impl GlmProject
impl GlmProject
pub fn index_objects(&self) -> Result<ObjectIndex<'_>, Error>
Source§impl GlmProject
impl GlmProject
pub const fn dialect(&self) -> GlmDialect
pub fn source(&self) -> &Source
pub fn statements(&self) -> &[Statement]
pub fn expanded_text(&self) -> &str
pub fn dependencies(&self) -> &[SourceId]
Sourcepub fn original_spans(&self, span: &SourceSpan) -> Vec<SourceSpan>
pub fn original_spans(&self, span: &SourceSpan) -> Vec<SourceSpan>
Translate a span from this project’s syntax into original source spans.
Source§impl GlmProject
impl GlmProject
Sourcepub fn quantity(
&self,
property: &GlmProperty<'_>,
kind: GlmQuantityKind,
native_unit: Option<&str>,
) -> Result<GlmQuantity, Error>
pub fn quantity( &self, property: &GlmProperty<'_>, kind: GlmQuantityKind, native_unit: Option<&str>, ) -> Result<GlmQuantity, Error>
Read a finite constant using the native property kind and unit. The
caller supplies the unit from the class schema, not from the input text.
None denotes a property without units, not an unknown unit.
Supports decimal/exponent numbers, rectangular i/j, polar d/r,
and the bounded static electrical/geometry unit profile. Expressions,
property references and custom unit definitions require further
interpretation and fail here. Arras additionally accepts quoted,
parenthesized complex literals. Source bytes and diagnostic spans remain.