Loading...
Searching...
No Matches
Shell lexer node
Grammar nodes

A lexer node using shell-like tokenization rules. More...

Collaboration diagram for Shell lexer node:

## Functions

struct ec_node * | ec_node_sh_lex (const char *id, struct ec_node *child)
| Create a shell lexer node.
struct ec_node * | ec_node_sh_lex_expand (const char *id, struct ec_node *child)
| Create a shell lexer node with variable expansion.

## Detailed Description

A lexer node using shell-like tokenization rules.

Configuration Schema

No configuration schema.

## Function Documentation

## ec_node_sh_lex()

struct ec_node * ec_node_sh_lex | ( | const char * | id,
|  | struct ec_node * | child )

Create a shell lexer node.

This node tokenizes the input using shell-like lexing rules (handling quotes, escapes, etc.) and passes the resulting tokens to the child node.

Parameters

  id | The node identifier.
  child | The child node. It is consumed and will be freed when the parent is freed, or immediately on error.

Returns
  The node, or NULL on error (errno is set).

Examples
  extension-editline/main.c, parse-yaml/parse-yaml.c, pool-editline/main.c, readline/main.c, and simple-editline/main.c.

## ec_node_sh_lex_expand()

struct ec_node * ec_node_sh_lex_expand | ( | const char * | id,
|  | struct ec_node * | child )

Create a shell lexer node with variable expansion.

Same as ec_node_sh_lex() but with shell variable expansion enabled.

Parameters

  id | The node identifier.
  child | The child node. It is consumed and will be freed when the parent is freed, or immediately on error.

Returns
  The node, or NULL on error (errno is set).