Skip to content

Commit

Permalink
stupid negative steps
Browse files Browse the repository at this point in the history
  • Loading branch information
spookydonut committed Jan 21, 2020
1 parent af636b0 commit cb4a76a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/dreammaker/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,13 +594,11 @@ impl Term {
}
if let Some(stepexp) = step {
if let Some(stepterm) = stepexp.as_term() {
if let Term::Int(s) = stepterm {
if *s < 0 {
return Some(*i >= *o)
} else if *s == 0 {
return Some(false)
}
if let Term::Int(_s) = stepterm {
return Some(true)
}
} else {
return Some(true)
}
}
return Some(*i <= *o)
Expand Down

0 comments on commit cb4a76a

Please sign in to comment.