Module word

Module word 

Source
Expand description

Parser for shell words, used in expansion and other contexts.

Implements support for:

  • Text quoting (single, double, ANSI C).
  • Escape sequences.
  • Tilde prefixes.
  • Parameter expansion expressions.
  • Command substitution expressions.
  • Arithmetic expansion expressions.

Structs§

WordPieceWithSource
Encapsulates a WordPiece together with its position in the string it came from.

Enums§

BraceExpressionMember
Member of a brace expression.
BraceExpressionOrText
Represents a sub-word that is either a brace expression or some other word text.
Parameter
A parameter, used in a parameter expansion.
ParameterExpr
A parameter expression, used in a parameter expansion.
ParameterTestType
Type of a parameter test.
ParameterTransformOp
Kind of operation to apply to a parameter.
SpecialParameter
A special parameter, used in a parameter expansion.
SubstringMatchKind
Kind of substring match.
WordPiece
Represents a piece of a word.

Functions§

parse
Parse a word into its constituent pieces.
parse_brace_expansions
Parse brace expansion from a given word .
parse_parameter
Parse the given word into a parameter expression.

Type Aliases§

BraceExpression
Represents a brace expression to be expanded.