Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Parser.LanguageKit.whitespace with allowTabs=True has infinite recursion #18

Open
dave-doty opened this issue Jul 28, 2017 · 0 comments
Labels

Comments

@dave-doty
Copy link

The following is executed in elm-repl v0.18. The first two calls with allowTabs=False terminate as expected (although I'm confused as to why "\t" has a positive match when allowTabs=False), but the next two calls with allowTabs=True cause what is apparently an infinite recursion:

> import Parser exposing (..)
> import Parser.LanguageKit exposing (..)
> run (whitespace { allowTabs=False, lineComment=NoLineComment, multiComment=NoMultiComment } ) " "
Ok () : Result.Result Parser.Error ()
> run (whitespace { allowTabs=False, lineComment=NoLineComment, multiComment=NoMultiComment } ) "\t"
Ok () : Result.Result Parser.Error ()
> run (whitespace { allowTabs=True, lineComment=NoLineComment, multiComment=NoMultiComment } ) " "
RangeError: Maximum call stack size exceeded
> run (whitespace { allowTabs=True, lineComment=NoLineComment, multiComment=NoMultiComment } ) "\t"
RangeError: Maximum call stack size exceeded
@evancz evancz added the problem label May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants