mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-01 10:24:59 +01:00
This detects ordering issues with the `package` and `import` statements. `library` is changed from package-specific to instead be generic between the two, since structurally it's non-specific. The next step would be to start exposing the results for the driver to make ordering decisions for checking. That'll involve further modifications to this code, but this felt like a reasonable change point because it's the extent of the parser enforcement, and still causes significant refactoring. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
17 lines
626 B
Plaintext
17 lines
626 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
|
|
import Geometry;
|
|
|
|
// CHECK:STDOUT: - filename: basic.carbon
|
|
// CHECK:STDOUT: parse_tree: [
|
|
// CHECK:STDOUT: {kind: 'FileStart', text: ''},
|
|
// CHECK:STDOUT: {kind: 'ImportIntroducer', text: 'import'},
|
|
// CHECK:STDOUT: {kind: 'Name', text: 'Geometry'},
|
|
// CHECK:STDOUT: {kind: 'ImportDirective', text: ';', subtree_size: 3},
|
|
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
|
|
// CHECK:STDOUT: ]
|