Skip to content

Unhelpful error message #22

@zkessin

Description

@zkessin

If you have a file like this example where there is not a trailing newline erlog will give you a compile time error about "Operator expected" when what it really wants is a \n at the end of the last line of code. We should make it ether just compile it without the \n or at least provide a more useful error message

%-*-prolog-*-

sum_to(1,1) :- !.
sum_to(N, Res) :-
    N1 is N - 1,
    sum_to(N1, Res1),
    Res is Res1 + N.

test(_File) :-
    sum_to(5,15).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions