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

Lexer: keep the lines in lex #14

Open
yuanbohan opened this issue Dec 19, 2022 · 0 comments
Open

Lexer: keep the lines in lex #14

yuanbohan opened this issue Dec 19, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@yuanbohan
Copy link
Collaborator

LRNonStreamingLexer needs to keep the lines information.

yuanbohan added a commit that referenced this issue Dec 19, 2022
- don't expose some public methods
- refactor test cases

Reviewer: @evenyag
Refs: #14 #15
@yuanbohan yuanbohan self-assigned this Dec 19, 2022
@yuanbohan yuanbohan added the enhancement New feature or request label Dec 19, 2022
evenyag pushed a commit that referenced this issue Dec 21, 2022
* feat(lex): skeleton

* refactor(lexer): use enum instead of trait object

* lex: keyword_or_identifier

* fix(ctx): pos, start, peek logic

* refactor: fn -> Fn

* refactor: move shift into Lexer

* lexer: accept_string

* lexer: duration, lable_selector

* example: make example work with lexer

* test: common test done

* test(lex): more test cases

* test(lex): unbalanced parentheses

* test(lexer): subquery

* test(lexer): more cases

* test: token and production fn

* misc(lex): modification based on review comments

- don't expose some public methods
- refactor test cases

Reviewer: @evenyag
Refs: #14 #15

* misc(lex): revision based on review comment

- func in token mod, directly use match arms
- use char default method, instead of a hashmap
- use for loop to asset_eq!(left, right) instead of assert!(all)

reviewer: @evenyag

* misc(lex): use const instead of lazy_static

* perf(token): use hashmap instead of match on &str

* fix(lex): potential panic try to dec depth when depth is less than 1

* misc(lex): use usize instead of u8 for paren_depth

* feat(lex): to check if backup is at the beginning of input

* comment(lex): typo
waynexia pushed a commit that referenced this issue Feb 13, 2023
* feat(lex): skeleton

* refactor(lexer): use enum instead of trait object

* lex: keyword_or_identifier

* fix(ctx): pos, start, peek logic

* refactor: fn -> Fn

* refactor: move shift into Lexer

* lexer: accept_string

* lexer: duration, lable_selector

* example: make example work with lexer

* test: common test done

* test(lex): more test cases

* test(lex): unbalanced parentheses

* test(lexer): subquery

* test(lexer): more cases

* test: token and production fn

* misc(lex): modification based on review comments

- don't expose some public methods
- refactor test cases

Reviewer: @evenyag
Refs: #14 #15

* misc(lex): revision based on review comment

- func in token mod, directly use match arms
- use char default method, instead of a hashmap
- use for loop to asset_eq!(left, right) instead of assert!(all)

reviewer: @evenyag

* misc(lex): use const instead of lazy_static

* perf(token): use hashmap instead of match on &str

* fix(lex): potential panic try to dec depth when depth is less than 1

* misc(lex): use usize instead of u8 for paren_depth

* feat(lex): to check if backup is at the beginning of input

* comment(lex): typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant