qwertie / ecsharp

Home of LoycCore, the LES language of Loyc trees, the Enhanced C# parser, the LeMP macro preprocessor, and the LLLPG parser generator.
http://ecsharp.net
Other
176 stars 25 forks source link

EC#: New `?>` operator causes parser errors in code like `X<T?>` #140

Open qwertie opened 3 years ago

qwertie commented 3 years ago

It needs to be parsed as two tokens, not one. Example:

static ThreadLocalVariable<IFoo?> _default = new ThreadLocalVariable<IFoo?>(null); // ERRORS

Workaround:

static ThreadLocalVariable<IFoo? > _default = new ThreadLocalVariable<IFoo? >(null);

Note: this is a separate and more widespread issue than #133

dadhi commented 3 years ago

@qwertie Language complexity to blame :/