mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 11:28:30 +08:00
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:
co-authored by
Keavon Chambers
parent
82f7dc7062
commit
b697cc8131
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user