From af12604e1944d82a5651a3ebde4a7b9608b8fbae Mon Sep 17 00:00:00 2001 From: Amit Upadhyay Date: Thu, 14 Nov 2024 11:19:27 +0530 Subject: [PATCH] more .gitattributes to suppres generated/vendored files from stats --- .gitattributes | 9 +++++++-- v0.5/fastn-section/src/parser/body.rs | 5 +++++ v0.5/fastn-section/src/parser/headers.rs | 5 +++++ v0.5/fastn-section/src/parser/mod.rs | 4 ++++ v0.5/fastn-section/src/parser/section.rs | 13 ++++++------- 5 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 v0.5/fastn-section/src/parser/body.rs create mode 100644 v0.5/fastn-section/src/parser/headers.rs diff --git a/.gitattributes b/.gitattributes index 5a8d2b783..aa758ff6a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,7 +2,12 @@ # on our repo page. # Refer: https://github.com/github/linguist/blob/master/docs/overrides.md -*.html linguist-generated +**.html linguist-generated default-*.js linguist-generated default-*.css linguist-generated -manifest.json linguist-generated \ No newline at end of file +fastn-core/fbt-tests/** linguist-generated +manifest.json linguist-generated +fastn.com/.packages/** linguist-vendored +ftd/t/executor/*.json linguist-generated +ftd/t/interpreter/*.json linguist-generated +ftd/t/node/*.json linguist-generated \ No newline at end of file diff --git a/v0.5/fastn-section/src/parser/body.rs b/v0.5/fastn-section/src/parser/body.rs new file mode 100644 index 000000000..31b0f3a5c --- /dev/null +++ b/v0.5/fastn-section/src/parser/body.rs @@ -0,0 +1,5 @@ +pub fn body( + _scanner: &mut fastn_section::Scanner, +) -> Option { + None // TODO +} diff --git a/v0.5/fastn-section/src/parser/headers.rs b/v0.5/fastn-section/src/parser/headers.rs new file mode 100644 index 000000000..2a01e17bc --- /dev/null +++ b/v0.5/fastn-section/src/parser/headers.rs @@ -0,0 +1,5 @@ +pub fn headers( + _scanner: &mut fastn_section::Scanner, +) -> Vec { + vec![] // TODO +} diff --git a/v0.5/fastn-section/src/parser/mod.rs b/v0.5/fastn-section/src/parser/mod.rs index 1755fa9d1..1a28d3322 100644 --- a/v0.5/fastn-section/src/parser/mod.rs +++ b/v0.5/fastn-section/src/parser/mod.rs @@ -1,4 +1,6 @@ +mod body; mod header_value; +mod headers; mod identifier; mod kind; mod kinded_name; @@ -9,7 +11,9 @@ mod section; mod section_init; mod visibility; +pub use body::body; pub use header_value::header_value; +pub use headers::headers; pub use identifier::identifier; pub use kind::kind; pub use kinded_name::kinded_name; diff --git a/v0.5/fastn-section/src/parser/section.rs b/v0.5/fastn-section/src/parser/section.rs index ae95eb593..fe261ba04 100644 --- a/v0.5/fastn-section/src/parser/section.rs +++ b/v0.5/fastn-section/src/parser/section.rs @@ -6,16 +6,15 @@ pub fn section( scanner.skip_spaces(); let caption = fastn_section::parser::header_value(scanner); - // TODO: implement headers, body Some(fastn_section::Section { init: section_init, caption, - headers: vec![], - body: None, - children: vec![], - function_marker: None, - is_commented: false, - has_end: false, + headers: fastn_section::parser::headers(scanner), + body: fastn_section::parser::body(scanner), + children: vec![], // children is populated by the wiggin::ender. + function_marker: None, // TODO + is_commented: false, // TODO + has_end: false, // has_end is populated by the wiggin::ender. }) }