diff options
-rw-r--r-- | source/state/definition.d | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/state/definition.d b/source/state/definition.d index ab100d5..6f41275 100644 --- a/source/state/definition.d +++ b/source/state/definition.d @@ -70,11 +70,15 @@ bool handle(string word) { return false; } } else { - if ( word == ";" ) { - register(definition); - definition.nullify; - } else { - definition.insertBack(Token(word)); + switch ( word ) { + case "ยง" : + throw new Exception("definitions may not be nested"); + case ";" : + register(definition); + definition.nullify; + break; + default: + definition.insertBack(Token(word)); } return true; |