Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!






Tangent: Syntax reworking

Posted by Telastyn, 20 July 2009 · 141 views

I'm looking to do a little reworking in the Tangent syntax, parser and compiler. Right now there's a little too many exceptional cases. The main candidates for removal are properties and indexers. They'll still exist, but will be done in the phrase style. No more special cases.

The first step is done. I took the degenerate case where a method has no parameters, and made that a simple getter:


public static pi => decimal { return( 3.141592 ); }


Setters will look a little odd, but similar to other phrase definitions:


public class SetExample{
private int _foo;
public Foo = (int value) => void{
_foo = value;
}
}


The behavior of each isn't really going to change, just consolidating the syntax and compiler a bit.




January 2015 »

S M T W T F S
    123
45678910
11121314151617
18192021222324
2526272829 30 31

Recent Entries

Recent Comments

Recent Entries

Recent Comments

PARTNERS