Details
-
Type:
Task
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.1-beta-2
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
As of Groovy DevCon #3, it has been decided that some Antlr grammar clean-up were in order.
Jeremy can expand on the details of the clean-up to be made.
Adding as comment, to make it easier to find when we go looking for it:
Grammar cleanup - from groovydevcon3
REMOVED
o break with value from loops
for (i in 1..100) { break 2 }
o continue with value from loops
for (i in 1..100) { continue 2 }
o break/continue label no longer need a colon afterwards
(because previous two items now removed)
for (i in 1..100) { break label1: }
-
Becomes-for (i in 1..100) { break label1 }
o "with" keyword removed
with(foo) { bar() }
o Scope Escape($) removed
println([$x, x, y])
o "any" keyword removed
any bar = "";
o Spread argument directly in GStrings removed
def bar = [1,2,3]
def g = "foo$*bar"
FIXED
o Qualified Exception Types now work
def foo() throws bar.MookyException{}
ADDED
o with() added to Object
[1,2,3].with { it << 4 println it }
(this is what I would have called Object.identity()
all along if "with" wasn't a keyword,
o.identity {...} now synonym for o.with {...} )
Becomes- for (i in 1..100) { break label1 } o "with" keyword removed with(foo) { bar() } o Scope Escape($) removed println([$x, x, y]) o "any" keyword removed any bar = ""; o Spread argument directly in GStrings removed def bar = [1,2,3] def g = "foo$*bar" FIXED o Qualified Exception Types now work def foo() throws bar.MookyException{} ADDED o with() added to Object [1,2,3].with { it << 4 println it } (this is what I would have called Object.identity() all along if "with" wasn't a keyword, o.identity {...} now synonym for o.with {...} )