HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.14k stars 656 forks source link

Issue 1379 - Allow EMeta without an expression and trailing EMeta - haxe #1379

Closed waneck closed 11 years ago

waneck commented 11 years ago

[Google Issue #1379 : https://code.google.com/p/haxe/issues/detail?id=1379] by back2dos@gmail.com, at 14/01/2013, 11:44:53 Could we allow these:

     {
    @foo;//EMeta({ name: 'foo' }, null);
    bar @foo;//EMeta({ name: 'foo' }, EConst(CIdent('bar')));
    }

When creating EDSLs with metadata, the former makes it easier to be consistent and the latter would allow to create a more fluid and readable syntax in some cases.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 14/01/2013, 11:53:32] @ meta is an defined as an annotation, which can be used before a field, type, or expression.

I think this would create too much alternative syntax, drifting too much from the Haxe core syntax.