summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-02-04 11:22:00 +0100
committerLaurenz <laurmaedje@gmail.com>2020-02-04 11:22:00 +0100
commit5c11aa72239ecbdd9577f027bdc7e9468d68414e (patch)
tree66d846fb58f38e564eca385a6f86ee8154c503ce /src/syntax
parentf655656fb8cb6135b26e7960ce0b7adf96d6f567 (diff)
Adapt for tonty and fix a few bugs 🚧
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/func/keys.rs2
-rw-r--r--src/syntax/func/values.rs4
2 files changed, 3 insertions, 3 deletions
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<String>`.
-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<StringLike> for String {
/// [func: size=default] => None
/// [func: size=2cm] => Some(Size::cm(2.0))
/// ```
-pub struct Defaultable<V>(Option<V>);
+pub struct Defaultable<V>(pub Option<V>);
impl<V: Value> Value for Defaultable<V> {
fn parse(expr: Spanned<Expr>) -> Result<Self, Error> {