technique-lang/technique

Trailing whitespace not being consumed, resulting in not seeing unexpected newline

Closed this issue · 0 comments

The input technique:

% technique v0
! AllRightsReserved; (c) 1979 Douglas Adams

    question q,p : Question,People -> 
    {
        ...

results in this error

tests/Broken.t:4:39-40

    question q,p : Question,People -> 
                                      ^^

unexpected "
 "
expecting a valid type.

It really ought to say

unexpected newline

but it's not because it's getting ' ' '\n' rather than the single character which would trigger the special case in Technique.Failure. Not sure what to do about it; this is going to be intimately tied to the space consuming code in Technique.Parser. That space character should have been discarded, leaving unexpected newline?