Skip to content

Commit 84515a8

Browse files
committed
kkk
1 parent 7b360fd commit 84515a8

File tree

13 files changed

+691
-102
lines changed

13 files changed

+691
-102
lines changed

internal/plugins/react_hooks/code_path_analysis/break_context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package code_path_analyzer
1+
package code_path_analysis
22

33
type BreakContext struct {
44
upper *BreakContext

internal/plugins/react_hooks/code_path_analysis/chain_context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package code_path_analyzer
1+
package code_path_analysis
22

33
type ChainContext struct {
44
upper *ChainContext
@@ -46,6 +46,6 @@ func (s *CodePathState) MakeOptionalNode() {
4646
// This method is called on entering to the `arguments|property` property of each `(Call|Member)Expression` node.
4747
func (s *CodePathState) MakeOptionalRight() {
4848
if s.chainContext != nil {
49-
s.MakeLogicRight()
49+
s.MakeLogicalRight()
5050
}
5151
}

internal/plugins/react_hooks/code_path_analysis/choice_context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package code_path_analyzer
1+
package code_path_analysis
22

33
// A context for ConditionalExpression, LogicalExpression,
44
// AssignmentExpression (logical assignments only), IfStatement, WhileStatement,
@@ -119,7 +119,7 @@ func (s *CodePathState) PopChoiceContext() *ChoiceContext {
119119
}
120120

121121
// Makes a code path segment of the right-hand operand of a logical expression.
122-
func (s *CodePathState) MakeLogicRight() {
122+
func (s *CodePathState) MakeLogicalRight() {
123123
context := s.choiceContext
124124
forkContext := s.forkContext
125125

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package code_path_analyzer
1+
package code_path_analysis
22

33
type CodePath struct {
4-
id string // An identifier
5-
origin string // The type of code path origin
6-
upper *CodePath // The code path of the upper function scope
7-
onLooped func() // A callback funciton to notify looping
8-
childCodePaths []*CodePath // The code paths of nested function scopes
9-
state *CodePathState // The state of the code path
4+
id string // An identifier
5+
origin string // The type of code path origin
6+
upper *CodePath // The code path of the upper function scope
7+
onLooped func(fromSegment *CodePathSegment, toSegment *CodePathSegment) // A callback funciton to notify looping
8+
childCodePaths []*CodePath // The code paths of nested function scopes
9+
state *CodePathState // The state of the code path
1010
}

0 commit comments

Comments
 (0)