diff options
| author | Mike Buland <mike@xagasoft.com> | 2026-06-30 13:21:38 -0700 |
|---|---|---|
| committer | Mike Buland <mike@xagasoft.com> | 2026-06-30 13:21:38 -0700 |
| commit | 1553b785cbc75bfc47066096b81d0066017a91ad (patch) | |
| tree | d10b1dcf71c6ecf833b2eb9e9dbfde303b88fa9e /derive/tests | |
| parent | 062048ef6e3e060bcf841ea2ec92e026f09d8da0 (diff) | |
| download | crimtag-1553b785cbc75bfc47066096b81d0066017a91ad.tar.gz crimtag-1553b785cbc75bfc47066096b81d0066017a91ad.tar.bz2 crimtag-1553b785cbc75bfc47066096b81d0066017a91ad.tar.xz crimtag-1553b785cbc75bfc47066096b81d0066017a91ad.zip | |
Added LookAhead, fixed up the proc-macro.
LookAhead should make the rest of the parser and lexer stuff way easier,
probably spin that out into it's own lib later on.
Diffstat (limited to 'derive/tests')
| -rw-r--r-- | derive/tests/basic.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/derive/tests/basic.rs b/derive/tests/basic.rs index 18fc366..a636faa 100644 --- a/derive/tests/basic.rs +++ b/derive/tests/basic.rs | |||
| @@ -2,10 +2,19 @@ use derive::*; | |||
| 2 | use crimtag::*; | 2 | use crimtag::*; |
| 3 | 3 | ||
| 4 | #[derive(CrimtagMappable)] | 4 | #[derive(CrimtagMappable)] |
| 5 | pub struct SubTest { | ||
| 6 | name: String, | ||
| 7 | byline: String, | ||
| 8 | amount: i64, | ||
| 9 | } | ||
| 10 | |||
| 11 | #[derive(CrimtagMappable)] | ||
| 5 | pub struct Test { | 12 | pub struct Test { |
| 6 | number: i32, | 13 | number: i32, |
| 7 | something: f64, | 14 | something: f64, |
| 8 | inner_thing: String, | 15 | inner_thing: String, |
| 16 | sub: SubTest, | ||
| 17 | stuff: Vec<SubTest>, | ||
| 9 | } | 18 | } |
| 10 | 19 | ||
| 11 | 20 | ||
