'discard' can be used instead of 'nil' for empty case object branches

This commit is contained in:
Araq 2015-01-12 01:41:53 +01:00
commit c87f1eb581
3 changed files with 24 additions and 4 deletions

View file

@ -167,7 +167,7 @@ objectCase = 'case' identWithPragma ':' typeDesc ':'? COMMENT?
(IND{>} objectBranches DED
| IND{=} objectBranches)
objectPart = IND{>} objectPart^+IND{=} DED
/ objectWhen / objectCase / 'nil' / declColonEquals
/ objectWhen / objectCase / 'nil' / 'discard' / declColonEquals
object = 'object' pragma? ('of' typeDesc)? COMMENT? objectPart
typeClassParam = ('var')? symbol
typeClass = typeClassParam ^* ',' (pragma)? ('of' typeDesc ^* ',')?