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

REPL fixes (depends on #598) #599

Merged
merged 3 commits into from
Feb 16, 2023
Merged

REPL fixes (depends on #598) #599

merged 3 commits into from
Feb 16, 2023

Conversation

jamsilva
Copy link
Contributor

@jamsilva jamsilva commented Feb 7, 2023

Well detailed description of the change :

This corrects multiline statements in the REPL in 2 ways:

  1. The combined multiline string is now always null-terminated - for example, copying the contents of fibonacci.du would previously cause an 'Unexpected character' error.
  2. The lines have newlines separating them, so the error messages show the line number of the error. The following error would previously show line 1 for everything.
>>> {
... {
... 'a'
... }
... }
Error: File 'repl', line 4
       4 | }
       Expect ';' after expression.

Error: File 'repl', line 5
       Error at end: Expect '}' after block.

Error: File 'repl', line 5
       Error at end: Expect '}' after block.

The string literal and brace matching code was also changed to act more like the way a parser would do it.

Type of change:

  • Bug fix

@Jason2605
Copy link
Member

This is really great, thank you very much for this!

@Jason2605 Jason2605 merged commit 6fc50b3 into dictu-lang:develop Feb 16, 2023
@Jason2605 Jason2605 mentioned this pull request Feb 17, 2023
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

Successfully merging this pull request may close these issues.

2 participants