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

new enum syntax; update the compiler (p.tok == .name)

This commit is contained in:
Alexander Medvednikov
2019-07-07 22:30:15 +02:00
parent 385f47c0cd
commit 26ef99293d
8 changed files with 835 additions and 834 deletions

View File

@ -28,7 +28,7 @@ fn (p mut Parser) gen_json_for_type(typ Type) {
// println('gen_json_for_type( $typ.name )')
// Register decoder fn
mut dec_fn := Fn {
pkg: p.pkg
pkg: p.mod
typ: 'Option_$typ.name'
name: js_dec_name(t)
}
@ -45,7 +45,7 @@ fn (p mut Parser) gen_json_for_type(typ Type) {
p.table.register_fn(dec_fn)
// Register encoder fn
mut enc_fn := Fn {
pkg: p.pkg
pkg: p.mod
typ: 'cJSON*'
name: js_enc_name(t)
}