Skip to content

Commit 0faeeca

Browse files
authored
chore: fix some minor issues in comments (#1573)
Signed-off-by: youzichuan <youzichuan6@outlook.com>
1 parent cc3d47d commit 0faeeca

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

internal/ast/visitor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type NodeVisitorHooks struct {
1919
VisitNodes func(nodes *NodeList, v *NodeVisitor) *NodeList // Overrides visiting a NodeList. Only invoked by the VisitEachChild method on a given Node subtype.
2020
VisitModifiers func(nodes *ModifierList, v *NodeVisitor) *ModifierList // Overrides visiting a ModifierList. Only invoked by the VisitEachChild method on a given Node subtype.
2121
VisitEmbeddedStatement func(node *Statement, v *NodeVisitor) *Statement // Overrides visiting a Node when it is the embedded statement body of an iteration statement, `if` statement, or `with` statement. Only invoked by the VisitEachChild method on a given Node subtype.
22-
VisitIterationBody func(node *Statement, v *NodeVisitor) *Statement // Overrides visiting a Node when it is the embedded statement body body of an iteration statement. Only invoked by the VisitEachChild method on a given Node subtype.
22+
VisitIterationBody func(node *Statement, v *NodeVisitor) *Statement // Overrides visiting a Node when it is the embedded statement body of an iteration statement. Only invoked by the VisitEachChild method on a given Node subtype.
2323
VisitParameters func(nodes *ParameterList, v *NodeVisitor) *ParameterList // Overrides visiting a ParameterList. Only invoked by the VisitEachChild method on a given Node subtype.
2424
VisitFunctionBody func(node *BlockOrExpression, v *NodeVisitor) *BlockOrExpression // Overrides visiting a function body. Only invoked by the VisitEachChild method on a given Node subtype.
2525
VisitTopLevelStatements func(nodes *StatementList, v *NodeVisitor) *StatementList // Overrides visiting a variable environment. Only invoked by the VisitEachChild method on a given Node subtype.

internal/format/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func getLineStartPositionForPosition(position int, sourceFile *ast.SourceFile) i
8383

8484
/**
8585
* Tests whether `child` is a grammar error on `parent`.
86-
* In strada, this also checked node arrays, but it is never acually called with one in practice.
86+
* In strada, this also checked node arrays, but it is never actually called with one in practice.
8787
*/
8888
func isGrammarError(parent *ast.Node, child *ast.Node) bool {
8989
if ast.IsTypeParameterDeclaration(parent) {

internal/nodebuilder/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Exports interfaces and types defining the node builder - concrete implmentations are on top of the checker, but these types and interfaces are used by the emit resolver in the printer
1+
// Exports interfaces and types defining the node builder - concrete implementations are on top of the checker, but these types and interfaces are used by the emit resolver in the printer
22
package nodebuilder
33

44
import (

internal/transformers/declarations/transform.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ func (tx *DeclarationTransformer) visitDeclarationStatements(input *ast.Node) *a
931931
statement := tx.Factory().NewVariableStatement(modList, tx.Factory().NewVariableDeclarationList(ast.NodeFlagsConst, tx.Factory().NewNodeList([]*ast.Node{varDecl})))
932932

933933
assignment := tx.Factory().UpdateExportAssignment(input.AsExportAssignment(), input.Modifiers(), input.Type(), newId)
934-
// Remove coments from the export declaration and copy them onto the synthetic _default declaration
934+
// Remove comments from the export declaration and copy them onto the synthetic _default declaration
935935
tx.preserveJsDoc(statement, input)
936936
tx.removeAllComments(assignment)
937937
return tx.Factory().NewSyntaxList([]*ast.Node{statement, assignment})

0 commit comments

Comments
 (0)