Expand description
$fy: rule-based translation of shell scripts into command-stream modules.
The pipeline has two halves, exactly as link-foundation/meta-language models translation:
- Formalize: shell source -> links network (
formalizer) - Substitute: links network -> JavaScript (
rules+engine)
Step 2 contains no shell knowledge beyond the rule table, and step 1 contains no JavaScript knowledge at all.
Re-exports§
pub use source::translate_competitor_source;pub use source::translate_shell_program;pub use source::translate_source;pub use source::SourceOptions;
Modules§
- cli
- Shared options for the virtual command and the native CLI.
- engine
- Recursive rule engine for translating a meta-language links network.
- formalizer
- Formalizes a shell script as a meta-language links network.
- lexer
- Shell lexer for the
$fytranslator. - parser
- Recursive-descent shell parser for the
$fytranslator. - rules
- The Shell -> JavaScript substitution rules.
- source
- Lossless source migration: parse, formalize typed links, substitute rules.
- word_
expander - Splits a shell word into typed parts so that every leaf of the network is translated by a rule rather than by ad-hoc string surgery.
Structs§
- Translate
Options - Options for
translate_shell_to_mjs. - Translation
- A translated module.
Functions§
- translate_
shell_ to_ mjs - Translates a shell script into a command-stream ES module.