This commit is contained in:
Jeff 2024-08-02 11:01:02 -04:00
parent 175d82d382
commit 0e479197a7

View File

@ -41,11 +41,11 @@ impl Interpreter {
} }
/// Lexes the source code and returns a list of tokens. /// Lexes the source code and returns a list of tokens.
pub fn lex<'id>( pub fn lex<'src>(
&self, &self,
source_id: Arc<str>, source_id: Arc<str>,
source: &'id Arc<str>, source: &'src Arc<str>,
) -> Result<Vec<Token<'id>>, InterpreterError> { ) -> Result<Vec<Token<'src>>, InterpreterError> {
self.sources self.sources
.write() .write()
.unwrap() .unwrap()
@ -60,10 +60,10 @@ impl Interpreter {
} }
/// Parses the source code and returns an abstract syntax tree. /// Parses the source code and returns an abstract syntax tree.
pub fn parse<'id>( pub fn parse(
&self, &self,
source_id: Arc<str>, source_id: Arc<str>,
source: &'id Arc<str>, source: &Arc<str>,
) -> Result<AbstractTree, InterpreterError> { ) -> Result<AbstractTree, InterpreterError> {
self.sources self.sources
.write() .write()