Created
November 8, 2018 23:25
-
-
Save atamis/6e8fa93d69a07a6bce8035cf6d9b0a21 to your computer and use it in GitHub Desktop.
Minor usability issue in nimble-parsec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule NimbleParsecTest.MixProject do | |
use Mix.Project | |
def project do | |
[ | |
app: :nimble_parsec_test, | |
version: "0.1.0", | |
elixir: "~> 1.7", | |
start_permanent: Mix.env() == :prod, | |
deps: deps() | |
] | |
end | |
# Run "mix help compile.app" to learn about applications. | |
def application do | |
[ | |
mod: {NimbleParsecTest, []}, | |
extra_applications: [:logger] | |
] | |
end | |
# Run "mix help deps" to learn about dependencies. | |
defp deps do | |
[ | |
{:nimble_parsec, "~> 0.2"} | |
# {:dep_from_hexpm, "~> 0.3.0"}, | |
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}, | |
] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule NimbleParsecTest do | |
use Application | |
import NimbleParsec | |
test = repeat(optional(utf8_char([?a]))) | |
defparsec :test, test | |
def start(_type, _args) do | |
IO.puts("Parsing...") | |
IO.inspect(test("aaaaaa")) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment