Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

indentation issue when using .load from REPL #509

Open
fulverin opened this issue Apr 22, 2023 · 1 comment
Open

indentation issue when using .load from REPL #509

fulverin opened this issue Apr 22, 2023 · 1 comment

Comments

@fulverin
Copy link

fulverin commented Apr 22, 2023

Hi,
so here it is , on linux.

  • from shell :
    $ civet file.civet
    works fine
  • copy pasting line from editor into civet REPL works too
  • but loading it with load from REPL handle indentations wrongly
    $civet
🐱> .load testing.civet
enum Direction
  Up
    Down
      Left = 2 * Down
      
... 
ParseError: REPL14:3:5 Failed to parse
Expected: ...

source file :

enum Direction
  Up
  Down
  Left = 2 * Down
  Right = 2 * Left

well you can imagine what happen with bigger nested code.
also .help says that .load is for loading js files (behavior is the same) I am not sure if it is true.

@STRd6
Copy link
Contributor

STRd6 commented Sep 2, 2023

I've submitted a fix to node nodejs/node#49461

You could build a patched version or wait a couple years for them to merge and release it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants