diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-04-26 13:46:42 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-04-26 15:37:21 +0200 |
| commit | 3680c854a21db665d64cdb8f31aa0f9a1af16ceb (patch) | |
| tree | 39dfa33059293251f1e2890f9b3d0e3dc178ed03 /src/eval | |
| parent | 59957746e91c1322a8ca6d228bcaa0f31941ee1b (diff) | |
Touch up docs
Diffstat (limited to 'src/eval')
| -rw-r--r-- | src/eval/library.rs | 12 | ||||
| -rw-r--r-- | src/eval/mod.rs | 8 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/eval/library.rs b/src/eval/library.rs index a92d8bd1..13825d7e 100644 --- a/src/eval/library.rs +++ b/src/eval/library.rs @@ -91,13 +91,13 @@ pub struct LangItems { pub math_attach: fn( base: Content, // Positioned smartly. - top: Option<Content>, - bottom: Option<Content>, + t: Option<Content>, + b: Option<Content>, // Fixed positions. - topleft: Option<Content>, - bottomleft: Option<Content>, - topright: Option<Content>, - bottomright: Option<Content>, + tl: Option<Content>, + bl: Option<Content>, + tr: Option<Content>, + br: Option<Content>, ) -> Content, /// A base with an accent: `arrow(x)`. pub math_accent: fn(base: Content, accent: char) -> Content, diff --git a/src/eval/mod.rs b/src/eval/mod.rs index e8e1af51..68163bf6 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -48,8 +48,9 @@ use unicode_segmentation::UnicodeSegmentation; use crate::diag::{ bail, error, At, SourceError, SourceResult, StrResult, Trace, Tracepoint, }; +use crate::model::ShowableSelector; use crate::model::{ - Content, Introspector, Label, Recipe, Selector, StabilityProvider, Styles, Transform, + Content, Introspector, Label, Recipe, StabilityProvider, Styles, Transform, Unlabellable, Vt, }; use crate::syntax::ast::AstNode; @@ -1428,8 +1429,9 @@ impl Eval for ast::ShowRule { fn eval(&self, vm: &mut Vm) -> SourceResult<Self::Output> { let selector = self .selector() - .map(|sel| sel.eval(vm)?.cast::<Selector>().at(sel.span())) - .transpose()?; + .map(|sel| sel.eval(vm)?.cast::<ShowableSelector>().at(sel.span())) + .transpose()? + .map(|selector| selector.0); let transform = self.transform(); let span = transform.span(); |
