change use to usingnamespace

See #2014

`use` syntax is still accepted for now. `zig fmt` automatically
updates code. After a release cycle the old syntax will be removed.
This commit is contained in:
Andrew Kelley
2019-05-29 17:39:26 -04:00
parent 9a7cf73b3b
commit b7a82288ad
9 changed files with 28 additions and 14 deletions

View File

@@ -668,7 +668,7 @@ static AstNode *ast_parse_top_level_decl(ParseContext *pc, VisibMod visib_mod) {
return res;
}
Token *use = eat_token_if(pc, TokenIdKeywordUse);
Token *use = eat_token_if(pc, TokenIdKeywordUsingNamespace);
if (use != nullptr) {
AstNode *expr = ast_expect(pc, ast_parse_expr);
expect_token(pc, TokenIdSemicolon);