summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l8
1 files changed, 8 insertions, 0 deletions
diff --git a/parser.l b/parser.l
index f7c717e8..4739dd59 100644
--- a/parser.l
+++ b/parser.l
@@ -960,6 +960,14 @@ void end_of_char(scanner_t *yyg)
yy_pop_state(yyg);
}
+void reset_scanner(scanner_t *yyg)
+{
+ while (YYSTATE != INITIAL)
+ yy_pop_state(yyg);
+
+ yy_flush_buffer(YY_CURRENT_BUFFER, yyg);
+}
+
val source_loc(val form)
{
return gethash(form_to_ln_hash, form);