5 const ssize_t sz = strlen(
str);
7 m_str def = strchr(
str,
'(') ?: strchr(
str,
'=');
8 const ssize_t idx = def ? (def -
str) : sz;
9 strncpy(base,
str, idx);
21 const size_t sz = strlen(src);
23 for (m_uint i = 0; i < sz; ++i) {
24 const char c = src[i];
41 GwText *text = new_text(
ppa->hash.p);
47 if (!
ppa->hash.table) hini(&
ppa->hash, 127);
49 const m_str arg = strchr(
str,
'(');
51 const m_str body = strchr(
str,
'=');
53 m->file =
"command line";
59 vector_init(&a->
path);
63 vector_release(&a->
path);
include this file to use gwion-ast library
MacroArg new_macroarg(MemPool p, const m_str name)
void macro_del(const Hash)
Macro macro_add(const Hash, m_str)
static ANN GwText * pparg_body(PPArg *ppa, const m_str str)
ANN void pparg_ini(MemPool mp, PPArg *a)
static ANN Macro pparg_def(PPArg *ppa, const m_str str)
static ANN MacroArg pparg_arg(PPArg *ppa, m_str src)
ANN void pparg_end(PPArg *a)