Add line numbers to file paths in the website editor structure docs (#3130)

* added the line number to existing path

* Update JS parser to use line numbers

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Mohd Mohsin
2026-02-15 23:59:27 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 82f7dc7062
commit b697cc8131
7 changed files with 51 additions and 14 deletions
+7
View File
@@ -9,6 +9,8 @@ pub fn derive_extract_field_impl(input: TokenStream) -> syn::Result<TokenStream>
let generics = &input.generics;
let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
let line_number = struct_name.span().start().line;
let fields = match &input.data {
Data::Struct(data) => match &data.fields {
Fields::Named(fields) => &fields.named,
@@ -50,6 +52,11 @@ pub fn derive_extract_field_impl(input: TokenStream) -> syn::Result<TokenStream>
fn path() -> &'static str {
file!()
}
fn line_number() -> usize {
#line_number
}
}
};