Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Model:
- locations+=Coordinates*
- ;
- Coordinates:
- '(' x=INT ',' y=INT ')'
- ;
- @Check
- def checkLocation(Model model) {
- val locationSet = newHashSet
- for (location : model.locations) {
- if (!locationSet.add(location)) {
- error('Locations must be unique.', location, LOCATION)
- }
- }
- }
Add Comment
Please, Sign In to add comment