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

cache string.hash()

This commit is contained in:
Alexander Medvednikov
2019-07-10 09:48:10 +02:00
parent 2ab1ad8b30
commit 28843a12c7
7 changed files with 15 additions and 21 deletions

View File

@ -49,11 +49,6 @@ enum Pass {
main
}
fn mykek(o OS) {
}
struct V {
mut:
os OS // the OS to build for

View File

@ -2301,7 +2301,7 @@ fn (p mut Parser) array_init() string {
name := p.check_name()
if p.table.known_type(name) {
p.cgen.cur_line = ''
p.gen('{} /* arkek init*/')
p.gen('{}')
return '[$lit]$name'
}
else {

View File

@ -314,8 +314,8 @@ fn (s mut Scanner) scan() ScanRes {
case `$`:
return scan_res(.dollar, '')
case `}`:
// s = `hello $name kek`
// s = `hello ${name} kek`
// s = `hello $name !`
// s = `hello ${name} !`
if s.inside_string {
s.pos++
// TODO UN.neEDED?

View File

@ -32,7 +32,7 @@ mut:
fields []Var
methods []Fn
parent string
func Fn // For cat == FN (type kek fn())
func Fn // For cat == FN (type myfn fn())
is_c bool // C.FI.le
is_interface bool
is_enum bool