diff --git a/examples_test.go b/examples_test.go index c031f8b..b2140bc 100644 --- a/examples_test.go +++ b/examples_test.go @@ -119,6 +119,14 @@ func Example_minimalAnnotated() { } func Example_minimal() { + // Let's write a small example for parsing a really basic calculator. + // The calculator understands input that looks like: + // + // 10 + 20 - 8+4 + // + // So positive numbers that can be either added or substracted, with + // optional whitespace around the operators. + var c, a, m = parsekit.C, parsekit.A, parsekit.M var number = c.OneOrMore(a.Digit)