mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
To pick up proto updates (field renames etc.) and new carbon source samples added to testdata. ``` $ rm explorer/fuzzing/fuzzer_corpus/* $ explorer/fuzzing/regen_corpus.py ```
244 lines
6.5 KiB
Plaintext
244 lines
6.5 KiB
Plaintext
compilation_unit {
|
|
package_statement {
|
|
package_name: "ExplorerTest"
|
|
}
|
|
is_api: true
|
|
declarations {
|
|
function {
|
|
name: "Main"
|
|
param_pattern {
|
|
}
|
|
return_term {
|
|
kind: Expression
|
|
type {
|
|
int_type_literal {
|
|
}
|
|
}
|
|
}
|
|
body {
|
|
statements {
|
|
variable_definition {
|
|
pattern {
|
|
binding_pattern {
|
|
name: "cond"
|
|
type {
|
|
expression_pattern {
|
|
expression {
|
|
if_expression {
|
|
condition {
|
|
bool_literal {
|
|
value: true
|
|
}
|
|
}
|
|
then_expression {
|
|
bool_type_literal {
|
|
}
|
|
}
|
|
else_expression {
|
|
int_type_literal {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
init {
|
|
bool_literal {
|
|
value: true
|
|
}
|
|
}
|
|
is_returned: false
|
|
}
|
|
}
|
|
statements {
|
|
if_statement {
|
|
condition {
|
|
if_expression {
|
|
condition {
|
|
identifier {
|
|
name: "cond"
|
|
}
|
|
}
|
|
then_expression {
|
|
bool_literal {
|
|
value: true
|
|
}
|
|
}
|
|
else_expression {
|
|
bool_literal {
|
|
value: false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
then_block {
|
|
}
|
|
}
|
|
}
|
|
statements {
|
|
while_statement {
|
|
condition {
|
|
if_expression {
|
|
condition {
|
|
identifier {
|
|
name: "cond"
|
|
}
|
|
}
|
|
then_expression {
|
|
bool_literal {
|
|
value: false
|
|
}
|
|
}
|
|
else_expression {
|
|
bool_literal {
|
|
value: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
body {
|
|
}
|
|
}
|
|
}
|
|
statements {
|
|
return_expression_statement {
|
|
expression {
|
|
if_expression {
|
|
condition {
|
|
if_expression {
|
|
condition {
|
|
identifier {
|
|
name: "cond"
|
|
}
|
|
}
|
|
then_expression {
|
|
operator {
|
|
op: Or
|
|
arguments {
|
|
bool_literal {
|
|
value: true
|
|
}
|
|
}
|
|
arguments {
|
|
bool_literal {
|
|
value: false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else_expression {
|
|
operator {
|
|
op: And
|
|
arguments {
|
|
bool_literal {
|
|
value: false
|
|
}
|
|
}
|
|
arguments {
|
|
bool_literal {
|
|
value: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
then_expression {
|
|
if_expression {
|
|
condition {
|
|
operator {
|
|
op: Not
|
|
arguments {
|
|
identifier {
|
|
name: "cond"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
then_expression {
|
|
operator {
|
|
op: Add
|
|
arguments {
|
|
int_literal {
|
|
value: 1
|
|
}
|
|
}
|
|
arguments {
|
|
int_literal {
|
|
value: 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else_expression {
|
|
operator {
|
|
op: Mul
|
|
arguments {
|
|
int_literal {
|
|
value: 3
|
|
}
|
|
}
|
|
arguments {
|
|
int_literal {
|
|
value: 4
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else_expression {
|
|
if_expression {
|
|
condition {
|
|
operator {
|
|
op: Not
|
|
arguments {
|
|
identifier {
|
|
name: "cond"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
then_expression {
|
|
operator {
|
|
op: Add
|
|
arguments {
|
|
int_literal {
|
|
value: 5
|
|
}
|
|
}
|
|
arguments {
|
|
int_literal {
|
|
value: 6
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else_expression {
|
|
operator {
|
|
op: Mul
|
|
arguments {
|
|
int_literal {
|
|
value: 7
|
|
}
|
|
}
|
|
arguments {
|
|
int_literal {
|
|
value: 8
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|