From fcf0a6d7b1320a4afbfc4a4dcec1f3bc220fbd01 Mon Sep 17 00:00:00 2001 From: Aron Zwaan Date: Fri, 1 Dec 2023 11:27:42 +0100 Subject: [PATCH] Try write first test --- scopegraphs-lib/Cargo.toml | 1 + scopegraphs-lib/src/resolve/topdown.rs | 57 +++++++++++++------ .../src/scopegraph/completeness.rs | 53 ++++++++++------- scopegraphs-lib/src/scopegraph/mod.rs | 23 +++++--- 4 files changed, 89 insertions(+), 45 deletions(-) diff --git a/scopegraphs-lib/Cargo.toml b/scopegraphs-lib/Cargo.toml index 53a1e4f..cbeb5de 100644 --- a/scopegraphs-lib/Cargo.toml +++ b/scopegraphs-lib/Cargo.toml @@ -12,3 +12,4 @@ scopegraphs-regular-expressions = {path = "../scopegraphs-regular-expressions"} [dev-dependencies] scopegraphs = {path = "../scopegraphs"} +scopegraphs-macros = {path = "../scopegraphs-macros"} diff --git a/scopegraphs-lib/src/resolve/topdown.rs b/scopegraphs-lib/src/resolve/topdown.rs index 99d2f82..d999a78 100644 --- a/scopegraphs-lib/src/resolve/topdown.rs +++ b/scopegraphs-lib/src/resolve/topdown.rs @@ -3,7 +3,7 @@ use std::iter; use crate::{ label::Label, - scopegraph::{Completeness, Scope}, + scopegraph::{completeness::Completeness, Scope}, }; use scopegraphs_regular_expressions::RegexMatcher; @@ -20,18 +20,18 @@ pub trait DataOrder: for<'sg> Fn(&'sg DATA, &'sg DATA) -> bool {} impl DataOrder for T where for<'sg> T: Fn(&'sg DATA, &'sg DATA) -> bool {} #[derive(Debug, Hash, PartialEq, Eq)] -pub enum EdgeOrData<'sg, LABEL> { +pub enum EdgeOrData