MCPcopy Create free account
hub / github.com/bazelbuild/bazel / bindParam

Method bindParam

src/main/java/net/starlark/java/syntax/Resolver.java:1193–1205  ·  view source on GitHub ↗
(ImmutableList.Builder<Parameter> params, Parameter param)

Source from the content-addressed store, hash-verified

1191 }
1192
1193 private void bindParam(ImmutableList.Builder<Parameter> params, Parameter param) {
1194 if (!bind(
1195 param.getIdentifier(),
1196 /* isLoad= */ false,
1197 // We set hasType to false, even if there is a param annotation. This is to avoid
1198 // complaining that an erroneous duplicated parameter has a type annotation, when we should
1199 // really just be complaining about the fact the param was duplicated at all.
1200 /* hasType= */ false,
1201 /* docComments= */ null)) {
1202 errorf(param, "duplicate parameter: %s", param.getName());
1203 }
1204 params.add(param);
1205 }
1206
1207 /**
1208 * Process a binding use of a name by adding a binding to the current block if not already bound,

Callers 1

resolveFunctionMethod · 0.95

Calls 5

bindMethod · 0.95
errorfMethod · 0.95
getNameMethod · 0.65
getIdentifierMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected