Historically, there were conflicts with parsing the grammar. Basically, examples like: foo / bar / getting mixed up with division: foo / bar and this one being tricky also: println /* I'd like a comment here */
I don't know if we can do any better in the new parser. In theory, with enough lookahead, you can sometimes work out such cases but there are often tricky edge cases that get in the way. Daniel might have more thoughts. Perhaps though permitting the dollar slashy string might be an improvement. It might have a much smaller impact. Cheers, Paul. On Fri, Oct 20, 2017 at 2:34 AM, Brian Stewart <[email protected]> wrote: > Hello, all, > > I do a fair amount of work in Groovy DSLs, and one thing I consistently > run into is trying to call a method with a slashy string as an argument, > without parentheses around the method call. Example: > > // this does not work: > println /foo/ > > // this does work, as expected: > println 'foo' > > Is there a historical reason slashy strings cannot be handled this way? I > am wondering if this is something that might be handled with the new parser. > > Thanks, > Brian >
