Expand description
Shell reader/parser. Parses a string into a shell command. Roughly a subset of https://www.gnu.org/software/bash/manual/html_node/Shell-Expansions.html
Structsยง
- Parse
State ๐ - A list of commands to run in a pipe as a job.
Enumsยง
- SeqType ๐Type of the current sequence being parsed.
Functionsยง
- char_
to_ ๐hex_ num - consume_
whitespace ๐ - escape_
to_ ๐char Read an ascii char from 0x00-0x7F endowed in a string as โ\xXXโ where X is single hex digit. - parse_
line_ ๐inner - push_
next_ ๐seq_ item - push_
next_ ๐seq_ run - read_
arg ๐ - read_
chars_ ๐until - read_
simple_ ๐string Read string surrounded by single quote (โ). Assumes chars is on the open quote and consumes the end quote. This simply reads the chars until the next โ and puts them in a String Arg. Note, can not produce a string containing a โ character. - read_
special_ ๐arg - read_
string ๐Read string surrounded by quote (โ). Assumes chars is on the open quote and consumes the end quote. This version will handle interpolation and escape chars. - read_
token ๐ - read_
utf_ ๐scalar Read a UTF8 codepoint encoded in a string with โ\uXXXXXXXXโ or \u{XXXXXXXX}โ where X is a single hex digit. There can be 1-8 hex values (X- a nibble) in the encoding (Up to 4 bytes).