From 60c2bf5bcc0dd8aba315914c8648be8627bfb479 Mon Sep 17 00:00:00 2001 From: Lokathor Date: Tue, 22 Oct 2024 13:07:23 -0600 Subject: [PATCH] Update parser_tests.rs --- tests/parser_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/parser_tests.rs b/tests/parser_tests.rs index b89810d..723906f 100644 --- a/tests/parser_tests.rs +++ b/tests/parser_tests.rs @@ -1,6 +1,6 @@ use yagbas::{ item::{parse_token_trees_to_items, FnDecl, Item, Statement}, - src_files::{FileSpan, FileSpanned, SrcFileInfo, SrcID}, + src_files::{FileSpanned, SrcFileInfo, SrcID}, str_id::StrID, token_tree::parse_tokens_to_token_trees, }; @@ -71,7 +71,7 @@ fn can_parse_return_statement() { let src = r#" fn main() { return } "#; let items = parse_items_no_errors(src); match items.as_slice() { - [(item, _file_span)] => match item { + [item] => match item._payload { Item::Fn(FnDecl { name, args, statements }) => { assert_eq!(name.as_str(), "main"); assert!(args.is_empty());