1
0
dust/src/abstract_tree/match.rs

27 lines
693 B
Rust
Raw Normal View History

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-11-30 05:57:15 +00:00
use crate::{AbstractTree, Map, Result, TypeDefinition, 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-11-30 03:54:46 +00:00
fn from_syntax_node(_source: &str, _node: Node, _context: &Map) -> Result<Self> {
2023-10-06 17:32:58 +00:00
todo!()
}
2023-11-30 00:23:42 +00:00
fn run(&self, _source: &str, _context: &Map) -> Result<Value> {
todo!()
}
2023-11-30 05:57:15 +00:00
fn expected_type(&self, _context: &Map) -> Result<TypeDefinition> {
2023-10-06 17:32:58 +00:00
todo!()
}
}