1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v2: the new parser can now parse the entire V compiler

This commit is contained in:
Alexander Medvednikov
2020-02-18 17:29:47 +01:00
parent 4de8d3ae8c
commit 4e9bfa95ec
6 changed files with 43 additions and 16 deletions

View File

@ -396,5 +396,10 @@ fn (cflags []CFlag) msvc_string_flags() MsvcStringFlags {
lpaths << '/LIBPATH:"' + os.realpath(l) + '"'
}
return MsvcStringFlags{
real_libs,inc_paths,lpaths,other_flags}
real_libs:real_libs
inc_paths:inc_paths
lib_paths:lpaths
other_flags:other_flags
}
}

View File

@ -90,7 +90,9 @@ struct ScanRes {
fn scan_res(tok TokenKind, lit string) ScanRes {
return ScanRes{
tok,lit}
tok:tok
lit:lit
}
}
fn (s mut Scanner) ident_name() string {
@ -127,7 +129,8 @@ fn filter_num_sep(txt byteptr, start int, end int) string {
i++
}
b[i1]=0 // C string compatibility
return string{b,i1}
return string{str:b
len:i1}
}
}