use encoding "utf-8"
# below should be parsed as utf-8 encoding
-- comment can start with "--" instead of "#" (really?)
# example of DBC
class value extends number has
function this(value: integer = 0, min: integer = 0, max: integer = 42) do
@min, @max, @value = min, max, value
end
function operator <=> (lhs: number): integer do
@value <=> lhs
end
function invariant do
@min <= @value <= @max
end
function operator += (lhs: value)
require assert @value != 13 and lhs != 13
ensure assert @value != 13
do
@value += integer.from(lhs)
this
end
function operator + (lhs) do
value = .clone
value += lhs
return value
end
end
# and so on...