Restructure __intrinsic_print to be a keyword-like Print (#1407)

This commit is contained in:
Jon Ross-Perkins
2022-07-18 13:58:08 -04:00
committed by GitHub
parent 4296e1e780
commit 084bc6ebc1
12 changed files with 93 additions and 20 deletions
-19
View File
@@ -1,19 +0,0 @@
// 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} %s 2>&1 | \
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s
// RUN: %{explorer} --parser_debug --trace_file=- %s 2>&1 | \
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s
// AUTOUPDATE: %{explorer} %s
// CHECK: Hello world!
// CHECK: result: 0
package ExplorerTest api;
fn Main() -> i32 {
var s: auto = "Hello world!";
Print(s);
return 0;
}
-18
View File
@@ -1,18 +0,0 @@
// 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} %s 2>&1 | \
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes=false %s
// RUN: %{explorer} --parser_debug --trace_file=- %s 2>&1 | \
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s
// AUTOUPDATE: %{explorer} %s
// CHECK: Printing 1
// CHECK: result: 0
package ExplorerTest api;
fn Main() -> i32 {
PrintInt("Printing {0}", 1);
return 0;
}
+3 -3
View File
@@ -10,11 +10,11 @@
//
// NOAUTOUPDATE
// CHECK: ********** source program **********
// CHECK: fn Print (format_str: String) {
// CHECK: interface ImplicitAs {
// CHECK: ********** type checking **********
// CHECK: checking tuple pattern (format_str: String)
// CHECK: ** declaring interface ImplicitAs
// CHECK: ********** type checking complete **********
// CHECK: fn Print (format_str: String) {
// CHECK: interface ImplicitAs {
// CHECK: ********** starting execution **********
// CHECK: ********** initializing globals **********
// CHECK: ********** calling main function **********