<commit_before>// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package gc

import (
	"fmt"
	"strconv"
	"strings"
	"unicode/utf8"

	"cmd/compile/internal/syntax"
)

func parseFile(filename string) {
	p := noder{baseline: lexlineno}
	file, err := syntax.ReadFile(filename, p.error, p.pragma, 0)
	if err != nil {
		Fatalf("syntax.ReadFile %s: %v", filename, err)
	}

	p.file(file)

	if !imported_unsafe {
		for _, x := range p.linknames {
			p.error(0, x, "//go:linkname only allowed in Go files that import \"unsafe\"")
		}
	}

	if nsyntaxerrors == 0 {
		testdclstack()
	}
}

// noder transforms package syntax's AST into a Nod tree.
type noder struct {<commit_msg>cmd/compile: don't panic if syntax.ReadFile returns an error<commit_after>// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package gc

import (
	"fmt"
	"strconv"
	"strings"
	"unicode/utf8"

	"cmd/compile/internal/syntax"
)

func parseFile(filename string) {
	p := noder{baseline: lexlineno}
	file, err := syntax.ReadFile(filename, p.error, p.pragma, 0)
	if err != nil {
		fmt.Printf("parse %s: %v\n", filename, err)
		errorexit()
	}

	p.file(file)

	if !imported_unsafe {
		for _, x := range p.linknames {
			p.error(0, x, "//go:linkname only allowed in Go files that import \"unsafe\"")
		}
	}

	if nsyntaxerrors == 0 {
		testdclstack()
	}
}

// noder transforms package syntax's AST into a Nod tree.
type noder struct {
{'fraction_non_alphanumeric': 0.12881144990665838, 'fraction_numerical': 0.009956440572495333, 'mean_word_length': 3.4916201117318435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5199815', 'n_tokens_mistral': 618, 'n_tokens_neox': 564, 'n_words': 188}