From a401b5e2421abe9fe9045f19fda506226b820e1a Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 23 Jun 2019 17:03:19 +0200 Subject: [PATCH] remove old and unused @ syntax --- compiler/parser.v | 30 ------------------------------ http/http_mac.v | 10 +++++----- 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/compiler/parser.v b/compiler/parser.v index c638e9888f..fa9924f05c 100644 --- a/compiler/parser.v +++ b/compiler/parser.v @@ -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}' } diff --git a/http/http_mac.v b/http/http_mac.v index 3bb8f2c304..a80b0427b2 100644 --- a/http/http_mac.v +++ b/http/http_mac.v @@ -5,12 +5,14 @@ module http #include -#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