Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't parse tables whose names start with nonzero numbers #8

Open
Thimoteus opened this issue Aug 22, 2022 · 0 comments
Open

Can't parse tables whose names start with nonzero numbers #8

Thimoteus opened this issue Aug 22, 2022 · 0 comments

Comments

@Thimoteus
Copy link

My minimal failing example is as follows:

module Main

import Language.TOML

fails : String
fails = """
[1-hello-world]
hi = "hi"
bye = "bye"
"""

works : String
works = """
[0-hello-world]
hi = "hi"
bye = "bye"
"""

parse : String -> String -> IO ()
parse strname toParse =
  case parseTOML toParse of
    Left err => do
      putStrLn "Error parsing \{strname}"
      putStrLn $ show err
    Right _ => putStrLn "Success parsing \{strname}"

main : IO ()
main = do
  parse "fails" fails
  parse "works" works

The output is

Error parsing fails
Parse error: ["0:0--0:1: Expected end of input"]
Success parsing works

I'm using Idris2 on commit e29e2289e78167858b45882d4dc8597d531b9478 and pack on commit 588b208edd278b314206f83a58a473e6b334f75d

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

No branches or pull requests

1 participant