Crate cranelift_reader[][src]

Cranelift file reader library.

The cranelift_reader library supports reading .clif files. This functionality is needed for testing Cranelift, but is not essential for a JIT compiler.

Structs

Comment

A comment in a parsed function.

Details

Additional details about a function parsed from a text string. These are useful for detecting test commands embedded in comments etc. The details to not affect the semantics of the function.

Invocation

Represent a function call; RunCommands invoke a CLIF function using an Invocation.

Location

The location of a Token or Error.

ParseError

A parse error is returned when the parse failed.

ParseOptions

Options for configuring the parsing of filetests.

SourceMap

Mapping from entity names to source locations.

TestCommand

A command appearing in a test file.

TestFile

A parsed test case.

Enums

Comparison

A CLIF comparison operation; e.g. ==.

Feature

A cranelift feature in a test file preamble.

IsaSpec

The ISA specifications in a .clif file.

ParseOptionError

An error type returned by parse_options.

RunCommand

A run command appearing in a test file.

TestOption

An option on a test command.

Functions

parse_functions

Parse the entire text into a list of functions.

parse_options

Parse an iterator of command line options and apply them to config.

parse_run_command

Parse a CLIF comment text as a run command.

parse_test

Parse the entire text as a test case file.

Type Definitions

ParseResult

Result of a parser operation. The ParseError variant includes a location.