ww imports: reject init bindings before recovery
This commit is contained in:
@@ -1323,6 +1323,12 @@ parseuse(Parser *p)
|
||||
Pos pp = p->cur.pos;
|
||||
expect(p, TK_USE);
|
||||
Node *n = newnode(p->a, N_USE, pp);
|
||||
/* Keep n->pos at the import keyword for structural diagnostics. Go's
|
||||
* import declaration position is the first spec token: the explicit alias
|
||||
* when present, otherwise the path. */
|
||||
n->usefile = p->cur.pos.file;
|
||||
n->useline = p->cur.pos.line;
|
||||
n->usecol = p->cur.pos.col;
|
||||
const char *alias = NULL;
|
||||
const char *first;
|
||||
if (p->cur.kind == TK_UNDER) {
|
||||
|
||||
Reference in New Issue
Block a user