mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-02 17:52:58 +01:00
This unifies `dump-tokens` and `dump-parse-tree` so that we don't keep writing basically the same code repeatedly. I'll need to modify the output of SemanticsIR::Print more, and may soon unify printing multiple IRs this way (particularly including the builtins SemanticsIR) but this is intended to offer a starting point. I may eventually try to unify lit.cfg.py files, but I was thinking about whether that works in various contexts we may run in and eventually decided copying the driver/testdata/lit.cfg.py file would be the easiest solution.
16 lines
638 B
Plaintext
16 lines
638 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 2>&1 | \
|
|
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s
|
|
|
|
fn run(String program) {
|
|
return True;
|
|
|
|
var x = 3a;
|
|
|
|
// CHECK: {{.*}}/errors_streamed_test.carbon:11:10: Invalid digit 'a' in decimal numeric literal.
|
|
// CHECK: {{.*}}/errors_streamed_test.carbon:8:24: Closing symbol does not match most recent opening symbol.
|
|
// CHECK-COUNT-17: token: {{.*}}
|