• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / jasengo / 19393309254
81%

Build:
DEFAULT BRANCH: main
Ran 15 Nov 2025 05:39PM UTC
Jobs 1
Files 7
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Nov 2025 05:39PM UTC coverage: 88.475% (+13.8%) from 74.667%
19393309254

push

github

web-flow
feat: Add worked example + some needed parser combinators (#3)

* feat: Add worked example + some needed parser combinators

Introduce several common parser primitives and combinators
essential for building practical parsers.

New primitives in `basic.go`:
*   `Lower`, `Upper`: Match corresponding character types.
*   `Whitespace`: Matches spaces, tabs, newlines.
*   `Return`: Lifts a value into a successful parser result.

New combinators in `combinators.go`:
*   `Token`, `Symb`: Handle tokenizing and symbol matching,
    consuming trailing whitespace automatically.
*   `Left`, `Right`, `Between`: Control result selection in sequence.
*   `Rec`: Enables definition of recursive parsers.
*   `SepBy1`: Parses one or more items separated by a delimiter.

A new test (`TestSearchGrammar`) demonstrates the usage of
these tools to parse complex boolean search expressions.

* test: Rename TestSearchGrammar

* Update parser_test/example1_test.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* refactor: Abstract binary expression parsing logic

Introduces `buildExprParser` to DRY up the construction of
precedence chains (like `AND` and `OR` expressions) in the
example parser test file.

This change also:
*   Includes `parser.Upper()` in the definition of
    `alphaNum` tokens, allowing uppercase words in expressions.
*   Fixes a typo in the description of `Upper()`:
    "upperrcase letter" -> "uppercase letter".

* refactor: Use concrete AST nodes for parser output

Introduces dedicated Abstract Syntax Tree (AST) structures for
boolean search expressions (`AndNode`, `OrNode`, `NotNode`,
`TermNode`).

Updates `example1_test.go` to use these specific types instead
of generic `any` or `[]any` for representing the parsed output.
This improves type safety and readability.

* refactor: Rename `Symb` to `Symbol`

The parser combinator function `Symb` has been renamed to
`Symbol` to improve clarity and API consis... (continued)

58 of 70 new or added lines in 3 files covered. (82.86%)

261 of 295 relevant lines covered (88.47%)

1.05 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
94.55
35.02% parser/basic.go
4
86.67
parser_test/ast/ast.go
5
86.3
5.63% parser/combinators.go
Jobs
ID Job ID Ran Files Coverage
1 19393309254.1 15 Nov 2025 05:39PM UTC 7
88.47
GitHub Action Run
Source Files on build 19393309254
  • Tree
  • List 7
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 12b54f2b on github
  • Prev Build on main (#19392413278)
  • Next Build on main (#19393388616)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc