------------------------------------------------------------------------------- gc_parser.declarations ------------------------------------------------------------------------------- ImportDecl = "import" identifier string_lit .
()
| 469 | |
| 470 | // ImportDecl = "import" identifier string_lit . |
| 471 | func (p *gc_parser) parse_import_decl() { |
| 472 | p.expect_keyword("import") |
| 473 | alias := p.expect(scanner.Ident) |
| 474 | path := p.parse_package() |
| 475 | fullName := "!" + path.Name + "!" + alias |
| 476 | p.path_to_name[path.Name] = fullName |
| 477 | p.pfc.add_package_to_scope(fullName, path.Name) |
| 478 | } |
| 479 | |
| 480 | // ConstDecl = "const" ExportedName [ Type ] "=" Literal . |
| 481 | // Literal = bool_lit | int_lit | float_lit | complex_lit | string_lit . |
no test coverage detected