aboutsummaryrefslogtreecommitdiff
path: root/neb/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'neb/parser.py')
-rw-r--r--neb/parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/neb/parser.py b/neb/parser.py
index 9a73ef7..d5712d2 100644
--- a/neb/parser.py
+++ b/neb/parser.py
@@ -45,7 +45,7 @@ def parseLiteral(token, prev, tokens):
def parseType(token, prev, tokens):
# if the next token is a symbol, combine for a type
- if tokens[0].type_ == TokenType.SYMBOL:
+ if len(tokens) > 0 and tokens[0].type_ == TokenType.SYMBOL:
return Type(f":{tokens[0].text}"), 2
elif tokens[0].type_ == TokenType.OPEN_BRACKET:
# only format currently supported: