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

[Bug] Repl Multi-Expression Prompts Are Still a Problem #693

Closed
EagleoutIce opened this issue Feb 26, 2024 · 0 comments · Fixed by #722
Closed

[Bug] Repl Multi-Expression Prompts Are Still a Problem #693

EagleoutIce opened this issue Feb 26, 2024 · 0 comments · Fixed by #722
Assignees
Labels
bug Something isn't working cli Refers to a Command Line Interface good first issue Good for newcomers

Comments

@EagleoutIce
Copy link
Member

With #657 we maintain the quotes for shell commands. While this works great for external commands (i.e. those involving another parsing round), :parse - for example - does not. This causes the following, arguably counter-intuitive behavior:

node dist/src/flowr.js 
R> :parse "x <- 2; x * 3"
exprlist
╰ expr
  ╰ STR_CONST "\"x <- 2; x * 3\"" (1:1─1:15)

Now, dropping the quotes yields this (due to the splitting at ; for shell commands):

R> :parse x <- 2; x * 3
exprlist
╰ expr
  ├ expr
  │ ╰ SYMBOL "x" (1:1)
  ├ LEFT_ASSIGN "<-" (1:3─1:4)
  ╰ expr
    ╰ NUM_CONST "2" (1:6)
R process exited with code 1. Restarting...
If you want to exit, press either Ctrl+C twice, or enter :quit
Error: object 'x' not found
Execution halted

R> 

We should 1) only drop quotes if external re-parsing is involved, or 2) find another way to "quote" these inline blocks.

@EagleoutIce EagleoutIce added bug Something isn't working good first issue Good for newcomers cli Refers to a Command Line Interface labels Feb 26, 2024
@EagleoutIce EagleoutIce changed the title [Bug] Repl Multiline Prompts Are Still a Problem [Bug] Repl Multi-Expression Prompts Are Still a Problem Feb 26, 2024
@Ellpeck Ellpeck self-assigned this Mar 14, 2024
@Ellpeck Ellpeck linked a pull request Mar 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Refers to a Command Line Interface good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants