-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
James.yang/lexer refactor #11
Conversation
…been constructed properly
…ing begin comment tags
50de6bc
to
150bb43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really awesome! The big changes are to change to processing one token at a time (the process
function should just return a Token
), and to change the file_reader
to take a FILE *
and not worry about opening/closing.
status_.tokens.reserve(DEFAULT_TOKEN_ARR_SIZE); | ||
} | ||
|
||
void process() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change the lexer to process one token at a time!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the things we've talked about
@@ -0,0 +1,300 @@ | |||
#pragma once | |||
#include "token.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make these includes relative paths from src/
BEGIN_BLOCK_COMMENT, | ||
END_BLOCK_COMMENT, | ||
// special tags | ||
TAGNAME, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need symbols for each tag individually mb :'(
Closing this PR for now since we're moving towards Trie implementation. See #13 |
First draft of lexer.