Guest User

Untitled

a guest
Jun 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Model:
  2. locations+=Coordinates*
  3. ;
  4. Coordinates:
  5. '(' x=INT ',' y=INT ')'
  6. ;
  7.  
  8. @Check
  9. def checkLocation(Model model) {
  10. val locationSet = newHashSet
  11. for (location : model.locations) {
  12. if (!locationSet.add(location)) {
  13. error('Locations must be unique.', location, LOCATION)
  14. }
  15. }
  16. }
Add Comment
Please, Sign In to add comment