sergiotaborda / lense-lang

The Lense Language Compiler
1 stars 0 forks source link

Support Intervals as first class citizens #31

Closed sergiotaborda closed 7 years ago

sergiotaborda commented 8 years ago

Support the Interval immutable class Support open ends Support literals . Syntax can be

1 ... 3 means [1, 3] 1 ..< 3 means [1, 3[ 1<..< 3 means ]1, 3[ 1<.. 3 means ]1, 3] 1 ... * means [ 1 , +oo [

wrong order elements like 4 .. 1 will generate empty intervals

sergiotaborda commented 7 years ago

notation changed to |[ 2 , 5 |[

sergiotaborda commented 5 years ago

Final notation is |( a , b )| for open ends and |[ a , b ]| for closed ends. They can be mixed , like |[2 , 3)| or |( 2, 4 ]|