summaryrefslogtreecommitdiffstatshomepage
path: root/stm/lexerstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'stm/lexerstr.h')
-rw-r--r--stm/lexerstr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/stm/lexerstr.h b/stm/lexerstr.h
new file mode 100644
index 0000000000..961a70ada4
--- /dev/null
+++ b/stm/lexerstr.h
@@ -0,0 +1,8 @@
+typedef struct _py_lexer_str_buf_t {
+ bool free; // free src_beg when done
+ const char *src_beg; // beginning of source
+ const char *src_cur; // current location in source
+ const char *src_end; // end (exclusive) of source
+} mp_lexer_str_buf_t;
+
+mp_lexer_t *mp_lexer_new_from_str_len(const char *src_name, const char *str, uint len, bool free_str, mp_lexer_str_buf_t *sb);