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

@@ -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}
}
}