|
1 | 1 | use crate::{ |
2 | | - AdditionItem, LicenseItem, LicenseReq, ParseMode, |
| 2 | + AdditionItem, AdditionRef, LicenseItem, LicenseRef, LicenseReq, ParseMode, |
3 | 3 | error::{ParseError, Reason}, |
4 | 4 | expression::{ExprNode, Expression, ExpressionReq, Operator}, |
5 | 5 | lexer::{Lexer, Token}, |
@@ -225,10 +225,10 @@ impl Expression { |
225 | 225 | None | Some(Token::And | Token::Or | Token::OpenParen) => { |
226 | 226 | expr_queue.push(ExprNode::Req(ExpressionReq { |
227 | 227 | req: LicenseReq { |
228 | | - license: LicenseItem::Other { |
| 228 | + license: LicenseItem::Other(Box::new(LicenseRef { |
229 | 229 | doc_ref: doc_ref.map(String::from), |
230 | 230 | lic_ref: String::from(*lic_ref), |
231 | | - }, |
| 231 | + })), |
232 | 232 | addition: None, |
233 | 233 | }, |
234 | 234 | span: lt.span.start as u32..lt.span.end as u32, |
@@ -378,10 +378,10 @@ impl Expression { |
378 | 378 | Token::AdditionRef { doc_ref, add_ref } => match last_token { |
379 | 379 | Some(Token::With) => match expr_queue.last_mut() { |
380 | 380 | Some(ExprNode::Req(lic)) => { |
381 | | - lic.req.addition = Some(AdditionItem::Other { |
| 381 | + lic.req.addition = Some(AdditionItem::Other(Box::new(AdditionRef { |
382 | 382 | doc_ref: doc_ref.map(String::from), |
383 | 383 | add_ref: String::from(*add_ref), |
384 | | - }); |
| 384 | + }))); |
385 | 385 | } |
386 | 386 | _ => unreachable!(), |
387 | 387 | }, |
|
0 commit comments