Commit Graph

218 Commits

Author SHA1 Message Date
Chris Lattner
fdc2dcc7db rename lexer methods to follow the naming convention and add the ability to lookahead one token.
Swift SVN r483
2011-08-03 00:07:43 +00:00
Chris Lattner
6f7c702321 disable copy and assignment of various types, and plain 'operator new' of others
using the new '0x way.


Swift SVN r443
2011-07-24 19:33:27 +00:00
Chris Lattner
6fbe70dd87 convert TokenKind to a scoped enum, eliminating the old c++'98 hackaround to
emulate it.


Swift SVN r442
2011-07-24 19:28:36 +00:00
Chris Lattner
7275ca527a pull in StringRef and Twine.
Swift SVN r422
2011-07-19 06:00:20 +00:00
Chris Lattner
e647b29339 stop the llvm-namespace-qualification-insanity by caving in and
adding a new swift/AST/LLVM.h file which forward declares and imports
common llvm classes, starting with SMLoc.


Swift SVN r420
2011-07-19 05:49:43 +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
b3e5c55fbc Change the parser methods to lower case to follow naming conventions.
Swift SVN r256
2011-03-06 23:28:17 +00:00
Chris Lattner
272d9e8dad Propagate "there were errors in the input" out to the exit code of the swift app by adding a "HadError" bool to ASTContext.
Swift SVN r244
2011-03-01 07:59:53 +00:00
Chris Lattner
3bd8a85784 Fix weirdness in the lang spec by making $123 be a special type of implementation identifier token, handling it uniformly in the grammar in the few places that it is valid.
Swift SVN r215
2010-11-11 22:27:39 +00:00
Chris Lattner
19e5390b78 twinify more diagnostics.
Swift SVN r168
2010-10-09 17:50:40 +00:00
Chris Lattner
47afc23bac Expand lexer to cover a broader range of punctuators for function names. Add comparison functions to standard prolog.
Swift SVN r128
2010-08-01 05:58:41 +00:00
Chris Lattner
05f5028b7a stub out a parser hook.
Swift SVN r13
2010-07-18 20:17:04 +00:00
Chris Lattner
3cd9e46705 add numeric constant support, we can now lex exciting stuff
like this:

// Comment.

var x : int;
var x2 = 4;
var x3 = 4+5;



Swift SVN r11
2010-07-18 19:01:18 +00:00
Chris Lattner
6236deaabc implement lexer support for identifiers and our 2 keywords so far.
Swift SVN r10
2010-07-18 18:57:12 +00:00
Chris Lattner
80ba9c7e66 add some more punctuator characters and // comments.
Swift SVN r9
2010-07-18 01:44:13 +00:00
Chris Lattner
461f41edb1 start lexing trivial tokens, discard whitespace between them.
Swift SVN r8
2010-07-18 01:32:14 +00:00
Chris Lattner
db8e1301ff Start setting up the lexer object.
Swift SVN r7
2010-07-18 01:14:09 +00:00
Chris Lattner
874badb51b consolidate lexer stuff into the Parser lib.
Swift SVN r6
2010-07-18 00:50:29 +00:00