projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
#pragma lib
[m6w6/ext-psi]
/
src
/
cpp.h
diff --git
a/src/cpp.h
b/src/cpp.h
index 5ace4bfd2a76c4c8fcabfa60c71bdc0a81eb8be7..9d98abddbfe9ce6e5fcb29470da2abcaef3c945c 100644
(file)
--- a/
src/cpp.h
+++ b/
src/cpp.h
@@
-39,18
+39,23
@@
struct psi_cpp {
struct {
struct psi_plist *iter;
struct psi_plist *next;
struct {
struct psi_plist *iter;
struct psi_plist *next;
+ struct psi_plist *exec;
} tokens;
} tokens;
+ HashTable expanding;
const char *search;
size_t index;
unsigned level;
unsigned skip;
unsigned seen;
unsigned expanded;
const char *search;
size_t index;
unsigned level;
unsigned skip;
unsigned seen;
unsigned expanded;
+ unsigned counter;
+ unsigned include_level;
+ bool do_cpp;
};
struct psi_cpp *psi_cpp_init(struct psi_parser *parser);
};
struct psi_cpp *psi_cpp_init(struct psi_parser *parser);
-bool psi_cpp_
load_defaults(struct psi_cpp *cpp);
-
bool psi_cpp_process(struct psi_cpp *cpp, struct psi_plist **tokens
);
+bool psi_cpp_
process(struct psi_cpp *cpp, struct psi_plist **tokens,
+
struct psi_token *expanding
);
void psi_cpp_free(struct psi_cpp **cpp_ptr);
bool psi_cpp_if(struct psi_cpp *cpp, struct psi_cpp_exp *exp);
void psi_cpp_free(struct psi_cpp **cpp_ptr);
bool psi_cpp_if(struct psi_cpp *cpp, struct psi_cpp_exp *exp);
@@
-62,12
+67,15
@@
bool psi_cpp_undef(struct psi_cpp *cpp, struct psi_token *tok);
#define PSI_CPP_INCLUDE_NEXT 0x1
#define PSI_CPP_INCLUDE_ONCE 0x2
#define PSI_CPP_INCLUDE_NEXT 0x1
#define PSI_CPP_INCLUDE_ONCE 0x2
+bool psi_cpp_has_include(struct psi_cpp *cpp, const struct psi_token *file, unsigned flags, char *path);
bool psi_cpp_include(struct psi_cpp *cpp, const struct psi_token *file, unsigned flags);
bool psi_cpp_include(struct psi_cpp *cpp, const struct psi_token *file, unsigned flags);
+bool psi_cpp_pragma(struct psi_cpp *cpp, struct psi_cpp_macro_decl *decl);
+
void psi_cpp_tokiter_reset(struct psi_cpp *cpp);
bool psi_cpp_tokiter_seek(struct psi_cpp *cpp, size_t index);
#if PSI_CPP_DEBUG > 1
void psi_cpp_tokiter_reset(struct psi_cpp *cpp);
bool psi_cpp_tokiter_seek(struct psi_cpp *cpp, size_t index);
#if PSI_CPP_DEBUG > 1
-void psi_cpp_tokiter_dump(
int fd
, struct psi_cpp *cpp);
+void psi_cpp_tokiter_dump(
struct psi_dump *dump
, struct psi_cpp *cpp);
#endif
struct psi_token *psi_cpp_tokiter_current(struct psi_cpp *cpp);
size_t psi_cpp_tokiter_index(struct psi_cpp *cpp);
#endif
struct psi_token *psi_cpp_tokiter_current(struct psi_cpp *cpp);
size_t psi_cpp_tokiter_index(struct psi_cpp *cpp);