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

Some escape sequences cause the repl to enter in a broken state #92

Open
hjek opened this issue Dec 27, 2017 · 4 comments
Open

Some escape sequences cause the repl to enter in a broken state #92

hjek opened this issue Dec 27, 2017 · 4 comments

Comments

@hjek
Copy link
Contributor

hjek commented Dec 27, 2017

Evaluating an expression with an "unkown escape sequence" can cause the interpreter to enter a broken state where subsequently entered expressions are evaluated wrong,

arc> (pr "\^foo")
UNKNOWN::4: read: unknown escape sequence \^ in string
  context...:
   /home/pelle/anarki/ac.scm:1276:4

arc> _foo: undefined;
 cannot reference an identifier before its definition
  in module: "/home/pelle/anarki/ac.scm"
  context...:
   /home/pelle/anarki/ac.scm:1276:4

arc> (pr "bar")
")\n(pr "
arc> _bar: undefined;
 cannot reference an identifier before its definition
  in module: "/home/pelle/anarki/ac.scm"
  context...:
   /home/pelle/anarki/ac.scm:1276:4
@akkartik
Copy link
Member

Yes I've seen this as well. Thanks for capturing the bug.

@hjek
Copy link
Contributor Author

hjek commented Dec 27, 2017

It's also an issue in the Racket repl.

@akkartik
Copy link
Member

Ah, yes I think I did figure that out at some point.

@rocketnia
Copy link
Member

Hmm, would it be a better idea to discard the rest of the available input if there's a read error? Or maybe just the rest of the line?

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

No branches or pull requests

3 participants