Skip to content
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

Initial template literal lexer implementation #254

Closed
wants to merge 3 commits into from

Conversation

croraf
Copy link
Contributor

@croraf croraf commented Feb 19, 2020

Starting to implement. Would like this to be merged now.

@croraf
Copy link
Contributor Author

croraf commented Feb 19, 2020

I also slipped in a move of self.next() into the match of the lexer itself.

In the first commit there is one line related to this:

ch if ch.is_alphabetic() || ch == '$' || ch == '_' => {

And the rest is in the second commit.

@croraf
Copy link
Contributor Author

croraf commented Feb 19, 2020

So this PR consists of two separate things. 1 is start of implementation of template literal, 2 is putting the self.next inside the match construct.

@croraf croraf changed the title Initial template litteral lexer implementation Initial template literal lexer implementation Feb 21, 2020
@jasonwilliams
Copy link
Member

@croraf this would need some tests to show it working

@croraf croraf force-pushed the template_literal_lexer branch from 04185b4 to f588e49 Compare March 7, 2020 10:40
@croraf
Copy link
Contributor Author

croraf commented Mar 7, 2020

I added 2 tests.

@jasonwilliams
Copy link
Member

@croraf thanks, I’ll have a play with this

@Razican Razican added the enhancement New feature or request label Apr 1, 2020
@croraf
Copy link
Contributor Author

croraf commented Jun 5, 2020

I will soon close this and split in 2 PRs.

@Razican Razican added the lexer Issues surrounding the lexer label Jun 6, 2020
@Razican
Copy link
Member

Razican commented Jun 11, 2020

I think the template lexing has been implemented in #455, right? Can we close this?

@croraf
Copy link
Contributor Author

croraf commented Jun 11, 2020

I wanted to do a minor refactor of lexer that is present as part of this PR but otherwise the PR is obsolete.

@croraf
Copy link
Contributor Author

croraf commented Jun 13, 2020

From this obsolete PR the only thing that remains is the small refactor of the match construct in main lexer loop. Instead of getting the next character before match I put it as a part of the match. Check "boa/src/syntax/lexer/mod.rs" in the changed files.

If you like it I will make a separate PR with it?

@Razican
Copy link
Member

Razican commented Jun 14, 2020

If you like it I will make a separate PR with it?

All that will soon change with #432. I think it's best to invest on that by doing PRs to that branch :)

@croraf
Copy link
Contributor Author

croraf commented Jun 14, 2020

@Razican I thought so. I will close this then.

@croraf croraf closed this Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lexer Issues surrounding the lexer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants