mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 10:51:06 +01:00
Factor out common checking handling for the different kinds of unqualified names
23 lines
992 B
Plaintext
23 lines
992 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
|
|
|
|
var n: i8 =-n;
|
|
// Valid
|
|
|
|
// CHECK:STDOUT: - filename: prefix_no_space.carbon
|
|
// CHECK:STDOUT: parse_tree: [
|
|
// CHECK:STDOUT: {kind: 'FileStart', text: ''},
|
|
// CHECK:STDOUT: {kind: 'VariableIntroducer', text: 'var'},
|
|
// CHECK:STDOUT: {kind: 'IdentifierName', text: 'n'},
|
|
// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i8'},
|
|
// CHECK:STDOUT: {kind: 'BindingPattern', text: ':', subtree_size: 3},
|
|
// CHECK:STDOUT: {kind: 'VariableInitializer', text: '='},
|
|
// CHECK:STDOUT: {kind: 'IdentifierNameExpr', text: 'n'},
|
|
// CHECK:STDOUT: {kind: 'PrefixOperator', text: '-', subtree_size: 2},
|
|
// CHECK:STDOUT: {kind: 'VariableDecl', text: ';', subtree_size: 8},
|
|
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
|
|
// CHECK:STDOUT: ]
|