Skip to content

docs: fix and expand README - #48

Merged
bzick merged 1 commit into
masterfrom
docs/readme-overhaul
Jul 13, 2026
Merged

docs: fix and expand README#48
bzick merged 1 commit into
masterfrom
docs/readme-overhaul

Conversation

@bzick

@bzick bzick commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Overhaul of readme.md after verifying every example against the actual code (token.go, stream.go, tokenizer.go) and running the doubtful ones through go test.

Fixes (things that were wrong)

  • Non-existent methods: stream.GetInt64() / token.GetFloat64()ValueInt64() / ValueFloat64(); package-level tokenizer.ParseString(...)parser.ParseString(...).
  • Invalid Go: var parser := tokenizer.New()parser := tokenizer.New().
  • Wrong output in the SQL table: token 7 (or) claimed == "and"; fixed alignment and switched string comparisons to ValueUnescapedString().
  • fmt.Print with %dfmt.Printf (%d / %g).
  • Unknown-token example showed "One" for input one!"one".
  • Injection example now matches real output (fragments keep the frame quote and surrounding whitespace).
  • Framed-string example registers the special string so \" actually unescapes to ".

Improvements

  • Added Installation, Table of contents and a Stream API section (many stream/token methods were undocumented).
  • Documented AllowNumberUnderscore(), the longest-match rule, Close(), and the "don't store *Token" caveat.
  • Dropped the misleading "autodetect whitespace" claim (whitespace is configurable, not autodetected).

AGENTS.md

  • Recorded the prose line-wrapping convention: one sentence per line, no mid-sentence hard wraps.

🤖 Generated with Claude Code

Correct wrong API references in the README (ValueInt64/ValueFloat64
instead of the non-existent GetInt64/GetFloat64, valid Go for parser
init, fmt.Printf), align every example with real parser output, and
document the previously undocumented stream/token API. Add a Stream API
reference, installation and table-of-contents sections.

Also record the prose line-wrapping convention in AGENTS.md: one
sentence per line, no mid-sentence hard wraps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bzick
bzick merged commit d3c3309 into master Jul 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant