MCPcopy Index your code
hub / github.com/bazelbuild/bazel / compileExpr

Method compileExpr

src/main/java/net/starlark/java/syntax/Program.java:139–148  ·  view source on GitHub ↗

Resolves an expression syntax tree in the specified environment and compiles it to a Program. This operation mutates the syntax tree. The options must match those used when parsing expression. @throws SyntaxError.Exception in case of resolution error.

(Expression expr, Resolver.Module module, FileOptions options)

Source from the content-addressed store, hash-verified

137 * @throws SyntaxError.Exception in case of resolution error.
138 */
139 public static Program compileExpr(Expression expr, Resolver.Module module, FileOptions options)
140 throws SyntaxError.Exception {
141 Resolver.Function body = Resolver.resolveExpr(expr, module, options);
142 return new Program(
143 body,
144 /* loads= */ ImmutableList.of(),
145 /* loadLocations= */ ImmutableList.of(),
146 /* docCommentsMap= */ ImmutableMap.of(),
147 /* unusedDocCommentLines= */ ImmutableList.of());
148 }
149}

Callers 1

newExprFunctionMethod · 0.95

Calls 2

resolveExprMethod · 0.95
ofMethod · 0.45

Tested by

no test coverage detected