aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBundleLibraryRule.java
diff options
context:
space:
mode:
authorGravatar Francois-Rene Rideau <tunes@google.com>2015-02-19 18:36:17 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-02-19 18:36:17 +0000
commit5dcdbf9a9bfd547275944f8ebb57b44af29f3a42 (patch)
tree6bf8f27401774214d00884df3a4a7e497f6cd58e /src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBundleLibraryRule.java
parent3671ff634e85e5c3307f37e7c86d88bdf7bf911b (diff)
Introduce first class function signatures; make the parser use them.
This is the first meaty cl in a series to refactor the Skylark function call protocol. 1- We introduce a first-class notion of FunctionSignature, that supports positional and named-only arguments, mandatory and optional, default values, type-checking, *stararg and **kwarg; 2- To keep things clean, we distinguish two different kinds of Argument's: Argument.Passed that appears in function calls, and Parameter, that appears in function definitions. 3- We refactor the Parser so it uses this infrastructure, and make minimal changes to MixedModeFunction so that it works with it (but don't actually implement *starparam and **kwparam yet). 4- As we modify FuncallExpression, we ensure that the args and kwargs arguments it passes to the underlying function are immutable, as a prerequisite to upcoming implementation of *starparam and **kwparam as being provided directly from a skylark list or dict. Further changes under review will take advantage of this FunctionSignature to redo all our function call protocol, to be used uniformly for both UserDefinedFunction's and builtin function. The result will be a simpler inheritance model, with better type-checking, builtin functions that are both simpler and better documented, and many redundant competing functionality-limited codepaths being merged and replaced by something better. NB: The changes to MixedModeFunction, SkylarkFunction and MethodLibrary are temporary hacks to be done away with in an upcoming CL. The rest is the actual changes. -- MOS_MIGRATED_REVID=86704072
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBundleLibraryRule.java')
0 files changed, 0 insertions, 0 deletions