Chris Lattner
af553c2cc3
random minor updates
...
Swift SVN r1131
2012-02-29 01:17:33 +00:00
Chris Lattner
831894eb8d
checkpoint progress updating langref (down to 'var'), still much to do.
...
Swift SVN r1130
2012-02-26 19:11:20 +00:00
John McCall
7b29a420f6
Design and implement the [byref] attribute, checking that
...
it doesn't appear in places it shouldn't. The only limits on
this checking right now is the inadequacy of location information
for types, which is something we ought to fix.
Fix type-checking of byref applications. Fix IR generation
of byref variables. Whole lotta fixin' goin' on.
But hey, byref calls work.
Swift SVN r1111
2012-02-10 09:42:50 +00:00
John McCall
7f60469fdf
Introduce the notion of a "fully-typed" type, necessary
...
because tuple types can have defaulted elements. Check for
it and complain in function signatures.
Swift SVN r1109
2012-02-07 03:48:23 +00:00
John McCall
3b4f155029
Update the language reference for the basic pattern grammar
...
and the function signature changes.
Swift SVN r1102
2012-01-26 07:05:44 +00:00
Chris Lattner
2eac7d8a07
random updates.
...
Swift SVN r1087
2012-01-19 00:49:23 +00:00
Chris Lattner
578686379d
start updating some dox.
...
Swift SVN r1082
2012-01-18 22:58:18 +00:00
Chris Lattner
f1db6de509
remove the :: token and DCE UnresolvedScopedIdentifierExpr.
...
Swift SVN r1043
2012-01-14 07:00:45 +00:00
Chris Lattner
4b8a147952
change the type grammar from qualifying a type with module::typename to module.typename.
...
Swift SVN r1036
2012-01-13 05:45:59 +00:00
Chris Lattner
17b11e9bbd
implement parsing, AST, and LangRef support for 'plus' methods. Dot syntax will need some work though to actually use them.
...
Swift SVN r949
2011-12-21 23:21:58 +00:00
Chris Lattner
e08e493630
fully rip the :: form out of the dox
...
Swift SVN r948
2011-12-21 22:46:32 +00:00
Chris Lattner
cc0529ba34
remove support for "func foo::bar() {}". "Just use extensions".
...
Swift SVN r947
2011-12-21 22:45:37 +00:00
Chris Lattner
0302a0c036
fix broken tag
...
Swift SVN r909
2011-12-06 21:07:22 +00:00
Chris Lattner
8d53c9f3b9
restrict 'extension' to only exist at file scope.
...
Swift SVN r899
2011-12-06 00:11:13 +00:00
Chris Lattner
5c7c1416c1
Sketch out a LangRef description of extensions, and add
...
lexer support for them.
Swift SVN r838
2011-11-08 23:17:58 +00:00
Chris Lattner
0b9b982758
rework parseDecl to do validation itself, allow decls in oneof's
...
Swift SVN r837
2011-11-08 22:41:27 +00:00
Chris Lattner
d95aadc8bf
structs can now contain any 'decl'
...
Swift SVN r831
2011-11-08 19:45:24 +00:00
Chris Lattner
eac219bee8
Rework the decl grammar a bit: now "decl" doesn't include import
...
declarations, but they are explicitly allowed at translation unit scope.
This also introduces a parseDecl method which does the obvious thing.
Swift SVN r830
2011-11-08 19:30:00 +00:00
Chris Lattner
45bcd19f58
allow typealias's in structs, inject struct members into the proper declcontext.
...
Swift SVN r828
2011-11-07 23:47:20 +00:00
Chris Lattner
c67304f287
reject var's in structs, all data members must come before all func's.
...
Swift SVN r826
2011-11-07 23:34:47 +00:00
Chris Lattner
b559c3f648
allow var's and funcs within structs, part of rdar://10157702
...
Swift SVN r824
2011-11-03 22:19:48 +00:00
Chris Lattner
c941b4b3f5
remove two unimplemented and highly ambiguous grammar productions.
...
Swift SVN r823
2011-11-03 18:55:55 +00:00
Chris Lattner
a8ef04fd9b
restore some grammar productions accidentally lost in r816.
...
Swift SVN r821
2011-11-02 05:54:57 +00:00
Chris Lattner
174d86d537
eliminate anonymous protocols, resolving rdar://10157535.
...
Swift SVN r819
2011-11-01 23:26:39 +00:00
Chris Lattner
80caaa7d87
remove support for anonymous oneof types, which cause issues for mangling
...
and are more of a theoretically good idea than an actually useful idea.
This is the first half of rdar://10157535
Swift SVN r818
2011-11-01 23:20:23 +00:00
Chris Lattner
828045f8b5
make the dot optional in tuple literals, now you can use
...
foo(x = 4, 7) instead of foo(.x = 4, 7). This resolves
rdar://10157455
Swift SVN r817
2011-11-01 21:06:22 +00:00
Chris Lattner
da564d50d3
A long journey later, implement support for type inference of integer literals instead of
...
forcing them to int64 all the time. Now the integer_literal_type in the standard library
is only used to resolve ambiguity in expressions. Among other amazing things, we now
correctly accept:
var x8 : int8 = 4
without a cast.
This still isn't doing any bounds checking and isn't checking the inferred type to tell if
it is compatible with integer literals (i.e. has a primitive conversion function from the
LLVM IR type). Enough for now though.
This is progress towards rdar://10357238.
Swift SVN r814
2011-11-01 06:51:50 +00:00
Chris Lattner
a65fd18c4d
add a note.
...
Swift SVN r789
2011-10-27 06:34:19 +00:00
John McCall
f121bd5e2d
Arbitrary-associativity operator precedence parsing.
...
Swift SVN r743
2011-09-29 01:31:16 +00:00
Chris Lattner
9d240a1d18
add lexer and langref support for floating point literals. No AST/CodeGen support yet.
...
Swift SVN r706
2011-09-15 21:29:12 +00:00
Chris Lattner
4a5c409408
Change the stdlib so that int is just a typealias for int64, not its own unique type.
...
Update langref to describe the builtin module as an implementation detail of the stdlib,
expand the stdlib a bit.
Swift SVN r703
2011-09-09 05:39:57 +00:00
John McCall
1e89b0e274
Remove the __builtin type keywords and make the Builtin
...
module export those types.
Also, document the language changes I've been making in this area.
Swift SVN r688
2011-09-04 07:34:01 +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
e7e0c657c0
checkpoint, nothing interesting to see here.
...
Swift SVN r665
2011-08-31 23:54:57 +00:00
Dave Zarzycki
ff9fda80ab
Document floating-point intrinsics
...
Swift SVN r659
2011-08-31 22:08:29 +00:00
Chris Lattner
7d89538c35
elements of a protocol aren't comma separated.
...
Swift SVN r658
2011-08-31 21:45:01 +00:00
Chris Lattner
d77e4ad649
implement support for protocol decls.
...
Swift SVN r655
2011-08-31 19:58:47 +00:00
Chris Lattner
f9b024adb0
implement parser and AST support for trivial (empty) protocol types.
...
Swift SVN r652
2011-08-31 19:43:06 +00:00
John McCall
6daf126d7a
Remove spurious colons from tuple type elements.
...
Swift SVN r649
2011-08-31 03:11:50 +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
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
41a924e723
synch up the grammar in the parser and langref, and make the
...
expression section of langref make more sense.
Swift SVN r571
2011-08-19 23:10:13 +00:00
John McCall
7de102df78
Revise LangRef per Chris's review.
...
Swift SVN r522
2011-08-12 17:19:59 +00:00
Chris Lattner
432a738b60
fix broken link
...
Swift SVN r521
2011-08-12 16:30:50 +00:00
John McCall
ff767b7b46
Update the language reference for the operator and juxtaposition
...
changes.
Swift SVN r520
2011-08-12 07:51:23 +00:00
Chris Lattner
0871b128f8
add support for /**/ comments to the lexer, allow nesting of them since we won't
...
have the #if 0 hack to handle nesting.
Swift SVN r506
2011-08-12 00:37:01 +00:00