Skip to content

Commit 0480a81

Browse files
jnthntatumcopybara-github
authored andcommitted
Delete AstImpl, everything should just use Ast directly now.
PiperOrigin-RevId: 800548853
1 parent 8a839c3 commit 0480a81

3 files changed

Lines changed: 1 addition & 75 deletions

File tree

common/ast.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727

2828
namespace cel {
2929

30-
namespace ast_internal {
31-
class AstImpl;
32-
} // namespace ast_internal
33-
3430
// In memory representation of a CEL abstract syntax tree.
3531
//
3632
// If AST inspection or manipulation is needed, prefer to use an existing tool
@@ -42,13 +38,11 @@ class AstImpl;
4238
//
4339
// To create a new instance from a protobuf representation, use the conversion
4440
// utilities in `common/ast_proto.h`.
45-
class Ast {
41+
class Ast final {
4642
public:
4743
using ReferenceMap = absl::flat_hash_map<int64_t, Reference>;
4844
using TypeMap = absl::flat_hash_map<int64_t, TypeSpec>;
4945

50-
virtual ~Ast() = default;
51-
5246
Ast() : is_checked_(false) {}
5347

5448
Ast(Expr expr, SourceInfo source_info)
@@ -142,8 +136,6 @@ class Ast {
142136
}
143137

144138
private:
145-
friend class ast_internal::AstImpl;
146-
147139
Expr root_expr_;
148140
SourceInfo source_info_;
149141
ReferenceMap reference_map_;

common/ast/BUILD

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,6 @@ cc_test(
7373
],
7474
)
7575

76-
cc_library(
77-
name = "ast_impl",
78-
hdrs = ["ast_impl.h"],
79-
deps = [
80-
":expr",
81-
":metadata",
82-
"//common:ast",
83-
"//common:expr",
84-
],
85-
)
86-
8776
cc_library(
8877
name = "expr",
8978
hdrs = [

common/ast/ast_impl.h

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)