Skip to content

Commit

Permalink
Added traversal of unnamed nodes (and fixed no punctuation errors)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpontanCombust committed Aug 17, 2024
1 parent 76a5101 commit a98350c
Show file tree
Hide file tree
Showing 20 changed files with 388 additions and 116 deletions.
13 changes: 13 additions & 0 deletions crates/analysis/src/jobs/scan_symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {

ClassDeclarationTraversalPolicy {
traverse_definition,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand Down Expand Up @@ -339,6 +340,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {

StateDeclarationTraversalPolicy {
traverse_definition,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand Down Expand Up @@ -389,6 +391,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {

StructDeclarationTraversalPolicy {
traverse_definition,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand Down Expand Up @@ -423,6 +426,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {

EnumDeclarationTraversalPolicy {
traverse_definition,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand Down Expand Up @@ -547,6 +551,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {
traverse_params: traverse,
traverse_return_type: false,
traverse_definition: traverse,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand Down Expand Up @@ -628,6 +633,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {
traverse_params: traverse,
traverse_return_type: false,
traverse_definition: traverse,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand Down Expand Up @@ -664,6 +670,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {
traverse_params: traverse,
traverse_return_type: false,
traverse_definition: traverse,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand Down Expand Up @@ -802,6 +809,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {
VarDeclarationTraversalPolicy {
traverse_type: false,
traverse_init_value: false,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -817,6 +825,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {
WhileLoopTraversalPolicy {
traverse_cond: false,
traverse_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -825,6 +834,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {
DoWhileLoopTraversalPolicy {
traverse_cond: false,
traverse_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -835,6 +845,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {
traverse_cond: false,
traverse_iter: false,
traverse_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -844,6 +855,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {
traverse_cond: false,
traverse_body: true,
traverse_else_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -852,6 +864,7 @@ impl SyntaxNodeVisitor for SymbolScannerVisitor<'_> {
SwitchConditionalTraversalPolicy {
traverse_cond: false,
traverse_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ impl SyntaxNodeVisitor for ContextualSyntaxAnalysis<'_> {
VarDeclarationTraversalPolicy {
traverse_init_value: false,
traverse_type: false,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -466,6 +467,7 @@ impl SyntaxNodeVisitor for ContextualSyntaxAnalysis<'_> {

ExpressionStatementTraversalPolicy {
traverse_expr: false,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -477,6 +479,7 @@ impl SyntaxNodeVisitor for ContextualSyntaxAnalysis<'_> {
traverse_cond: false,
traverse_body: true,
traverse_else_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -487,6 +490,7 @@ impl SyntaxNodeVisitor for ContextualSyntaxAnalysis<'_> {
SwitchConditionalTraversalPolicy {
traverse_cond: false,
traverse_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -499,6 +503,7 @@ impl SyntaxNodeVisitor for ContextualSyntaxAnalysis<'_> {
traverse_cond: false,
traverse_iter: false,
traverse_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -509,6 +514,7 @@ impl SyntaxNodeVisitor for ContextualSyntaxAnalysis<'_> {
WhileLoopTraversalPolicy {
traverse_cond: false,
traverse_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -519,6 +525,7 @@ impl SyntaxNodeVisitor for ContextualSyntaxAnalysis<'_> {
DoWhileLoopTraversalPolicy {
traverse_cond: false,
traverse_body: true,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -528,6 +535,7 @@ impl SyntaxNodeVisitor for ContextualSyntaxAnalysis<'_> {

DeleteStatementTraversalPolicy {
traverse_value: false,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand All @@ -546,6 +554,7 @@ impl SyntaxNodeVisitor for ContextualSyntaxAnalysis<'_> {

ReturnStatementTraversalPolicy {
traverse_value: false,
traverse_unnamed: false,
traverse_errors: false
}
}
Expand Down
Loading

0 comments on commit a98350c

Please sign in to comment.