package
1.8.1
Repository: https://github.com/onflow/cadence.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

gen-errors

This tool generates a CSV file of all parser errors (types which implement parser.ParseError) defined in the parser package, and of all semantic errors (types which implement sema.SemanticError) defined in the sema package.

For each error, the row in the CSV file contains the name of the type, and an example error message. The example error message is generated by calling the Error() method on the error type, after instantiating the error fields with placeholder values.

Usage

To generate the CSV file, run the following command:

go run .

This will write the CSV to the standard output.

Example

name,example
parser.CustomDestructorError,custom destructor definitions are no longer permitted
sema.InvalidDestructionError,cannot destroy value: not a resource

Regenerating errors

To update the code that generates the errors, run the following command:

go generate errors.go