Civet
Civet copied to clipboard
indentation issue when using .load from REPL
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.
I've submitted a fix to node https://github.com/nodejs/node/pull/49461
You could build a patched version or wait a couple years for them to merge and release it.