summaryrefslogtreecommitdiff
path: root/src/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-30 22:28:59 -0400
committerIan Moffett <ian@osmora.org>2025-09-30 22:28:59 -0400
commit56a20074863641eb994e298afb4b38b27a277406 (patch)
tree1affdfefe02c89f3f7f46c900ebea09baae41f60 /src/sys/include
parentff46d0abedb578dd8babc00ac3139c8e9c71d1fc (diff)
np: lex: Cache last char during parse
Sometimes when parsing while we are scanning for a string, we might loose the last character if we don't save it Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include')
-rw-r--r--src/sys/include/os/np.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sys/include/os/np.h b/src/sys/include/os/np.h
index 3083ee1..5734e69 100644
--- a/src/sys/include/os/np.h
+++ b/src/sys/include/os/np.h
@@ -46,12 +46,14 @@
* @source_size: Source size in bytes
* @line_no: Current line number
* @lex_st: Lexer state
+ * @ccache: Character cache (temporary store for lexer)
*/
struct np_work {
char *source;
size_t source_size;
size_t line_no;
struct lexer_state lex_st;
+ char ccache;
};
/*