aardappel / lobster

The Lobster Programming Language

Home Page:http://strlen.com/lobster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code from Language Reference not working

stefandd opened this issue · comments

def function_type(int) -> int
def g(f:function_type): return 1 + f(2)

as discussed in http://aardappel.github.io/lobster/language_reference.html returns the error:
.lobster(1): error: identifier expected, found: int

Ah yes, there currently needs to be e.g. def function_type(a:int) -> int. We could in theory support the syntax without an identifier, but in the current syntax the parser only knows its a function type one it sees there is no function body.. so I guess for now we'll just fix the docs: c7e82af