X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Ftoken.h;h=368fba993df5c6052e4162b548f011686e83b914;hp=5f6c7c71820bce2ee4a9dbbc95d3aa1d3fb26d00;hb=2fa436074ca9a5e87f39b696de832fa2188fcfc6;hpb=d57dd73ddbd960613cfc06bc4c9473b71d3598ef diff --git a/src/token.h b/src/token.h index 5f6c7c7..368fba9 100644 --- a/src/token.h +++ b/src/token.h @@ -176,20 +176,20 @@ static inline const char *psi_t_indirection(unsigned pointer_level) { struct psi_token { token_t type; - unsigned size, line, col, flags; - char *text, *file; - char buf[1]; + unsigned line; + unsigned col; + unsigned flags; + zend_string *file; + zend_string *text; }; struct psi_parser; struct psi_token *psi_token_init(token_t token_typ, const char *token_txt, - size_t token_len, unsigned col, unsigned line, const char *file); -size_t psi_token_alloc_size(size_t token_len, size_t fname_len); + size_t token_len, unsigned col, unsigned line, zend_string *file); struct psi_token *psi_token_copy(struct psi_token *src); void psi_token_copy_ctor(struct psi_token **src); struct psi_token *psi_token_cat(const char *sep, unsigned argc, ...); -struct psi_token *psi_token_prepend(const char *sep, struct psi_token *T, unsigned argc, ...); struct psi_token *psi_token_append(const char *sep, struct psi_token *T, unsigned argc, ...); struct psi_token *psi_token_translit(struct psi_token *T, char *from, char *to); uint64_t psi_token_hash(struct psi_token *t, char *digest_buf);