Skip to content
Permalink
Browse files
Improve target for unexpected end curly braces.
Fixes EmptyStackException when encountering more than one unexpected end curly brace.
  • Loading branch information
PseudoKnight committed Apr 28, 2020
1 parent d118a91 commit e052ce22a709defd010540ef7ffb6f974b5faeaa
Showing 1 changed file with 3 additions and 0 deletions.
@@ -1287,6 +1287,9 @@ public static ParseTree compile(TokenStream stream, Environment environment,
}

if(t.type == TType.RCURLY_BRACKET) {
if(braceCount == 0) {
throw new ConfigCompileException("Unexpected end curly brace", t.target);
}
braceCount--;
if(constructCount.peek().get() > 1) {
//We need to autoconcat some stuff

0 comments on commit e052ce2

Please sign in to comment.