Commit Graph

24 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis
84e20a0620 [AST] Break down IdentTypeRepr to different subtypes.
This makes memory allocation for it more efficient and it's more convenient to handle.

Swift SVN r12541
2014-01-18 20:19:09 +00:00
Argyrios Kyrtzidis
b49950fa80 [IDE] Enhance attribute annotation by splitting the related syntax nodes to:
AttributeId: Any occurence of '@<attribute-name>' anywhere.
AttributeBuiltin: A "resolved/active" attribute. Mis-applied attributes will be AttributeId.

This provides more options for coloring attributes in a way that one can easily spot
attributes that are not applied correctly.

Swift SVN r12194
2014-01-11 02:17:09 +00:00
Argyrios Kyrtzidis
952ac3cd3d [IDE] ModelASTWalker already has a SourceManager object to use.
Swift SVN r12184
2014-01-11 01:09:33 +00:00
Argyrios Kyrtzidis
a17b8a2d15 [IDE] SyntaxModelContext is intended to be used on a SourceFile not a module.
Swift SVN r12183
2014-01-11 01:09:32 +00:00
Sonny Falk
d1f0d9f7c6 [IDE] Give @attributes their own dedicated SyntaxNodeKind::Attribute.
Swift SVN r12138
2014-01-10 22:23:42 +00:00
Sonny Falk
e55342165f [IDE] Teach the syntax model about known @attributes, and treat them as keyword token nodes for syntax coloring.
This addresses <rdar://problem/15599911>.

Swift SVN r12109
2014-01-10 00:46:15 +00:00
Sonny Falk
2c3e2d469f [IDE] Add TypeRange to SyntaxStructureNode, and vend the type name for instance variables.
Swift SVN r12028
2014-01-08 01:33:33 +00:00
Sonny Falk
7eb5b62154 [IDE] Skip out of order non-token nodes.
This fixes <rdar://problem/15535058> and a crash in Xcode <rdar://problem/15642501>.

Swift SVN r11609
2013-12-23 20:52:26 +00:00
Jordan Rose
417b5d3982 Merge TranslationUnit into Module, and eliminate the term "translation unit".
This completes the FileUnit refactoring. A module consists of multiple
FileUnits, which provide decls from various file-like sources. I say
"file-like" because the Builtin module is implemented with a single
BuiltinUnit, and imported Clang modules are just a single FileUnit source
within a module.

Most modules, therefore, contain a single file unit; only the main module
will contain multiple source files (and eventually partial AST files).

The term "translation unit" has been scrubbed from the project. To refer
to the context of declarations outside of any other declarations, use
"top-level" or "module scope". To refer to a .swift file or its DeclContext,
use "source file". To refer to a single unit of compilation, use "module",
since the model is that an entire module will be compiled with a single
driver call. (It will still be possible to compile a single source file
through the direct-to-frontend interface, but only in the context of the
whole module.)

Swift SVN r10837
2013-12-05 01:51:15 +00:00
Sonny Falk
c350114862 [IDE] Fix a typo that caused a crash. <rdar://problem/15580756> Crash in ModelASTWalker::walkToDeclPre() when opening a document in Xcode
Swift SVN r10775
2013-12-04 02:45:33 +00:00
Sonny Falk
69a4cfb866 [IDE] Add InheritedTypeRanges to SyntaxStructureNode.
Add tests to cover name source range and inherited types to the structure tests.

Swift SVN r10767
2013-12-04 00:00:23 +00:00
Sonny Falk
ebddf906cd [IDE] Update the character source ranges for structure nodes so they properly span the entire end token.
Swift SVN r10729
2013-12-02 19:31:07 +00:00
Sonny Falk
1ec5094eee [IDE] Add a structure test for property in the syntax model. Adjust the range to include the type.
Swift SVN r10728
2013-12-02 19:31:07 +00:00
Sonny Falk
e686707bde [IDE] Don't pass token nodes during popStructureNode() as it's not necessary.
Swift SVN r10727
2013-12-02 19:31:04 +00:00
Dmitri Hrybenko
81dc5deee8 Change 'def' keyword back to 'func'
Swift SVN r10522
2013-11-17 07:45:28 +00:00
Sonny Falk
2ba1d6cec9 [IDE] Remove IBAction / IBOutlet specific SyntaxStructureKind values, and pass through the DeclAttributes instead.
Swift SVN r10028
2013-11-07 19:35:30 +00:00
Sonny Falk
7594f89ac6 [IDE] Annotate IBAction/IBOutlet with their own SyntaxStructureKind.
Swift SVN r10009
2013-11-06 23:30:23 +00:00
Sonny Falk
a5e6abd693 [IDE] Annotate init & destructor in document substructure.
Swift SVN r9979
2013-11-06 00:13:19 +00:00
Dmitri Hrybenko
91ce21666d Change 'func' keyword to 'def'
I tried hard find all references to 'func' in documentation, comments and
diagnostics, but I am sure that I missed a few.  If you find something, please
let me know.

rdar://15346654


Swift SVN r9886
2013-11-02 01:00:42 +00:00
Sonny Falk
473cd24818 [IDE] Clean up and simplify syntaxStructureKindFromNominalTypeDecl().
Swift SVN r9883
2013-11-01 22:09:26 +00:00
Sonny Falk
f265135790 [IDE] Add Enum SyntaxStructure kind. Rename to spell out enum values in full form. Refactored to remove duplication.
Swift SVN r9824
2013-10-30 23:21:55 +00:00
Sonny Falk
7b8cd1c0e0 [IDE] Add support for a few more SyntaxStructure kinds, and add name range.
Swift SVN r9810
2013-10-30 21:01:35 +00:00
Sonny Falk
ff0a037ae6 [IDE] Add initial document structure annotation support.
Swift SVN r9597
2013-10-22 20:54:46 +00:00
Sonny Falk
fdb71c03d0 [IDE] Rename SyntaxColoring since it's about to handle more than coloring.
Swift SVN r9595
2013-10-22 19:49:29 +00:00