Skip to content

Commit d38bffe

Browse files
committed
Fix Bazel build targets.
1 parent abadcf3 commit d38bffe

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

core/BUILD

+11-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,20 @@ cc_test(
3131

3232
cc_library(
3333
name = "parser",
34-
srcs = ["parser.cpp"],
35-
hdrs = ["parser.h"],
34+
srcs = [
35+
"desugarer.cpp",
36+
"parser.cpp",
37+
"string_utils.cpp",
38+
],
39+
hdrs = [
40+
"desugarer.h",
41+
"parser.h",
42+
"string_utils.h",
43+
],
3644
deps = [
3745
":common",
3846
":lexer",
47+
"//stdlib:std",
3948
],
4049
)
4150

@@ -55,23 +64,20 @@ cc_library(
5564
"formatter.cpp",
5665
"libjsonnet.cpp",
5766
"static_analysis.cpp",
58-
"string_utils.cpp",
5967
"vm.cpp",
6068
],
6169
hdrs = [
6270
"desugarer.h",
6371
"formatter.h",
6472
"state.h",
6573
"static_analysis.h",
66-
"string_utils.h",
6774
"vm.h",
6875
],
6976
deps = [
7077
":common",
7178
":lexer",
7279
":parser",
7380
"//include:libjsonnet",
74-
"//stdlib:std",
7581
],
7682
linkopts = ["-lm"],
7783
includes = ["."],

core/desugarer.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ limitations under the License.
2424
static const Fodder EF; // Empty fodder.
2525

2626
static const LocationRange E; // Empty.
27-
27+
2828
static unsigned long max_builtin = 24;
2929
BuiltinDecl jsonnet_builtin_decl(unsigned long builtin)
3030
{
@@ -97,7 +97,7 @@ class Desugarer {
9797
Var *std(void)
9898
{ return var(id(U"std")); }
9999

100-
100+
101101
Local::Bind bind(const Identifier *id, AST *body)
102102
{
103103
return Local::Bind(EF, id, EF, body, false, EF, Params{}, false, EF, EF);
@@ -117,7 +117,7 @@ class Desugarer {
117117
Apply *stdFunc(const String &name, AST *v)
118118
{
119119
return make<Apply>(
120-
v->location,
120+
v->location,
121121
EF,
122122
make<Index>(E, EF, std(), EF, false, str(name), EF, nullptr, EF, nullptr, EF),
123123
EF,
@@ -132,7 +132,7 @@ class Desugarer {
132132
Apply *stdFunc(const LocationRange &loc, const String &name, AST *a, AST *b)
133133
{
134134
return make<Apply>(
135-
loc,
135+
loc,
136136
EF,
137137
make<Index>(E, EF, std(), EF, false, str(name), EF, nullptr, EF, nullptr, EF),
138138
EF,
@@ -342,7 +342,7 @@ class Desugarer {
342342
out = make<Apply>( // False branch.
343343
E,
344344
EF,
345-
var(_aux[prev_for]),
345+
var(_aux[prev_for]),
346346
EF,
347347
Apply::Args {
348348
{ make<Binary>(E, EF, var(_i[prev_for]), EF, BOP_PLUS, one), EF, },
@@ -400,7 +400,7 @@ class Desugarer {
400400
false, // trailingComma
401401
EF,
402402
make<Conditional>(
403-
ast->location,
403+
ast->location,
404404
EF,
405405
make<Binary>(
406406
E, EF, var(_i[i]), EF, BOP_GREATER_EQ, length(var(_l))),
@@ -419,7 +419,7 @@ class Desugarer {
419419
)
420420
))},
421421
make<Conditional>(
422-
ast->location,
422+
ast->location,
423423
EF,
424424
equals(ast->location, type(var(_l)), str(U"array")),
425425
EF,

0 commit comments

Comments
 (0)