cheddar-lang / Cheddar

🧀 Cheddar, the language that works for you
cheddar.vihan.org
Apache License 2.0
28 stars 9 forks source link

User-defined Classes #89

Closed vihanb closed 8 years ago

vihanb commented 8 years ago

This brings classes which with it brings access permissions, op overloading, etc. Casting overloading is not yet supported. Class syntax is not documented thoroughly and secondary constructors are not supported at the moment:

class name(private type: name, public type: name) {
    init {
         print "Hi, I'm always run when you initalize this class"
    }

    func myLambda -> self.foo;
    func otherLambda (a, b) -> a + b;
    func bigFunc(a, b) {
        return a + b
    }

    binary op + (a, b) {
        return a + b;
    }
}
vihanb commented 8 years ago

Probably won't be merged anytime soon since I have to get tests done.

vihanb commented 8 years ago

Though this branch's merging will mark the final release of cheddar v1.0.0!

codecov-io commented 8 years ago

Current coverage is 80.65% (diff: 77.70%)

Merging #89 into develop will increase coverage by 1.91%

@@            develop        #89   diff @@
==========================================
  Files           158        158          
  Lines          2682       2828   +146   
  Methods         422        428     +6   
  Messages          0          0          
  Branches        627        666    +39   
==========================================
+ Hits           2112       2281   +169   
+ Misses          566        543    -23   
  Partials          4          4          

Powered by Codecov. Last update 58aec58...198d371

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-4.2%) to 77.024% when pulling f1842987034285142efbdfda398a179b9af5bac6 on feature-class into 58aec5829d56904bc64ab0e6375ece9922343ecc on develop.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+1.6%) to 82.801% when pulling 198d371dc34ec8f99f956f3a535cc1e2f8353b7a on feature-class into 58aec5829d56904bc64ab0e6375ece9922343ecc on develop.

schas002 commented 8 years ago

@coveralls :D \o/ thanks 😀

schas002 commented 8 years ago

The Class feature is merged. Now gimme the v1.0 😜

vihanb commented 8 years ago

@schas002 Will prepare right now :D just gotta merge in the feature-op branch and we're good \o/