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

parser: check (mut f Foo) syntax

This commit is contained in:
yuyi
2020-05-17 19:51:18 +08:00
committed by GitHub
parent b138cadbcb
commit 7f4cf08516
87 changed files with 492 additions and 480 deletions

View File

@ -61,7 +61,7 @@ pub fn (v &Values) get_all(key string) []string {
// set sets the key to value. It replaces any existing
// values.
pub fn (v mut Values) set(key, value string) {
pub fn (mut v Values) set(key, value string) {
mut a := v.data[key]
a.data = [value]
v.data[key] = a
@ -70,7 +70,7 @@ pub fn (v mut Values) set(key, value string) {
// add adds the value to key. It appends to any existing
// values associated with key.
pub fn (v mut Values) add(key, value string) {
pub fn (mut v Values) add(key, value string) {
mut a := v.data[key]
if a.data.len == 0 {
a.data = []
@ -81,8 +81,7 @@ pub fn (v mut Values) add(key, value string) {
}
// del deletes the values associated with key.
pub fn (v mut Values) del(key string) {
pub fn (mut v Values) del(key string) {
v.data.delete(key)
v.size = v.data.size
}