[][src]Module c2rust_refactor::driver

Frontend logic for parsing and expanding ASTs. This code largely mimics the behavior of rustc_driver::driver::compile_input.

Structs

BoxedGlobalCtxt
Compiler

Enums

Phase

Compiler phase selection. Later phases have more analysis results available, but are less robust against broken code. (For example, phase 3 provides typechecking results, but can't be used on code that doesn't typecheck.)

Functions

build_session_from_args

Run the compiler with some command line args. Stops compiling and invokes the callback func after the indicated phase.

clone_config
create_config
emit_and_panic
make_compiler
make_span_for_text

Create a span whose text is s. Note this is somewhat expensive, as it adds a new dummy file to the SourceMap on every call.

parse_arg
parse_block
parse_expr
parse_foreign_items
parse_impl_items
parse_items
parse_pat
parse_stmts
parse_ty
run_compiler
run_parser
run_parser_tts
run_refactoring
try_run_parser
try_run_parser_tts