| trait Trait { |
| def foo() { print "I'm a trait" } |
| } |
| ----- |
| Groovy script |
| Trait definition |
| Modifiers |
| <empty list> |
| PsiElement(trait)('trait') |
| PsiWhiteSpace(' ') |
| PsiElement(identifier)('Trait') |
| Extends clause |
| <empty list> |
| Implements clause |
| <empty list> |
| PsiWhiteSpace(' ') |
| Type definition body |
| PsiElement({)('{') |
| PsiWhiteSpace('\n ') |
| Method |
| Modifiers |
| PsiElement(def)('def') |
| PsiWhiteSpace(' ') |
| PsiElement(identifier)('foo') |
| PsiElement(()('(') |
| Parameter list |
| <empty list> |
| PsiElement())(')') |
| Throw clause |
| <empty list> |
| PsiWhiteSpace(' ') |
| Open block |
| PsiElement({)('{') |
| PsiWhiteSpace(' ') |
| Call expression |
| Reference expression |
| PsiElement(identifier)('print') |
| PsiWhiteSpace(' ') |
| Command arguments |
| Literal |
| PsiElement(Gstring)('"I'm a trait"') |
| PsiWhiteSpace(' ') |
| PsiElement(})('}') |
| PsiElement(new line)('\n') |
| PsiElement(})('}') |