From 5c11aa72239ecbdd9577f027bdc7e9468d68414e Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 4 Feb 2020 11:22:00 +0100 Subject: =?UTF-8?q?Adapt=20for=20tonty=20and=20fix=20a=20few=20bugs=20?= =?UTF-8?q?=F0=9F=9A=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/func/keys.rs | 2 +- src/syntax/func/values.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/syntax') diff --git a/src/syntax/func/keys.rs b/src/syntax/func/keys.rs index cb12ee1b..b8f142ee 100644 --- a/src/syntax/func/keys.rs +++ b/src/syntax/func/keys.rs @@ -105,7 +105,7 @@ key!(AxisKey, /// A key which is equivalent to a [`AxisKey`] but uses typical extent keywords /// instead of axis keywords, e.g. `width` instead of `horizontal`. #[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] -pub struct ExtentKey(AxisKey); +pub struct ExtentKey(pub AxisKey); key!(ExtentKey, "width" | "w" => ExtentKey(Specific(Horizontal)), diff --git a/src/syntax/func/values.rs b/src/syntax/func/values.rs index 18d451e3..d2b54a0b 100644 --- a/src/syntax/func/values.rs +++ b/src/syntax/func/values.rs @@ -87,7 +87,7 @@ value!(ScaleSize, "number or size", /// A value type that matches [`Expr::Ident`] and [`Expr::Str`] and implements /// `Into`. -pub struct StringLike(String); +pub struct StringLike(pub String); value!(StringLike, "identifier or string", Expr::Ident(Ident(s)) => StringLike(s), @@ -117,7 +117,7 @@ impl From for String { /// [func: size=default] => None /// [func: size=2cm] => Some(Size::cm(2.0)) /// ``` -pub struct Defaultable(Option); +pub struct Defaultable(pub Option); impl Value for Defaultable { fn parse(expr: Spanned) -> Result { -- cgit v1.2.3