From ee1a5de91c875fb66724dc21c02333bfebe2a812 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Tue, 1 Feb 2022 18:36:52 +0100 Subject: Add new syntax to lexer and prepare refactor --- src/bytecode/string_view.h | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100755 src/bytecode/string_view.h (limited to 'src/bytecode/string_view.h') diff --git a/src/bytecode/string_view.h b/src/bytecode/string_view.h deleted file mode 100755 index 5977ea9..0000000 --- a/src/bytecode/string_view.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef BDL_STRINGVIEW_H -#define BDL_STRINGVIEW_H - -typedef struct StringView { - char *start; - size_t n; -} StringView; - -// Consume a character in the stream. -char sv_next(StringView *sv); - -// Check what is the current character in the stream. -char sv_peek(const StringView *sv); - -// Compare if the arguments are the same. -bool sv_equal(const StringView *a, const StringView *b); - -// Write a character to the given output stream. -void sv_write(const StringView *sv); - -#define STRING(STR) (StringView){(STR), sizeof(STR) - 1} - -#endif // BDL_STRINGVIEW_H -- cgit v1.2.1