Jump to content
  • Advertisement
  • entries
  • comments
  • views

Tangent: Syntax reworking

Sign in to follow this  


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.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!