remove old and unused @ syntax
parent
8b08bf636a
commit
a401b5e242
|
@ -157,8 +157,6 @@ fn (p mut Parser) parse() {
|
||||||
// TODO remove imported consts from the language
|
// TODO remove imported consts from the language
|
||||||
p.import_statement()
|
p.import_statement()
|
||||||
}
|
}
|
||||||
case AT:
|
|
||||||
p.at()
|
|
||||||
case ENUM:
|
case ENUM:
|
||||||
p.next()
|
p.next()
|
||||||
if p.tok == NAME {
|
if p.tok == NAME {
|
||||||
|
@ -3000,34 +2998,6 @@ fn (p mut Parser) return_st() {
|
||||||
p.returns = true
|
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 {
|
fn prepend_pkg(pkg, name string) string {
|
||||||
return '${pkg}__${name}'
|
return '${pkg}__${name}'
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
module http
|
module http
|
||||||
|
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#flag windows -I/usr/local/opt/curl/include
|
|
||||||
#flag darwin -lcurl
|
#flag darwin -lcurl
|
||||||
#flag windows -lcurl
|
#flag windows -lcurl
|
||||||
#flag linux -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)
|
type wsfn fn (s string, ptr voidptr)
|
||||||
|
|
||||||
struct MemoryStruct {
|
struct MemoryStruct {
|
||||||
|
@ -38,8 +40,6 @@ import const (
|
||||||
CURLE_OK
|
CURLE_OK
|
||||||
)
|
)
|
||||||
|
|
||||||
// type C.CURLcode {
|
|
||||||
// }
|
|
||||||
fn C.curl_easy_strerror(curl voidptr) byteptr
|
fn C.curl_easy_strerror(curl voidptr) byteptr
|
||||||
|
|
||||||
fn C.curl_easy_perform(curl voidptr) C.CURLcode
|
fn C.curl_easy_perform(curl voidptr) C.CURLcode
|
||||||
|
|
Loading…
Reference in New Issue