KeliLanguage / compiler

The compiler for Keli
https://keli-language.gitbook.io/doc/specification/
Apache License 2.0
171 stars 1 forks source link

As annotation for tag matcher #38

Open wongjiahau opened 5 years ago

wongjiahau commented 5 years ago

This is because we also want to harness the power of lambda setter.

But somehow this might caused some bug.

wongjiahau commented 5 years ago

Example:


Shape = tags.case(circle.radius(Float)) case(square.side(Float))

(this Shape).increaseSize =
    this.
    case(circle.as(c)):
        (c.radius(.+(10)))
    case(square.as(s)):
        (s.side(.+(20)))