My Project
Loading...
Searching...
No Matches
include
ast_getter.h
Go to the documentation of this file.
1
4
#ifndef __AST_GETTER
5
#define __AST_GETTER
6
7
typedef
enum
{
8
comment_normal
,
9
comment_after
,
10
comment_before
,
11
}
comment_t
;
12
typedef
struct
Comment
{
13
m_str
str
;
14
loc_t
loc
;
15
comment_t
type
;
16
bool
alone
;
// TODO: use it!
17
bool
block
;
18
}
Comment
;
19
MK_VECTOR_TYPE
(
Comment
, comment)
20
21
22
typedef struct
AstGetter_
{
23
char
*
name
;
24
FILE *
f
;
25
SymTable *
st
;
26
PPArg
*
ppa
;
27
CommentList **
comments
;
28
bool
fmt
;
29
}
AstGetter
;
30
31
ANN
Ast
parse_pos
(
struct
AstGetter_
*
const
,
const
pos_t
);
32
ANN
static
inline
Ast
parse
(
struct
AstGetter_
*
const
arg) {
33
pos_t
pos;
34
pos_ini
(&pos);
35
return
parse_pos
(arg, pos);
36
}
37
#endif
MK_VECTOR_TYPE
MK_VECTOR_TYPE(Tag, tag)
Ast
struct SectionList * Ast
Definition
absyn.h:23
comment_t
comment_t
Definition
ast_getter.h:7
comment_normal
@ comment_normal
Definition
ast_getter.h:8
comment_after
@ comment_after
Definition
ast_getter.h:9
comment_before
@ comment_before
Definition
ast_getter.h:10
parse
static ANN Ast parse(struct AstGetter_ *const arg)
Definition
ast_getter.h:32
AstGetter
struct AstGetter_ AstGetter
parse_pos
ANN Ast parse_pos(struct AstGetter_ *const, const pos_t)
Definition
scanner.c:36
pos_ini
ANN void pos_ini(pos_t *pos)
Definition
gwlog.c:11
loc_t
struct loc_t_ loc_t
Definition
absyn.h:348
PPArg
struct PPArg_ PPArg
AstGetter_
Definition
ast_getter.h:22
AstGetter_::fmt
bool fmt
Definition
ast_getter.h:28
AstGetter_::f
FILE * f
Definition
ast_getter.h:24
AstGetter_::comments
CommentList ** comments
Definition
ast_getter.h:27
AstGetter_::st
SymTable * st
Definition
ast_getter.h:25
AstGetter_::ppa
PPArg * ppa
Definition
ast_getter.h:26
AstGetter_::name
char * name
Definition
ast_getter.h:23
Comment
Definition
ast_getter.h:12
Comment::str
m_str str
Definition
ast_getter.h:13
Comment::type
comment_t type
Definition
ast_getter.h:15
Comment::block
bool block
Definition
ast_getter.h:17
Comment::loc
loc_t loc
Definition
ast_getter.h:14
Comment::alone
bool alone
Definition
ast_getter.h:16
pos_t
Definition
gwlog.h:7
Generated by
1.13.2