Reuh / candran

a Lua dialect and simple preprocessor
MIT License
28 stars 2 forks source link

Error with help on latest stable #4

Closed splitice closed 3 years ago

splitice commented 3 years ago

$ canc -h

Candran 0.14.0 compiler by Reuh
Usage: /usr/local/lib/luarocks/rocks-5.1/candran/0.14.0-1/bin/canc [options] filenames...
Use - instead of filenames to read from the standard input. The output file will be named stdin.lua by default.
Compiler options:
  dest="directory"  where compiled files should be written
  out="name.lua"    output filename. By default, will use the same name as the input file with a .lua extension.
  -print            write to the standard output instead of creating files
  -preprocess       only run the preprocessor
  -compile          only run the compiler
  -parse            only parse the file and prints errors to stdout
  -ast              (for debugging purposes) only parse the files and dump the AST to stdout
  -help or -h       print this text
Default options:
/usr/bin/lua5.1: ...cal/lib/luarocks/rocks-5.1/candran/0.14.0-1/bin/canc:26: bad argument #2 to 'format' (string expected, got boolean)
stack traceback:
        [C]: in function 'format'
        ...cal/lib/luarocks/rocks-5.1/candran/0.14.0-1/bin/canc:26: in main chunk
        [C]: ?
Reuh commented 3 years ago

Fixed with 6f1b2c7. string.format doesn't accept booleans values in Lua 5.1, despite working with LuaJIT and other Lua versions.