mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-07 21:25:31 +00:00
Add optional serde dependency
This commit is contained in:
parent
969ea23d67
commit
713dd2b91e
3 changed files with 7 additions and 0 deletions
|
@ -13,5 +13,6 @@ bstr = { workspace = true }
|
|||
itertools = { workspace = true }
|
||||
num-bigint = { workspace = true }
|
||||
num-complex = { workspace = true }
|
||||
serde = { version = "1.0.133", optional = true, default-features = false }
|
||||
|
||||
lz4_flex = "0.9.2"
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Sourcecode location.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
pub struct Location {
|
||||
pub(super) row: u32,
|
||||
pub(super) column: u32,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue