diff --git a/parser.d b/parser.d index 07d347f..500d195 100644 --- a/parser.d +++ b/parser.d @@ -591,7 +591,7 @@ body } } - if (tokens[index] == TokenType.If) + if (index < tokens.length && tokens[index] == TokenType.If) f.constraint = parseConstraint(tokens, index); while (index < tokens.length &&