| 1 |
# Copyright 2022 Google LLC |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") |
| 16 |
|
| 17 |
package( |
| 18 |
default_visibility = ["//repl:__subpackages__"], |
| 19 |
licenses = ["notice"], # Apache 2.0 |
| 20 |
) |
| 21 |
|
| 22 |
go_library( |
| 23 |
name = "go_default_library", |
| 24 |
srcs = glob(["*.go"], exclude=["*_test.go"]), |
| 25 |
data = glob(["*.tokens"]), |
| 26 |
importpath = "github.com/google/cel-go/repl/parser", |
| 27 |
deps = [ |
| 28 |
"@com_github_antlr4_go_antlr_v4//:go_default_library", |
| 29 |
], |
| 30 |
) |
| 31 |
|
| 32 |
go_test( |
| 33 |
name = "go_default_test", |
| 34 |
srcs = ["commands_test.go"], |
| 35 |
embed = [":go_default_library"], |
| 36 |
deps = [ |
| 37 |
"@com_github_antlr4_go_antlr_v4//:go_default_library", |
| 38 |
], |
| 39 |
) |