Chris Lattner
2810c91dd2
Implement lookup of overloaded values through import decls.
...
Swift SVN r350
2011-04-10 03:35:13 +00:00
Chris Lattner
229141ab80
Start adding support for value overloading. Right now we allow overloaded definitions (at top level only), and name binding just takes the first value of a name.
...
Swift SVN r348
2011-04-10 03:08:27 +00:00
Chris Lattner
5e28a6fcdd
Finally get around to doing a major type system refactoring, where we introduce Type as a "smart pointer" and rename the existing Type class to TypeBase.
...
This prevents use of isa/dyn_cast/etc on Type*'s and means we just pass around Type by value instead of having to use Type* everywhere.
Swift SVN r343
2011-04-05 01:06:57 +00:00
Chris Lattner
5e2346492e
Implement basic "dot syntax" for applying functions to values. size.area now applies size to area when area is defined as a global function.
...
Swift SVN r341
2011-04-02 23:10:55 +00:00
Chris Lattner
7530ec988c
Add a error to reject foo() when foo is not a function type. Previously we allowed it because these are two valid top-level values, but we now reject them because they are almost certainly a bug. This can be disabled by putting a space between them if this is useful for some reason.
...
Swift SVN r339
2011-03-27 02:56:47 +00:00
Chris Lattner
85f67d0fc6
NameBinder shouldn't create exprs, it should return decls.
...
Swift SVN r337
2011-03-27 00:30:24 +00:00
Chris Lattner
c9ee19e269
Implement parser, sema, doc, and name lookup support for refined import declarations. You can still only do top level references, but that's because we don't have namespaces or anything else interesting yet.
...
This allows "import swift.int" for example.
Swift SVN r329
2011-03-23 05:18:29 +00:00
Chris Lattner
aeb7c0895e
The isGroupingParen() predicate doesn't make sense since TupleExpr can be used to create tuple expressions out of a scalar when there is a single element involved. In this case, isGroupingParen would return true but the source and dest types would be different.
...
This didn't manifest as a bug yet, but it doesn't make sense to wait until it does. This aspect of grouping parens is a syntactic issue, so make the creator of TupleExpr specify whether the expr is a grouping paren or not and persist this.
Swift SVN r312
2011-03-22 05:04:48 +00:00
Chris Lattner
024b479b76
Fix a crash on invalid: we can't produce null elements of brace exprs.
...
Swift SVN r297
2011-03-20 07:52:09 +00:00
Chris Lattner
c9eb885752
Introduce top-level expressions and simplify TranslationUnitDecl (and various things that hack on it) by making it hold a single BraceExpr instead of a list of exprs and decls.
...
Swift SVN r293
2011-03-20 06:59:37 +00:00
Chris Lattner
a1e6e7bfc3
implement name binding support (including looking through imports) for types! We can now have a swift standard library.
...
Swift SVN r292
2011-03-20 05:26:50 +00:00
Chris Lattner
cb8884e832
Move error reporting for unresolved types from SemaDecl to NameBinding, where it should be. This requires enhancing TranslationUnitDecl to hold a list of unresolved types.
...
Swift SVN r290
2011-03-20 04:45:06 +00:00
Chris Lattner
097248057f
Add a todo comment, use a note instead of warning in one case.
...
Swift SVN r289
2011-03-20 04:32:13 +00:00
Chris Lattner
204ffac987
Implement import for value names!
...
Swift SVN r288
2011-03-19 19:43:54 +00:00
Chris Lattner
6807ad7fb1
Move some type validity checking to SemaDecl::handleEndOfTranslationUnit, out of NameBinding.
...
Swift SVN r287
2011-03-19 06:41:26 +00:00
Chris Lattner
07b8860f71
Implement name binding for forward referenced values, and diagnose references to undefined decls. This properly implements the rest of name-binding! Since we don't have import statements yet, we don't have to worry about types. SemaDecl still does all the heavy lifting for them.
...
Swift SVN r276
2011-03-17 05:02:50 +00:00
Chris Lattner
1eb17f15dd
Stub out a namebinding pass, fix some crash-on-invalid cases in TypeChecking.
...
Swift SVN r263
2011-03-14 06:07:44 +00:00