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

remove old and unused @ syntax

This commit is contained in:
Alexander Medvednikov 2019-06-23 17:03:19 +02:00
parent 8b08bf636a
commit a401b5e242
2 changed files with 5 additions and 35 deletions

View File

@ -157,8 +157,6 @@ fn (p mut Parser) parse() {
// TODO remove imported consts from the language
p.import_statement()
}
case AT:
p.at()
case ENUM:
p.next()
if p.tok == NAME {
@ -3000,34 +2998,6 @@ fn (p mut Parser) return_st() {
p.returns = true
}
fn (p mut Parser) at() {
vals := p.lit.split(' ')
if vals.len != 2 {
p.error('Bad @ syntax (type name)')
}
typ := vals[0]
// name := vals[1]
if !p.table.known_type(typ) {
p.table.register_type(typ)
}
// if p.fn == "" {
// p.table.registerVar(&Var{
// Name: name,
// Type: typ,
// Cat: CatFunc,
// })
// } else {
//
// fn := p.table.findVar(p.fn)
// p.table.registerFnVar(&Var{
// Name: name,
// Type: typ,
// Cat: CatVar,
// }, fn)
// }
p.next()
}
fn prepend_pkg(pkg, name string) string {
return '${pkg}__${name}'
}

View File

@ -5,12 +5,14 @@
module http
#include <curl/curl.h>
#flag windows -I/usr/local/opt/curl/include
#flag darwin -lcurl
#flag windows -lcurl
#flag linux -lcurl
@size_t kek
@CURL* curl_easy_init
fn C.curl_easy_init() *C.CURL
fn foo() {}
type wsfn fn (s string, ptr voidptr)
struct MemoryStruct {
@ -38,8 +40,6 @@ import const (
CURLE_OK
)
// type C.CURLcode {
// }
fn C.curl_easy_strerror(curl voidptr) byteptr
fn C.curl_easy_perform(curl voidptr) C.CURLcode