Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Need better error message when invalid escape sequence present #159

Open
maowtm opened this issue Mar 5, 2022 · 1 comment
Open

Need better error message when invalid escape sequence present #159

maowtm opened this issue Mar 5, 2022 · 1 comment

Comments

@maowtm
Copy link
Contributor

maowtm commented Mar 5, 2022

a :- run("aaaaa\1bbbbbb").

Results in

error: expected "\""
  ┌─ Modusfile:1:11
  │
1 │ a :- run("aaaaa\1bbbbbb").
  │ ----------^
  │ │    │   │ 
  │ │    │   in section "modus_const"
  │ │    in section "rule_body"
  │ in section "rule"

This become very unclear if the string is very long (like a multi-line run command)

@thevirtuoso1973
Copy link
Contributor

image

Now it points to the problematic escape char at least. I think we can still improve by printing the possible escape chars, so I'll leave this issue open for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants