mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-25 18:42:26 +03:00
remove unused grammar paths
This commit is contained in:
parent
cd66497226
commit
f9be039a7b
@ -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)
|
||||
}
|
||||
_ => (),
|
||||
|
@ -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>,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user