Commit Graph

41 Commits

Author SHA1 Message Date
Dmitri Hrybenko
2e51d23875 Un-ifdef object literals
Swift SVN r32880
2015-10-25 07:50:53 +00:00
Jordan Rose
f5b1efb354 Move client-affecting configuration options into a generated Config.h.
This way they can be used from other projects, like LLDB. The downside
is we now have to make sure the header is included consistently in all
the places we care about, but I think in practice that won't be a problem,
especially not with tests.

rdar://problem/22240127

Swift SVN r31173
2015-08-12 17:50:13 +00:00
Jordan Rose
953424072e Guard "object literals" feature with SWIFT_ENABLE_OBJECT_LITERALS.
This is not a feature we're releasing at the moment, so provide a way
to turn it off.

rdar://problem/21935551

Swift SVN r30966
2015-08-04 00:16:52 +00:00
Chris Lattner
0001dc27bb remove support for the experiemental "character literals" feature.
Swift SVN r30509
2015-07-22 22:35:19 +00:00
David Farler
b0f87a059b Highlight documentation comments and some syntax
- Start highlighting doc comments as Xcode "Documentation Comments".
- Start highlighting custom top-level fields as Xcode "Documentation
Comment Keywords".

This requires SourceKit r28827 to build and Xcode
rdar://problem/21034381 for proper highlighting.

Swift SVN r28828
2015-05-20 09:08:13 +00:00
Maxwell Swadling
73700aab02 Added ObjectLiterals to the SyntaxMap
rdar://problem/20821831

Swift SVN r28787
2015-05-19 21:14:10 +00:00
Argyrios Kyrtzidis
7c69b077c7 [IDE] Add enum elements in the document structure.
rdar://18845613

Swift SVN r28618
2015-05-15 06:56:22 +00:00
Maxwell Swadling
d239d4434f Added IDE support for Object Literals Expressions
Fixes rdar://problem/20839100
Object Literal Expressions now show up in the Document structure.

Swift SVN r28332
2015-05-08 23:22:09 +00:00
Doug Gregor
b8995b0aa3 Transform the Module class into ModuleDecl.
Modules occupy a weird space in the AST now: they can be treated like
types (Swift.Int), which is captured by ModuleType. They can be
treated like values for disambiguation (Swift.print), which is
captured by ModuleExpr. And we jump through hoops in various places to
store "either a module or a decl".

Start cleaning this up by transforming Module into ModuleDecl, a
TypeDecl that's implicitly created to describe a module. Subsequent
changes will start folding away the special cases (ModuleExpr ->
DeclRefExpr, name lookup results stop having a separate Module case,
etc.).

Note that the Module -> ModuleDecl typedef is there to limit the
changes needed. Much of this patch is actually dealing with the fact
that Module used to have Ctx and Name public members that now need to
be accessed via getASTContext() and getName(), respectively.

Swift SVN r28284
2015-05-07 21:10:50 +00:00
Chris Lattner
37f5452d15 require -> guard.
Swift SVN r28223
2015-05-06 22:53:38 +00:00
Chris Lattner
0011b3ae21 rename "unless" to "require" and give it an 'else' keyword.
Swift SVN r28059
2015-05-02 00:16:44 +00:00
Chris Lattner
c6aa041fb9 Add parser/ast/sema/sourcekit/etc support for 'unless' statement.
SILGen support still missing.



Swift SVN r27961
2015-04-30 05:55:11 +00:00
Chris Willmore
c7c7388cf2 Change do-while to repeat-while.
Change all uses of "do { ... } while <cond>" to use "repeat" instead.
Rename DoWhileStmt to RepeatWhileStmt. Add diagnostic suggesting change
of 'do' to 'repeat' if a condition is found afterwards.

<rdar://problem/20336424> rename do/while loops to repeat/while & introduce "repeat <count> {}" loops

Swift SVN r27650
2015-04-23 22:48:31 +00:00
Argyrios Kyrtzidis
df04a93814 [IDE] Report the editor placeholders in the syntax model.
rdar://20572261

Swift SVN r27392
2015-04-17 01:01:25 +00:00
Argyrios Kyrtzidis
da2e6ad04a [IDE] Add array/dictionary literals in the document structure.
rdar:/19999295

Swift SVN r25874
2015-03-09 01:30:39 +00:00
Argyrios Kyrtzidis
8d4b0ed470 [IDE] Include control-flow statements in the syntax structure model.
rdar://19988592

Swift SVN r25868
2015-03-09 00:42:42 +00:00
Argyrios Kyrtzidis
865719c2b8 [IDE] Introduce SyntaxStructureElements which will provide more info about a syntactic structure.
Swift SVN r25866
2015-03-09 00:42:39 +00:00
Argyrios Kyrtzidis
f15d56b8aa [IDE] Mark the parens for string interpolation with a special syntax annotation.
Part of rdar://19655729

Swift SVN r24983
2015-02-05 00:53:57 +00:00
Argyrios Kyrtzidis
c41569c7a7 [IDE] Enhance SyntaxStructureKind with global/static/class variable nodes.
Swift SVN r24497
2015-01-18 03:47:26 +00:00
Sonny Falk
6b053e6252 [IDE] Add support for Swift extension declarations to the document substructure.
Add tests for struct, protocol and extension.
This addresses the first part of <rdar://problem/15818966>.

Swift SVN r19766
2014-07-10 00:23:00 +00:00
Argyrios Kyrtzidis
cff07de44e [IDE] Search for URLs in comments and report them in the syntax model.
Swift SVN r19424
2014-07-01 19:21:17 +00:00
Argyrios Kyrtzidis
e64821d268 [IDE] Search all comments for 'FIXME:', 'TODO:', 'MARK:' and report them in the syntax model.
Swift SVN r19423
2014-07-01 19:21:16 +00:00
Sonny Falk
7949d17021 [IDE] Provide call structure data and keyword arguments in document structure.
This will be used to highlight function calls and declarations for
QuickHelp and Jump-to-definition.
Add test for the above.
<rdar://problem/16862981>.

Swift SVN r17824
2014-05-10 02:54:55 +00:00
Argyrios Kyrtzidis
84ae58d7d7 [IDE] For the syntax structure walker report ParamDecls as well.
Swift SVN r17442
2014-05-05 15:14:32 +00:00
Argyrios Kyrtzidis
a0b97196f1 [IDE] Provide the declaration along with the SyntaxStructureNode.
Swift SVN r16504
2014-04-18 07:07:15 +00:00
Argyrios Kyrtzidis
b7a85f2af9 [IDE] Do syntax annotation for '#if' constructs.
Swift SVN r15447
2014-03-25 03:55:32 +00:00
Sonny Falk
9e7d522950 [IDE] Add BraceStatement to SyntaxStructure.
Add a test for the above.

Swift SVN r14449
2014-02-27 04:57:28 +00:00
Sonny Falk
d7caa10d65 [IDE] Add BodyRange to SyntaxStructureNode, and vend the inner body
range for appropriate structure nodes.

Swift SVN r14448
2014-02-27 04:57:26 +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
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
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
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
Dmitri Hrybenko
44147a9de3 Fix indentation
Swift SVN r10811
2013-12-04 23:16:38 +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
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
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