diff options
| author | Nakidai <nakidai@disroot.org> | 2025-03-23 21:11:13 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2025-03-23 21:11:13 +0300 |
| commit | ad9d6a199db7c28f8b20f131dfb55a26e0e251de (patch) | |
| tree | e5bb112cd902d9c09f5ad79ce98ba8a315d20bbb /include/readchar.h | |
| parent | 159666bae6cc185a5abac154b85c49406f32f30c (diff) | |
| download | 3cl-ad9d6a199db7c28f8b20f131dfb55a26e0e251de.tar.gz 3cl-ad9d6a199db7c28f8b20f131dfb55a26e0e251de.zip | |
Again...
Diffstat (limited to 'include/readchar.h')
| -rw-r--r-- | include/readchar.h | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/include/readchar.h b/include/readchar.h deleted file mode 100644 index e881dcb..0000000 --- a/include/readchar.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __CCL_READCHAR_H__ -#define __CCL_READCHAR_H__ - -#include "3cl.h" - - -/** - * Flags to tell ccl_readchar how to read next character - * - * Bits - * 4 Die if char is not whitelisted - * 3 Brackets - * 2 Instruction symbols - * 1 English alphabet - * 0 Underscore - * - * @see ccl_readchar - */ -enum CCLRCFlags -{ - CCL_RC_DIE = 0b10000, /**< Die if char is not whitelisted */ - CCL_RC_BRACK = 0b01000, /**< Brackes */ - CCL_RC_IS = 0b00100, /**< Instruction symbols */ - CCL_RC_ALP = 0b00010, /**< English alphabet */ - CCL_RC_US = 0b00001, /**< Underscore */ - CCL_RC_VAR = 0b11010, /**< (Used by 3CL) Variable names */ - CCL_RC_CCL_VARUS = 0b11011, /**< (Used by 3CL) Variable names including underscore */ - CCL_RC_CCL_BRACK = 0b01000, /**< (Used by 3CL) Brackets */ - CCL_RC_CCL_INSTR = 0b11111, /**< (Used by 3CL) Instruction */ -}; - -/** - * Function to read next character - * Skips whitespace and comments, returns '\0' if reaches EOF - * ccl_readchar will die on invalid symbol (e.g. cyrillic one) even if CCL_RC_DIE is set - * @see CCLRCFlags - * @param ccl CCL instance - * @param frame Current frame - * @param flags CCLRCFlags - * @return Next character - */ -char ccl_readchar(struct CCL *ccl, struct CCLFrame *frame, enum CCLRCFlags flags); - -#endif /* __CCL_READCHAR_H__ */ |