Fix some crashes when pretty-printing an empty name
Predicate names can't be empty, but it can happen with the renaming feature added in the next commit.
This commit is contained in:
@@ -70,14 +70,14 @@ function parseName(text: string): QualifiedName {
|
||||
let args: QualifiedName[] | undefined;
|
||||
if (skipToken(">")) {
|
||||
args = [];
|
||||
while (peek() !== "<") {
|
||||
while (tokens.length > 0 && peek() !== "<") {
|
||||
args.push(parseQName());
|
||||
skipToken(",");
|
||||
}
|
||||
args.reverse();
|
||||
skipToken("<");
|
||||
}
|
||||
const name = next();
|
||||
const name = tokens.length === 0 ? "" : next();
|
||||
const prefix = skipToken("::") ? parseQName() : undefined;
|
||||
return {
|
||||
prefix,
|
||||
|
||||
Reference in New Issue
Block a user