Variable declarations are declarations led by either 'var' or 'let'. It
can contain multiple pattern bindings as children.
For patterns, this patch only creates syntax nodes for simple identifier
patterns, e.g. 'a = 3'. The rest of the pattern kinds are still left
unknown (UnknownPattern).
This patch also refactors the structure of function signature node so
that closure signature can re-use parts of function signature. For
instance, we group arrow and return type to be "ReturnClause". And we
group parenthesized parameter list to be "ParamClause".
This structure of closure signature also calls for a good way to
represent either-or node in libSyntax APIs, since we've two ways to
specify parameters in closure: one is as regular function parameter and
the other is dot-separated simple names.
* Eradicate IndexDistance associated type, replacing with Int everywhere
* Consistently use Int for ExistentialCollection’s IndexDistance type.
* Fix test for IndexDistance removal
* Remove a handful of no-longer-needed explicit types
* Add compatibility shims for non-Int index distances
* Test compatibility shim
* Move IndexDistance typealias into the Collection protocol
To construct struct syntax, this patch first specialized type
inheritance clause. For protocol's class requirement, we currently
treat it as an unknown type.
This patch also teaches SyntaxParsingContext to collect syntax nodes
from back in place. This is useful to squash multiple decl modifiers
for declarations like function. This is not used for struct declaration
because only accessibility modifier is allowed.
* Updated the PathType and StorePathAction classes to allow for asserting if a path contains an executable.
* Converted the top-level argument group to use the new builder DSL.
* Updated tests for StorePathType to not actually test the functionality of the PathType class.
* Implemented a CompilerVersion type to mimic the existing wrapper in swift_build_support and return a more detailed object from ClangVersionType and SwiftVersionType.
* Updated action tests.
* Fixed a filter() mistake.
* Code review.
This patch also performs minor refactoring to align syntax parsing
context with the right scope. We start to support the generic clauses
because they are necessary pieces to construct struct or
function syntax node.
- Outlaw duplicate input files, fix driver, fix tests, and add test.
- Reflect that no buffer is present without a (possibly pseudo) named file.
- Reflect fact that every input has a (possible pseudo) name.
- Break up CompilerInstance::setup.
Don't bail on dups.
* Converted the host and cross-compilation targets argument group to use the new builder DSL.
* Converted the projects argument group to use the new builder DSL.
* Converted the extra actions argument group to use the new builder DSL.
* Converted the build variant argument group to use the new builder DSL.
* Converted the build variant override argument group to use the new builder DSL.
* Converted the run tests argument group to use the new builder DSL.
* Converted the run build argument group to use the new builder DSL.
* Converted the skip test argument group to use the new builder DSL.
* Export missing ShellSplitType from the argparse.types module.
This commit starts to support syntax nodes for @ attributes list for
declarations. These attributes don't include modifiers like "static" or
access keywords. Along with the function change, the commit refactors
some existing code to reduce duplication.
* Imported the new argparse overlay module and added the setup code for the DSL.
* Converted the CMake generator flags to use the new builder DSL.
* Converted the assertions argument group to use the new builder DSL.
* Converted the LLVM-specific settings argument group to use the new builder DSL.
* Converted the Android build settings argument group to use the new builder DSL.
* Removed unused action aliases from the builder DSL setup section to appease the flake8 gods.
* Fixed small typo in help message for --eclipse option.
Not all CMake configuration names are valid Xcode configurations at
the moment, but Xcode's "Release" still includes debug info, so it's
probably close enough.