Issue Details (XML | Word | Printable)

Key: GROOVY-1726
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jeremy Rayner
Reporter: Guillaume Laforge
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
groovy

Grammar cleanup

Created: 13/Feb/07 11:16 AM   Updated: 01/Jul/07 09:26 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1-beta-2

Time Tracking:
Not Specified


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Paul King added a comment - 30/Jun/07 10:26 PM
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 {...} )


Guillaume Laforge added a comment - 01/Jul/07 09:26 AM
Thank you Jeremy for this spring clean! Well done.