Skip to content

Commit 1bee34f

Browse files
authored
feat: implement visitor pattern (#1)
Signed-off-by: tison <wander4096@gmail.com>
1 parent 51c55e9 commit 1bee34f

8 files changed

Lines changed: 1004 additions & 9 deletions

File tree

Cargo.lock

Lines changed: 18 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
[workspace]
16-
members = ["visitor", "xtask"]
16+
members = ["visitor", "visitor-derive", "xtask"]
1717
resolver = "2"
1818

1919
[workspace.package]
@@ -24,6 +24,9 @@ readme = "README.md"
2424
repository = "https://github.com/fast/visitor"
2525
rust-version = "1.85.0"
2626

27+
[workspace.dependencies]
28+
visitor-derive = { version = "0.1.0", path = "visitor-derive" }
29+
2730
[workspace.lints.rust]
2831
unknown_lints = "deny"
2932

visitor-derive/Cargo.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright 2025 FastLabs Developers
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+
# http://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+
[package]
16+
name = "visitor-derive"
17+
version = "0.1.0"
18+
19+
edition.workspace = true
20+
homepage.workspace = true
21+
license.workspace = true
22+
readme.workspace = true
23+
repository.workspace = true
24+
rust-version.workspace = true
25+
26+
[lib]
27+
proc-macro = true
28+
29+
[dependencies]
30+
proc-macro2 = { version = "1.0.101" }
31+
quote = { version = "1.0.41" }
32+
syn = { version = "2.0.106", features = ["extra-traits"] }
33+
34+
[lints]
35+
workspace = true

0 commit comments

Comments
 (0)