before, but removing the hack where we'd represent them as a binary operator
with a null operator function. We still have no clear semantics for what
is valid or not.
Swift SVN r478
func is sugar for. Unfortunately, we can't use 'func' without introducing ambiguity
since decls and exprs can exist in the same context, I'm not wed to 'lambda' as the
keyword, thoughts welcome.
Swift SVN r467
to func exprs. All the tests pass again. Now we have a strict equality
between:
func foo(a : int) -> int { a+1 }
and
var foo = func(a : int) -> int { a+1 }
except we don't support the later syntax yet. We also really need return, though
we're getting closer to being able to usefully support it.
Swift SVN r466
annoying things from the grammar (like expr-non-brace), and makes it so that
the body/else of an if is just a statement.
This patch has a fairly serious caveat that we just drop function bodies on the
floor now, since we have no "stmtexpr" sort of thing to represent the syntactic
sugar that is func. We'll fix that soon.
Swift SVN r462
where you can optionally declare a receiver type. This is cleaner both conceptually
and in implementation, and eliminates drug references. :)
Swift SVN r444
is no AST building or typechecking support yet. Document the intended
semantics in LangRef. This is clearly subject to change, but is a starting
point.
Swift SVN r393
2. This exposed a bug: when parsing structs, we weren't adding all decls to the translation unit, we were just adding the type alias.
3. This exposed that TypeChecking wasn't handling OneOfElementDecl.
4. Introduce a new NLKind enum in NameLookup instead of passing around a bool.
5. Have unqualified lookup that returns an overload set form a new OverloadSetRefExpr, which has dependent type.
6. Enhance various stuff to handle OverloadSetRefExpr. It's still not fully handled yet though, so it can't be used for anything useful.
7. Change Expr.cpp to print types with << instead of T->print(OS) which is simpler and correct in the face of null.
Swift SVN r351
#1: Change type conversion errors to print the types involved, making the diagnostic better. We still don't have ranges, but it is progress.
#2: Reimplement support for anonymous closure arguments (e.g. func($0+$1)) where func takes a closure, step #1.
- This removes AnonDecl, replacing it with AnonClosureArgExpr. $0 and friends have to be expressions since they don't get a type and don't get resolved until TypeChecking.
- For now we just replace the existing broken support, a future step is to implement type checking support for them.
Swift SVN r278
Highlights of this include:
1) most of SemaExpr is gone now, when parsing, all expressions are assigned null types.
2) the introduction of a new TypeChecking pass, which assigns types to expressions, and checks their constraints.
3) ElementRefDecl now properly stores an access path for what it is accessing, and ElementRefDecl's get added to the AST.
4) The parser is much much simpler for expressions now, it just collects lists of primary exprs into SequenceExprs unconditionally.
5) This means that formation of binary expressions, function application etc is now done by TypeChecking. This is actually simpler, though admittedly surprising.
6) This introduces a new -parse-dump mode which just parses but does not perform name binding or type checking.
I've been working on this for a while and it is still quite broken: it still doesn't handle anondecls at all, doesn't perform conversion checking for default tuple elements, has missing pieces of varname name binding etc. However, there is no reason to not crash land it now, it's not like I'm going to break anyone else.
Swift SVN r262