Files
carbon-lang/explorer/testdata/basic_syntax/trace.carbon
T
pk19604014 035afdccff Added EnumKindName() for rtti enums + sample usage to print node kind names during type checking (#1305)
Sample trace output:

```
checking tuple pattern (v1: T1, v2: T2), expecting (T1:! ImplicitAs(U1), T2:! ImplicitAs(U2))
checking binding pattern v1: T1, expecting T1:! ImplicitAs(U1)
checking expression pattern T1
checking identifier expression T1
```
2022-06-02 16:16:51 -04:00

33 lines
1.1 KiB
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: %{explorer} --parser_debug --trace_file=- %s 2>&1 | \
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s
//
// A lot of output is elided: this is only checking for a few things for simple
// sanity checking on --parser_debug --trace_file=- output.
//
// NOAUTOUPDATE
// CHECK: ********** source program **********
// CHECK: fn Print (format_str: String) {
// CHECK: ********** type checking **********
// CHECK: checking tuple pattern (format_str: String)
// CHECK: ********** type checking complete **********
// CHECK: fn Print (format_str: String) {
// CHECK: ********** starting execution **********
// CHECK: ********** initializing globals **********
// CHECK: ********** calling main function **********
// CHECK: {
// CHECK: stack:
// CHECK: heap:
// CHECK: }
// CHECK: --- step exp Main() (<Main()>:0) --->
// CHECK: result: 0
package ExplorerTest api;
fn Main() -> i32 {
return 0;
}