remove unused grammar paths

This commit is contained in:
collin 2021-01-21 17:02:27 -05:00
parent cd66497226
commit f9be039a7b
2 changed files with 2 additions and 12 deletions

View File

@ -38,7 +38,7 @@ pub fn load_annotation(
Definition::Circuit(_) => unimplemented!("annotated circuits are not supported yet"),
// TODO need someone to take functions annotated with @test to be moved from function to tests.
Definition::Function(function) => match ast_annotation.name {
AnnotationName::Test(_) | AnnotationName::TestWithContext(_) => {
AnnotationName::Test(_) => {
let ident = Identifier::from(function.identifier.clone());
_functions.remove(&ident.clone());
@ -58,8 +58,7 @@ pub fn load_annotated_test(test: TestFunction, annotation: Annotation, tests: &m
let ast_arguments = annotation.arguments;
match name {
AnnotationName::Test(_) => (),
AnnotationName::TestWithContext(_) if ast_arguments.is_some() => {
AnnotationName::Test(_) if ast_arguments.is_some() => {
load_annotated_test_context(test, ast_arguments.unwrap(), tests)
}
_ => (),

View File

@ -24,7 +24,6 @@ use serde::Serialize;
#[pest_ast(rule(Rule::annotation_name))]
pub enum AnnotationName<'ast> {
Test(Test<'ast>),
TestWithContext(TestWithContext<'ast>),
}
#[derive(Clone, Debug, FromPest, PartialEq, Serialize)]
@ -34,11 +33,3 @@ pub struct Test<'ast> {
#[serde(with = "SpanDef")]
pub span: Span<'ast>,
}
#[derive(Clone, Debug, FromPest, PartialEq, Serialize)]
#[pest_ast(rule(Rule::test))]
pub struct TestWithContext<'ast> {
#[pest_ast(outer())]
#[serde(with = "SpanDef")]
pub span: Span<'ast>,
}