Commit Graph

2431 Commits

Author SHA1 Message Date
Chris Lattner
a7c7d64fa0 Switch swift to use SourceLoc instead of SMLoc.
Also use the new getAdvancedLoc() method instead of hacking
on SMLoc directly.

Also fix the warning/note/error methods to forward through ASTContext
instead of being replicated everywhere.



Swift SVN r750
2011-10-18 01:22:29 +00:00
John McCall
f121bd5e2d Arbitrary-associativity operator precedence parsing.
Swift SVN r743
2011-09-29 01:31:16 +00:00
Doug Gregor
3d15bf3d55 Introduce a diagnostic-formatting engine and port most of the parser's
diagnostics over to it.

There are a few differences between this diagnostic engine and Clang's
engine:
  - Diagnostics are specified by a .def file (Diagnostics.def), rather
  than via tblgen, which drastically simplifies the build and makes
  code completion work when you add a new diagnostic.
  - Calls to the "diagnose()" method are safely typed based on the
  argument types specified in the .def file, so it's harder to write a
  diagnostic whose expected arguments (in the string) and whose actual
  arguments (in the code) don't match.
  - It uses variadic templates, so it hangs with the cool kids.



Swift SVN r734
2011-09-26 23:46:28 +00:00
John McCall
b2facdae4b Getterize Stmt.h.
Swift SVN r720
2011-09-20 07:07:53 +00:00
John McCall
b351394b6e Getterify the rest of Expr.h.
Swift SVN r719
2011-09-20 00:18:57 +00:00
John McCall
c61c807589 Mangle types for all declarations. Save the names of modules and mangle
those in, too.



Swift SVN r713
2011-09-18 09:21:42 +00:00
John McCall
b82dc62938 Enter a function context correctly when parsing a FuncDecl's body.
Swift SVN r711
2011-09-16 04:53:05 +00:00
John McCall
54ff2ccf4a Lop the last word off ModuleDecl and TranslationUnitDecl.
Swift SVN r693
2011-09-06 21:43:46 +00:00
John McCall
6ddc15143b Support qualified names for types.
Swift SVN r683
2011-09-03 06:07:44 +00:00
Chris Lattner
0090c43b80 all members of a protocol have to be NamedDecl's, tighten up
typing.  Various tidying up.


Swift SVN r678
2011-09-02 00:58:38 +00:00
Chris Lattner
34ec8bc4aa implement support for var members of protocols.
Swift SVN r672
2011-09-01 21:57:35 +00:00
Chris Lattner
c7fd9ec3bc remove the old grammar production for func's in protocols and just use
decl-func instead.  Hey look, now we have support for default 
implementations.


Swift SVN r671
2011-09-01 21:34:04 +00:00
Chris Lattner
5d78286e3f split the "func a::b()" form out to its own grammar production.
Swift SVN r669
2011-09-01 18:21:27 +00:00
Chris Lattner
fa34062b2d refactor the attribute grammar so that attribute-list is nullable,
simplifying LangRef and the parser.


Swift SVN r667
2011-09-01 18:06:46 +00:00
Chris Lattner
17319a0f28 implement the rest of parser support for 'func's in protocols. This makes
it pretty clear that I should just use FuncDecl in a protocol.


Swift SVN r666
2011-09-01 17:59:01 +00:00
Chris Lattner
74b804a03a rearrange DeclContext arguments so that they are at the end, not the beginning.
Swift SVN r661
2011-08-31 23:05:51 +00:00
Chris Lattner
d77e4ad649 implement support for protocol decls.
Swift SVN r655
2011-08-31 19:58:47 +00:00
Chris Lattner
fd4aefa837 rename the infix attribute to infix_left.
Swift SVN r647
2011-08-31 00:32:15 +00:00
Chris Lattner
af4d36f463 Eliminate the 'unary' attribute, instead just know that operators
that take a single argument are unary.  Move a bunch of semantic
checking of operators from the parser to TypeCheckDecl now that it
has a decent place to hold it.


Swift SVN r646
2011-08-31 00:13:57 +00:00
John McCall
34714f3796 CurContext -> CurDeclContext
Swift SVN r641
2011-08-30 06:36:38 +00:00
Doug Gregor
63ca527a95 Introduce accessors into DeclVarName and eliminate direct mutation by
setting all fields on construction. Use this opportunity to save a
pointer of storage for every DeclVarName.
squeeze out a pointer's worth of storage


Swift SVN r639
2011-08-29 19:59:33 +00:00
John McCall
b2bd8e12a7 Introduce the idea of a DeclContext.
Swift SVN r623
2011-08-25 19:26:50 +00:00
Chris Lattner
b04c19e647 introduce a enw AST/AST.h umbrella header and use it to
simplify #includes.



Swift SVN r578
2011-08-22 21:02:44 +00:00
Chris Lattner
f03486e991 diagnose a bunch of problem cases with operators.
Swift SVN r575
2011-08-20 01:29:00 +00:00
Chris Lattner
28f05f0348 add parser and sema support for user defined unary operators.
Swift SVN r572
2011-08-20 00:27:11 +00:00
Chris Lattner
88964126fe remove the old SemaDecl and Sema classes.
Swift SVN r563
2011-08-14 00:33:00 +00:00
Chris Lattner
a9534d0c34 merge handleEndOfTranslationUnit into ParseDecl.
Swift SVN r562
2011-08-14 00:30:09 +00:00
Chris Lattner
cb18028c45 rework all of the scope and name lookup logic, introducing a new ScopeInfo class
and moving a bunch more stuff out of SemaDecl.


Swift SVN r561
2011-08-14 00:27:24 +00:00
Chris Lattner
60d15735e5 merge VarDecl name processing into ParseDecl
Swift SVN r560
2011-08-13 23:20:54 +00:00
Chris Lattner
7e252a0ddf move a bunch of code from SemaDecl to ParseDecl
Swift SVN r559
2011-08-13 23:10:45 +00:00
Chris Lattner
75033678d0 split decl parsing logic out to ParseDecl.cpp
Swift SVN r558
2011-08-13 22:56:16 +00:00