Commits

Dmitri Hrybenko committed ecd798b9fd2
Comment parsing: attaching comments to declarations We can attach comments to declarations. Right now we only support comments that precede the declarations (trailing comments will be supported later). The implementation approach is different from one we have in Clang. In Swift the Lexer attaches the comments to the next token, and parser checks if comments are present on the first token of the declaration. This is much cleaner, and faster than Clang's approach (where we perform a binary search on source locations and do ad-hoc fixups afterwards). The comment <-> decl correspondence is modeled as "virtual" attributes that can not be spelled in the source. These attributes are not serialized at the moment -- this will be implemented later. Swift SVN r14031