My Project
Loading...
Searching...
No Matches
pparg.h File Reference

parser arguments More...

Go to the source code of this file.

Data Structures

struct  PPArg_
 

Typedefs

typedef struct PPArg_ PPArg
 

Functions

ANN void pparg_ini (MemPool, PPArg *)
 
ANN void pparg_end (PPArg *)
 
static ANN struct Macro_ppa_has_macro (PPArg *ppa, const Symbol sym)
 
static ANN bool ppa_rem_macro (PPArg *ppa, const Symbol sym)
 
 ANN2 (1) bool pparg_add(PPArg *ppa
 
static ANN void pparg_inc (PPArg *ppa, const m_str str)
 

Variables

const m_str str
 
return macro_remppa
 

Detailed Description

parser arguments

Definition in file pparg.h.

Typedef Documentation

◆ PPArg

typedef struct PPArg_ PPArg

Function Documentation

◆ ANN2()

ANN2 ( 1 )

◆ ppa_has_macro()

static ANN struct Macro_ * ppa_has_macro ( PPArg * ppa,
const Symbol sym )
inlinestatic

Definition at line 16 of file pparg.h.

17 {
18 if (!ppa->hash.table) return NULL;
19 return macro_has(&ppa->hash, s_name(sym));
20}
return NULL
Definition macro.c:41
Macro macro_has(const Hash, m_str)
return macro_rem & ppa
Definition pparg.h:30

◆ ppa_rem_macro()

static ANN bool ppa_rem_macro ( PPArg * ppa,
const Symbol sym )
inlinestatic

Definition at line 22 of file pparg.h.

22 {
23 if (!ppa->hash.table) return false;
24 return macro_has(&ppa->hash, s_name(sym)) ? true : false;
25}

◆ pparg_end()

ANN void pparg_end ( PPArg * a)

Definition at line 62 of file pparg.c.

62 {
63 vector_release(&a->path);
64 if (a->hash.table) {
65 macro_del(&a->hash);
66 hend(&a->hash);
67 }
68}
void macro_del(const Hash)
struct Vector_ path
Definition pparg.h:8
struct Hash_ hash
Definition pparg.h:9

◆ pparg_inc()

static ANN void pparg_inc ( PPArg * ppa,
const m_str str )
inlinestatic

Definition at line 32 of file pparg.h.

32 {
33 return vector_add(&ppa->path, (vtype)str);
34}
const m_str str
Definition pparg.h:27

◆ pparg_ini()

ANN void pparg_ini ( MemPool mp,
PPArg * a )

Definition at line 57 of file pparg.c.

57 {
58 a->hash.p = mp;
59 vector_init(&a->path);
60}

Variable Documentation

◆ ppa

return macro_rem& ppa

Definition at line 30 of file pparg.h.

◆ str

const m_str str
Initial value:
{
if (!ppa->hash.table) return false

Definition at line 27 of file pparg.h.