switched to Arc instead of Rc for input strings

This commit is contained in:
2025-03-23 17:37:15 -04:00
parent 8fffe1cd71
commit 32ec62b52f
15 changed files with 61 additions and 70 deletions

View File

@@ -1,4 +1,4 @@
use std::rc::Rc;
use std::rc::Arc;
use crate::parse::{lex::{LexFlags, LexStream}, node_operation, Node, ParseStream};
@@ -15,7 +15,7 @@ pub fn get_nodes<F1>(input: &str, filter: F1) -> Vec<Node>
F1: Fn(&Node) -> bool
{
let mut nodes = vec![];
let tokens = LexStream::new(Rc::new(input.into()), LexFlags::empty())
let tokens = LexStream::new(Arc::new(input.into()), LexFlags::empty())
.map(|tk| tk.unwrap())
.collect::<Vec<_>>();
let mut parsed_nodes = ParseStream::new(tokens)