fix: make ast node ids optional (#1254)
This commit is contained in:
parent
4ba8adf87c
commit
1e2b02920b
|
@ -27,7 +27,8 @@ pub struct Ast {
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
pub struct Node {
|
pub struct Node {
|
||||||
/// The node ID.
|
/// The node ID.
|
||||||
pub id: usize,
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<usize>,
|
||||||
|
|
||||||
/// The node type.
|
/// The node type.
|
||||||
#[serde(rename = "nodeType")]
|
#[serde(rename = "nodeType")]
|
||||||
|
|
Loading…
Reference in New Issue