Commit Graph

195377 Commits

Author SHA1 Message Date
Chris Lattner
454dd86c2b add a testcase
Swift SVN r32
2010-07-19 03:21:45 +00:00
Chris Lattner
a63671f116 add binary expression ast node.
Swift SVN r31
2010-07-19 00:57:54 +00:00
Chris Lattner
17aad28720 set up expression kinds, add ParenExpr ast node.
Swift SVN r30
2010-07-19 00:51:28 +00:00
Chris Lattner
a39a7ec6a2 make the sema methods be prefixed with ActOn
Swift SVN r29
2010-07-19 00:46:09 +00:00
Chris Lattner
66199fa090 implement a new IntegerLiteral ast node, add plumbing for
allocation of exprs from ASTContext.


Swift SVN r28
2010-07-19 00:42:30 +00:00
Chris Lattner
d6edeb7a8b thread Expr* results through the parser and SemaExpr.
Swift SVN r27
2010-07-19 00:15:02 +00:00
Chris Lattner
910f84b6ae thread astcontext from the driver, down through Sema.
Swift SVN r26
2010-07-19 00:07:47 +00:00
Chris Lattner
d3756f2627 Sketch out the new AST library, lets start with expressions.
Swift SVN r25
2010-07-19 00:05:11 +00:00
Chris Lattner
b45fe8abf5 set up semaexpr and sema base. Give SemaExpr a couple trivial methods.
Swift SVN r24
2010-07-18 23:54:47 +00:00
Chris Lattner
8b9b84fe8e forgot to svn add this.
Swift SVN r23
2010-07-18 23:40:44 +00:00
Chris Lattner
c02e462b58 wire sema up to the Parser.
Swift SVN r22
2010-07-18 23:00:47 +00:00
Chris Lattner
68a2d3a33c stub out the Sema object.
Swift SVN r21
2010-07-18 22:59:13 +00:00
Chris Lattner
66fe17ffdb parse some trivial binary expression, like:
var x3 = 4+5*4+12/97;



Swift SVN r20
2010-07-18 22:55:11 +00:00
Chris Lattner
3e53d83874 implement support for parenthesized expressions.
Swift SVN r19
2010-07-18 22:36:34 +00:00
Chris Lattner
9460c31203 implement enough parser support to parse:
var x : int;
var x2 = 4;



Swift SVN r16
2010-07-18 21:31:34 +00:00
Chris Lattner
15ed0a78d1 better fix for make clean.
Swift SVN r15
2010-07-18 21:31:06 +00:00
Chris Lattner
5450892284 Set up trivial parser support stuff and sketch out a few
productions.  We can now get this far:

simple.swift:4:5: error: expected a top level declaration
var x : int;
    ^
simple.swift:5:5: error: expected a top level declaration
var x2 = 4;
    ^

Yay for amazing error recovery!



Swift SVN r14
2010-07-18 21:00:30 +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
Chris Lattner
5e88a21755 sketch out lexer and token interfaces.
Swift SVN r5
2010-07-18 00:48:07 +00:00
Chris Lattner
afc81c1855 initial checkin, nothing much to see here.
Swift SVN r4
2010-07-18 00:04:11 +00:00
Chris Lattner
18844bc652 initial swift test
Swift SVN r3
2010-07-17 23:50:59 +00:00