summaryrefslogtreecommitdiff
path: root/src/model/cast.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-07 14:30:50 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-07 14:43:13 +0100
commit0a41844cc4e645e87fe48aa31ed3a4fd40a6ab11 (patch)
treec7cac97079491c8a11afae1211d7a80415fe64ef /src/model/cast.rs
parentefd1853d069fbd1476e82d015da4d0d04cfaccc0 (diff)
Selectors
Diffstat (limited to 'src/model/cast.rs')
-rw-r--r--src/model/cast.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/model/cast.rs b/src/model/cast.rs
index 7a466b72..d2e10a1f 100644
--- a/src/model/cast.rs
+++ b/src/model/cast.rs
@@ -1,7 +1,7 @@
use std::num::NonZeroUsize;
use std::str::FromStr;
-use super::{Content, Pattern, Regex, Transform, Value};
+use super::{Content, Regex, Selector, Transform, Value};
use crate::diag::{with_alternative, StrResult};
use crate::font::{FontStretch, FontStyle, FontWeight};
use crate::frame::{Destination, Lang, Location, Region};
@@ -181,10 +181,9 @@ dynamic! {
Regex: "regular expression",
}
-castable! {
- Pattern,
- Expected: "function, string or regular expression",
- Value::Func(func) => Self::Node(func.node()?),
+dynamic! {
+ Selector: "selector",
+ Value::Func(func) => Self::Node(func.node()?, None),
Value::Str(text) => Self::text(&text),
@regex: Regex => Self::Regex(regex.clone()),
}