The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Data::Hopen::Toolchain - SUPERSEDED base class for hopen toolchains

SYNOPSIS

TODO - change this to "Tool" instead of "Toolchain" - permit loading any number of tools - The Generator specifies a default list of tools rather than a single default toolchain. - add G::ToolOp to invoke tools. A ToolOp will take a language and an opcode and invoke a corresponding Tool. E.g., a GNU C Tool will generate command-line options for gcc-style command lines. - Only one Tool may be loaded for each (language, opcode) pair. Otherwise the build would be ambiguous. - In Conventions, define the formats for languages and opcodes.

Maybe TODO: - Each Generator must specify a list of Content-Types (media types) it can consume. Each Tool must specify a specific content-type it produces. Mismatches are an error unless overriden on the hopen command line.

The code that generates command lines to invoke specific toolchains lives under Data::Hopen::Toolchain. Those modules must implement the interface defined here.

ATTRIBUTES

proj_dir

A Path::Class::Dir instance specifying the root directory of the project

dest_dir

A Path::Class::Dir instance specifying where the generated output should be written.

FUNCTIONS

A toolchain (Data::Hopen::Toolchain subclass) is a Visitor.

TODO Figure out if the toolchain has access to Data::Hopen::G::Link instances.

visit_goal

Do whatever the toolchain wants to do with a Data::Hopen::G::Goal. By default, no-op.

visit_op

Do whatever the toolchain wants to do with a Data::Hopen::G::Op that is not a Goal (see "visit_goal"). By default, no-op.

finalize

Do whatever the toolchain wants to do to finish up.