Expand description
Parser for the Exec mini-language (the value of an Exec: directive).
Grammar (informal):
exec := pipeline pipeline := stage (“|” stage)* stage := source | command source := value_ref (a single bare ref by itself) command := token (ws+ token)* token := group | text group := “[” piece (ws+ piece)* “]” piece := text-without-spaces | value_ref | quoted_str text := (literal | quoted_str)+ quoted := quote (literal | “{” value_ref “}”)* quote value_ref := “%” ident | “:” ident | “^” ident | “@” ident | “$” | “$.” ident (“.” ident)*
This module is purely syntactic: it produces an ExecStage AST. Argv
construction and process spawning live in crate::exec.
Functions§
- parse_
exec - Parse the Exec value.
startis the absolute byte offset of the first character in the source, used to translate spans for diagnostics.