2023-10-06 17:32:58 +00:00
|
|
|
//! Pattern matching.
|
|
|
|
//!
|
|
|
|
//! Note that this module is called "match" but is escaped as "r#match" because
|
|
|
|
//! "match" is a keyword in Rust.
|
|
|
|
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use tree_sitter::Node;
|
|
|
|
|
2023-10-25 20:44:50 +00:00
|
|
|
use crate::{AbstractTree, Map, Result, Value};
|
2023-10-06 17:32:58 +00:00
|
|
|
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq, PartialOrd, Ord)]
|
|
|
|
pub struct Match {}
|
|
|
|
|
|
|
|
impl AbstractTree for Match {
|
2023-10-10 17:29:11 +00:00
|
|
|
fn from_syntax_node(_source: &str, _node: Node) -> Result<Self> {
|
2023-10-06 17:32:58 +00:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
|
2023-10-25 20:44:50 +00:00
|
|
|
fn run(&self, _source: &str, _context: &mut Map) -> Result<Value> {
|
2023-10-06 17:32:58 +00:00
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
}
|