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

fmt/format-print and "containers" with only whitespace between delims #17

Closed
sogaiu opened this issue Jan 19, 2021 · 0 comments · Fixed by #23
Closed

fmt/format-print and "containers" with only whitespace between delims #17

sogaiu opened this issue Jan 19, 2021 · 0 comments · Fixed by #23

Comments

@sogaiu
Copy link
Contributor

sogaiu commented Jan 19, 2021

fmt/format-print appears to have difficulty with code strings such as:

  • ( )
  • @( )
  • [ ]
  • @[ ]
  • { }
  • @{ }

That is, there are no "elements" and there is at least one whitespace character.

An example invocation is:

repl:1:> (import spork/fmt)
# output elided
repl:2:> (fmt/format-print "[ ]")
error: match error at line 1, column 2
  in peg/match
  in make-tree [/home/user/bin/janet/lib/janet/spork/fmt.janet] on line 53, column 9
  in format-print [/home/user/bin/janet/lib/janet/spork/fmt.janet] on line 181, column 3
  in _thunk [repl] (tailcall) on line 2, column 1

This is with 714c216

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

Successfully merging a pull request may close this issue.

1 participant