[fine] Parse is expression, partially

This commit is contained in:
John Doty 2024-02-02 06:32:03 -08:00
parent afa4812074
commit ba5b37f5ff
4 changed files with 98 additions and 23 deletions

View file

@ -33,7 +33,7 @@ class Monster {
fun print(x:string) {}
fun in_range(weapon: MeleeWeapon or RangedWeapon, distance: f64) {
weapon match {
match weapon {
w:RangedWeapon -> distance >= w.minRange and distance <= w.maxRange,
_ -> distance == 1
}