Last active
December 21, 2015 17:58
-
-
Save vorburger/6343639 to your computer and use it in GitHub Desktop.
Syntactically invalid EFactory example which causes the OutOfMemoryError at org.eclipse.xtext.ui.editor.syntaxcoloring reported on the Xtext Forum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
family.City { | |
families += family.Family Flintstones { | |
members = [ | |
family.Person Fred { | |
age = 45 | |
} | |
] | |
members += family.Person Fred { | |
age = 45 | |
} | |
members += family.Person Wilma { | |
gender = :female | |
} | |
pet = Dino | |
} | |
animals += family.Dinosaur Dino { | |
height = 1374 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package family | |
import java.lang.String | |
class Person { | |
String name | |
Gender gender | |
Integer age | |
refers Person[] friends | |
refers Person bestFriend | |
} | |
class Family { | |
String name | |
String address | |
contains Person[] members | |
refers Animal pet | |
} | |
abstract class Animal { | |
} | |
class Dinosaur extends Animal { | |
String name | |
int height | |
} | |
enum Gender { | |
female, male | |
} | |
class City { | |
contains Family[] families | |
contains Animal[] animals | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment