jq_lang 0.2.0

Provides an AST for the jq query language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::node_type::NodeType;

#[derive(Debug)]
pub struct Node {
    pub node_type: NodeType,
    pub value: Option<String>,
    pub children: Option<Vec<Node>>
}

impl Node {
    pub fn new(node_type: NodeType, children: Option<Vec<Node>>, value: Option<String>) -> Self {
        Self {
            node_type: node_type,
            children: children,
            value: value
        }
    }
}