vlang/c2v

Unhandled expr() node {WhileStmt}

JalonSolov opened this issue · 2 comments

To reproduce:

  1. git clone http://git.ghostscript.com/mujs.git
  2. cd mujs
  3. v translate .

What I see:

$ v translate .
C to V translator 0.3.1
"." is a directory, processing all C files in it recursively...

  translating ./jsnumber.c    ... c2v_output/jsnumber.v:77:21: error: unexpected token `*`, expecting `,`
   75 | 
   76 | [c2v_variadic]
   77 | fn sprintf(__s Char *restrict, __format Char *restrict) int
      |                     ^
   78 | 
   79 | fn putc(__c int, __stream &C.FILE) int

Internal vfmt error while formatting file: /home/jamie/git/mujs/./c2v_output/jsnumber.v.
Encountered a total of: 1 errors.
 took   196 ms ; output .v file: ./c2v_output/jsnumber.v
  translating ./jscompile.c   ... 

Unhandled expr() node {WhileStmt} (ast line nr node.ast_line_nr "./jscompile.c"):
{WhileStmt} name:"" value:"" loc:Loc{
    offset: 0
    file: ''
    line: 0
    col: 0
    tok_len: 0
    included_from: IncludedFrom{
        file: ''
    }
    spelling_loc: IncludedFrom{
        file: ''
    }
    range: Range{
        begin: Begin{
            spelling_loc: IncludedFrom{
                file: ''
            }
        }
    }
}  #c: 2 typ:""
/tmp/v_1000/../../../../../../home/jamie/git/v/vlib/builtin/builtin.c.v:650: at print_backtrace: Backtrace
/tmp/v_1000/../../../../../../home/jamie/git/c2v/src/c2v.v:1775: by main__C2V_expr
/tmp/v_1000/../../../../../../home/jamie/git/c2v/src/c2v.v:1083: by main__C2V_if_statement
/tmp/v_1000/../../../../../../home/jamie/git/c2v/src/c2v.v:999: by main__C2V_statement
/tmp/v_1000/../../../../../../home/jamie/git/c2v/src/c2v.v:979: by main__C2V_statements
/tmp/v_1000/../../../../../../home/jamie/git/c2v/src/c2v.v:474: by main__C2V_fn_decl
/tmp/v_1000/../../../../../../home/jamie/git/c2v/src/c2v.v:2044: by main__C2V_top_level
/tmp/v_1000/../../../../../../home/jamie/git/c2v/src/c2v.v:2001: by main__C2V_translate_file
/tmp/v_1000/../../../../../../home/jamie/git/c2v/src/c2v.v:1929: by main__main
/tmp/v_1000/../../../../../../tmp/v_1000/c2v.tmp.c:18285: by main
C2V command: '/home/jamie/.vmodules/c2v/c2v' '.'
C2V failed to translate the C files. Please report it via GitHub.
$

I get a 403 error code by accessing that link

Sad. I get the same thing, now. The tar file can be downloaded from https://mujs.com/downloads/