diff --git a/README.md b/README.md index 40f1ee5..3a094ad 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ `NimbleParsec` is a simple and fast library for text-based parser combinators. -Combinators are composed programatically and compiled into multiple +Combinators are composed programmatically and compiled into multiple clauses with binary matching. This provides the following benefits: * Performance: since it compiles to binary matching, it leverages diff --git a/lib/nimble_parsec.ex b/lib/nimble_parsec.ex index ad71681..fa0fc1e 100644 --- a/lib/nimble_parsec.ex +++ b/lib/nimble_parsec.ex @@ -1520,7 +1520,7 @@ defmodule NimbleParsec do **Note:** this can be potentially a very expensive operation as it executes the given combinator byte by byte until finding an eventual match or ultimately failing. For example, if you - are looking for an integer, it is preferrable to discard + are looking for an integer, it is preferable to discard everything that is not an integer ignore(ascii_string([not: ?0..?9])) diff --git a/test/nimble_parsec_test.exs b/test/nimble_parsec_test.exs index 249a44d..ff46687 100644 --- a/test/nimble_parsec_test.exs +++ b/test/nimble_parsec_test.exs @@ -1474,7 +1474,7 @@ defmodule NimbleParsecTest do assert parse_bytes("abc") == {:ok, ["abc"], "", %{}, {1, 0}, 3} end - test "fails if input has insufficent bytes" do + test "fails if input has insufficient bytes" do assert parse_bytes("ab") == {:error, "expected 3 bytes", "ab", %{}, {1, 0}, 0} end end