Test lexer / remove unused functionality
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 50/100
Research direction
Start with next_word in parser/lexer/mod.rs and its doc comment, which describes where the pointer lands for forward and backward moves. Find the callers of next, peek and back to see how the lexer is exercised, then add unit tests for next_word covering both directions. Done when the tests pass and check the documented pointer behaviour. Whether to remove back() is unresolved, so confirm with the maintainers before deleting it.
Written by the indexing model from the issue text.
Description
Generally need tests for the lexer module.
next_word in parser/lexer/mod.rs:
/// Used by next, peek and back - returns substring and new position
/// If forward, places pointer at the next non-whitespace character.
/// If backward, places pointer at the start of the current word.
Needs a test to validate this.
And I don't think that the "previous lexeme"/back functionality is used anyway. Anyway - where back() is used, we can probably use peek() instead.
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 151
- Avg merge
- 31m
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pdf-rs/pdf
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 18/100
-
PDF/a SupportOpen
Difficulty 5/5 Over a week Newbie friendliness 8/100
-
Difficulty 3/5 Half a day Newbie friendliness 15/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
ci javascript tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jonathanong/no-mistakes#3258 ·
Maintainers usually reply within 1 day
-
Add to bmi docsOpen
Difficulty 1/5 Under an hour Newbie friendliness 72/100
eWaterCycle/bmi-rust#2 ·
-
area: cpu-engines area: fuzzer good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
hffgzktbcc-blip/ounce-core#402 ·
Maintainers usually reply within 1 day
-
compiler
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
HerringtonDarkholme/hd-lang#1699 ·
Maintainers usually reply within 1 day