Skip to content

Commit

Permalink
Rework TOML token parsing (#100)
Browse files Browse the repository at this point in the history
* Add bare_key_chars macro to toml

* Added toml test for unquoted keys

* Match toml chars as u32 + remove alnum match logic

Now casting the current toml character to u32 for easier matching
against the values provided in the abnf for toml. Removed the existing
logic for parsing most characters to start again.

* Restore original toml number parsing logic

* Add allow for overlapping toml char pattern lint

* Add toml parse_bare_key method

* Change language from bare_key to ident in toml

* Updated toml key test case

* Implemented toml parse_ident

* Add toml nan/inf todo and removed unused token

* Impl into string for toml token

* Reordered toml number parsing conditionals

* Cleaned up some toml match statements

* Formatted toml token comments and rename macro

* Moved toml number parsing into separate function

* Added guard for ident starting with num toml

* Return err if num contains illegal chars toml

* Added toml ident_term_chars macro

* Fix not pushing chars during inf/nan toml parse

* Start using ident_term_chars to detect inf/nan

* Start using ident_term_chars to detect toml idents

* Add close block char to toml ident_term_chars

* Updated toml key test

* Replaced tomltok into string with from impl

* Removed unnecessary return

* Fixed toml no_std test

* Always match toml chars as char not u32
  • Loading branch information
lkirkwood authored Apr 30, 2024
1 parent a2e35b5 commit 2f538fa
Show file tree
Hide file tree
Showing 2 changed files with 241 additions and 132 deletions.
Loading

0 comments on commit 2f538fa

Please sign in to comment.