vlang / c2v

C/C++ to V translator
GNU General Public License v3.0
227 stars 31 forks source link

Block comment cause `translate` to fail #3

Open ArtemkaKun opened 2 years ago

ArtemkaKun commented 2 years ago

Flecs repo - https://github.com/SanderMertens/flecs V 0.2.4 (fe673e7 commit)

Error message

[🔴] × v translate ~/Projects/KolciaEngine/flecs-v/
C to V translator 0.3.1
"/home/yuart/Projects/KolciaEngine/flecs-v/" is a directory, processing all C files in it recursively...

  translating ./flecs.c       ...

Unhandled expr() node {FullComment} (ast line nr node.ast_line_nr "./flecs.c"):
{FullComment} name:"" value:"" loc:Loc{
    offset: 120754
    file: ''
    line: 3883
    col: 4
    tokLen: 0
    included_from: IncludedFrom{
        file: './flecs.c'
    }
    spelling_loc: IncludedFrom{
        file: ''
    }
    range: Range{
        begin: Begin{
            spelling_loc: IncludedFrom{
                file: ''
            }
        }
    }
}  #c: 1 typ:""
/tmp/v_1000/../../../../../../home/yuart/Projects/v/vlib/builtin/builtin.c.v:639: at print_backtrace: Backtrace
/tmp/v_1000/../../../../../../home/yuart/.vmodules/c2v/c2v.v:2013: by main__C2V_expr
/tmp/v_1000/../../../../../../home/yuart/.vmodules/c2v/c2v.v:1711: by main__C2V_global_var_decl
/tmp/v_1000/../../../../../../home/yuart/.vmodules/c2v/c2v.v:2318: by main__C2V_top_level
/tmp/v_1000/../../../../../../home/yuart/.vmodules/c2v/c2v.v:2271: by main__C2V_translate_file
/tmp/v_1000/../../../../../../home/yuart/.vmodules/c2v/c2v.v:2196: by main__main
/tmp/v_1000/../../../../../../tmp/v_1000/c2v.tmp.c:17588: by main
C2V failed to translate the C files. Please report it via GitHub.
ArtemkaKun commented 2 years ago

This is error from comment */ ... */ comments, with removed comments translation works