mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
dsl: compact
This commit is contained in:
parent
5e09f5a4bb
commit
ab07fd2b43
8 changed files with 363 additions and 384 deletions
|
|
@ -43,7 +43,11 @@ macro_rules! transform_xy {
|
|||
if k == $x || k == $y || k == $xy {
|
||||
let _ = iter.next().unwrap();
|
||||
let token = iter.next().expect("no content specified");
|
||||
let content = get_content!(state => token);
|
||||
let content = if let Some(content) = state.get_content(&token.value) {
|
||||
content
|
||||
} else {
|
||||
panic!("no content corresponding to {:?}", &token.value);
|
||||
};
|
||||
return Some(match k {
|
||||
$x => Self::x(content),
|
||||
$y => Self::y(content),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue