support package name as a resolved value

This commit is contained in:
Dave Holoway
2020-06-19 11:08:02 +01:00
parent 82e660eabc
commit a034a90735
9 changed files with 89 additions and 27 deletions

View File

@@ -37,7 +37,11 @@ class TokenList {
markEnd() {
let i = this.idx;
while (this.tokens[--i].kind === 'wsc') { }
return this.tokens.slice(this.marks.shift(), i + 1);
const range = [this.marks.shift(), i + 1];
if (range[1] <= range[0]) {
range[1] = range[0] + 1;
}
return this.tokens.slice(range[0], range[1]);
}
/**