aboutsummaryrefslogtreecommitdiffhomepage
path: root/lex.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-19 12:28:21 +0200
committerlemon <lsof@mailbox.org>2023-06-19 12:28:37 +0200
commit013e4d624873cd47cc5ef2b801e13e9b669c7ae1 (patch)
tree0988b630f6ca0501d944ce1e9c671fdceaecf8c3 /lex.h
parentb71515071d1310bbf9cd34f8997aa736ebd30099 (diff)
frontend: rename parser -> lexer and document c.c
Diffstat (limited to 'lex.h')
-rw-r--r--lex.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lex.h b/lex.h
index 29b40bb..a8e972f 100644
--- a/lex.h
+++ b/lex.h
@@ -85,8 +85,8 @@ struct macrostack {
};
extern int nerror;
-struct parser {
- struct parser *save;
+struct lexer {
+ struct lexer *save;
short fileid;
const uchar *dat;
uint ndat;
@@ -101,9 +101,9 @@ struct parser {
};
const char *intern(const char *);
-int lex(struct parser *, struct token *);
-int lexpeek(struct parser *, struct token *);
+int lex(struct lexer *, struct token *);
+int lexpeek(struct lexer *, struct token *);
enum typetag parsenumlit(uvlong *, double *, const struct token *, bool ispp);
-void initparser(struct parser *, const char *file, struct arena **);
+void initlexer(struct lexer *, const char *file, struct arena **);
/* vim:set ts=3 sw=3 expandtab: */