Civet icon indicating copy to clipboard operation
Civet copied to clipboard

indentation issue when using .load from REPL

Open fulverin opened this issue 2 years ago • 1 comments

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.

fulverin avatar Apr 22 '23 17:04 fulverin

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.

STRd6 avatar Sep 02 '23 18:09 STRd6