Move parsing files around (#4626)

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2024-12-05 17:56:49 +13:00
committed by GitHub
parent cab0c1e6a1
commit 60a0c811ab
128 changed files with 500 additions and 455 deletions

View File

@ -797,7 +797,7 @@ mod tests {
#[test]
fn test_serialize_function() {
let some_function = crate::ast::types::Function::StdLib {
let some_function = crate::parsing::ast::types::Function::StdLib {
func: Box::new(crate::std::sketch::Line),
};
let serialized = serde_json::to_string(&some_function).unwrap();
@ -807,11 +807,11 @@ mod tests {
#[test]
fn test_deserialize_function() {
let some_function_string = r#"{"type":"StdLib","func":{"name":"line","summary":"","description":"","tags":[],"returnValue":{"type":"","required":false,"name":"","schema":{},"schemaDefinitions":{}},"args":[],"unpublished":false,"deprecated":false, "examples": []}}"#;
let some_function: crate::ast::types::Function = serde_json::from_str(some_function_string).unwrap();
let some_function: crate::parsing::ast::types::Function = serde_json::from_str(some_function_string).unwrap();
assert_eq!(
some_function,
crate::ast::types::Function::StdLib {
crate::parsing::ast::types::Function::StdLib {
func: Box::new(crate::std::sketch::Line)
}
);