Implement syntax changes for in-place methods.

Rename 'assignment' attribute of infix operators to 'mutating'. Add
'has_assignment' attribute, which results in an implicit declaration of
the assignment version of the same operator. Parse "func =foo"
declaration and "foo.=bar" expression. Validate some basic properties of
in-place methods.

Not yet implemented: automatic generation of wrapper for =foo() if foo()
is implemented, or vice versa; likewise for operators.

Swift SVN r26508
This commit is contained in:
Chris Willmore
2015-03-25 00:22:41 +00:00
parent 2822677b4b
commit 1ee6f7e67c
25 changed files with 361 additions and 136 deletions

View File

@@ -895,10 +895,10 @@ namespace decls_block {
DeclContextIDField,// context decl
AssociativityField,
BCFixed<8>, // precedence
BCFixed<1>, // assignment
BCFixed<1>, // mutating
BCFixed<1>, // IsAssocImplicit flag
BCFixed<1>, // IsPrecedenceImplicit flag
BCFixed<1> // IsAssignmentImplicit flag
BCFixed<1> // IsMutatingImplicit flag
>;
using EnumElementLayout = BCRecordLayout<