mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 18:18:13 +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
@@ -7,6 +7,8 @@ pub fn generate_hierarchical_tree(input: TokenStream) -> syn::Result<TokenStream
|
||||
let input = parse2::<DeriveInput>(input)?;
|
||||
let input_type = &input.ident;
|
||||
|
||||
let line_number = input_type.span().start().line;
|
||||
|
||||
let data = match &input.data {
|
||||
Data::Enum(data) => data,
|
||||
_ => return Err(syn::Error::new(Span::call_site(), "Tried to derive HierarchicalTree for non-enum")),
|
||||
@@ -101,6 +103,8 @@ pub fn generate_hierarchical_tree(input: TokenStream) -> syn::Result<TokenStream
|
||||
|
||||
message_tree.set_path(file!());
|
||||
|
||||
message_tree.set_line_number(#line_number);
|
||||
|
||||
message_tree
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user