Skip to content

Commit

Permalink
move these up because they should be highest up
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertasJ committed Nov 30, 2024
1 parent f1a24ec commit d2ec180
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions crates/state/src/values/size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ pub fn parse_calc(mut value: &str) -> Result<Vec<DynamicCalculation>, ParseError
many1(preceded(
multispace0,
alt((
map(tag("min"), |_| {
DynamicCalculation::Function(LexFunction::Min)
}),
map(tag("max"), |_| {
DynamicCalculation::Function(LexFunction::Max)
}),
map(tag("clamp"), |_| {
DynamicCalculation::Function(LexFunction::Clamp)
}),
map(tag("+"), |_| DynamicCalculation::Add),
map(tag("-"), |_| DynamicCalculation::Sub),
map(tag("*"), |_| DynamicCalculation::Mul),
Expand Down Expand Up @@ -118,15 +127,6 @@ pub fn parse_calc(mut value: &str) -> Result<Vec<DynamicCalculation>, ParseError
},
),
map(float, DynamicCalculation::Pixels),
map(tag("min"), |_| {
DynamicCalculation::Function(LexFunction::Min)
}),
map(tag("max"), |_| {
DynamicCalculation::Function(LexFunction::Max)
}),
map(tag("clamp"), |_| {
DynamicCalculation::Function(LexFunction::Clamp)
}),
)),
))(value)
}
Expand Down

0 comments on commit d2ec180

Please sign in to comment.