enhanced the reader and compiler to treat the binop expression like a message-send expression
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -1,3 +1,15 @@
|
||||
fun Number: + (oprnd) { return (+ self oprnd) }
|
||||
fun Number: - (oprnd) { return (- self oprnd) }
|
||||
fun Number: * (oprnd) { return (* self oprnd) }
|
||||
fun Number: / (oprnd) { return (/ self oprnd) }
|
||||
fun Number: > (oprnd) { return (> self oprnd) }
|
||||
fun Number: < (oprnd) { return (< self oprnd) }
|
||||
fun Number: >= (oprnd) { return (>= self oprnd) }
|
||||
fun Number: <= (oprnd) { return (<= self oprnd) }
|
||||
fun Number: == (oprnd) { return (== self oprnd) }
|
||||
fun Number: ~= (oprnd) { return (~= self oprnd) }
|
||||
|
||||
## --------------------------------------------------------------
|
||||
set t (
|
||||
class [ x ] {
|
||||
defun :* make() { x := 1234; return self; };
|
||||
@ -159,3 +171,7 @@ else { printf "OK: value is %d\n" v }
|
||||
v := (X6:t)
|
||||
if (nqv? v 40) { printf "ERROR: v is not 40 - %d\n" v } \
|
||||
else { printf "OK: value is %d\n" v }
|
||||
|
||||
v := { X5:t; (X6:t) + 10 }
|
||||
if (nqv? v 50) { printf "ERROR: v is not 50 - %d\n" v } \
|
||||
else { printf "OK: value is %d\n" v }
|
||||
|
Reference in New Issue
Block a user