plaidgroup / plaid-lang

The Plaid Programming Language Tools
11 stars 1 forks source link

Minor parsing issue involving lambda expressions #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

method main() {
    val f = fn () => 1;
    java.lang.System.out.println(f());
}

What is the expected output? What do you see instead?

The parser rejects this which is wrong according to the spec because 
arguments should be optional. Inserting an artificial argument will make it 
work: "val g = fn (x) => 1;" is parsed without problems.

Original issue reported on code.google.com by manuelmohr@gmail.com on 4 Jun 2010 at 6:20

GoogleCodeExporter commented 9 years ago
Okay, my fault. That was some weird issue involving JavaCC issue where it 
wouldn't 
regenerate the parser. "fn () => EXPR" is working fine.

Original comment by manuelmohr@gmail.com on 4 Jun 2010 at 6:47