mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 21:10:09 +01:00
This makes TokenizedBuffer more consistent with ParseTree and SemanticsIR, which also wrap with [] to produce a sequence value. It also makes it possible in driver.cpp to just prefix the line with a name, so it ends up with: var_name: [ (content) ] Noticed this due to bracketing comments on #2443 and trying to think of better answers. With this, we can also say that the [] bracket a variable.
18 lines
657 B
Plaintext
18 lines
657 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
|
|
//
|
|
// RUN: %{not} %{carbon} --print-errors=streamed dump tokens %s | \
|
|
// RUN: %{FileCheck-strict}
|
|
// CHECK:STDOUT: [
|
|
// CHECK-COUNT-17:STDOUT: {{.*}}
|
|
// CHECK:STDOUT: ]
|
|
|
|
fn run(String program) {
|
|
return True;
|
|
|
|
var x = 3a;
|
|
|
|
// CHECK:STDERR:{{.*}}/errors_streamed_test.carbon:[[@LINE-2]]:10: Invalid digit 'a' in decimal numeric literal.
|
|
// CHECK:STDERR:{{.*}}/errors_streamed_test.carbon:[[@LINE-6]]:24: Closing symbol does not match most recent opening symbol.
|