Skip to content

Commit aafd6e4

Browse files
authored
chore: fix some minor issues in comments (#4462)
1 parent 15300c3 commit aafd6e4

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

internal/js_lexer/js_lexer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ func (lexer *Lexer) scanIdentifierWithEscapes(kind identifierKind) (MaybeSubstri
17131713
// // This is an error (equivalent to "var foo;" except for this rule)
17141714
// \u0076\u0061\u0072 foo;
17151715
//
1716-
// // This is an fine (equivalent to "foo.var;")
1716+
// // This is a fine (equivalent to "foo.var;")
17171717
// foo.\u0076\u0061\u0072;
17181718
//
17191719
if Keywords[text] != 0 {

internal/js_parser/js_parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18228,7 +18228,7 @@ const (
1822818228
whyESMImportStatement
1822918229
)
1823018230

18231-
// Say why this the current file is being considered an ES module
18231+
// Say why the current file is being considered an ES module
1823218232
func (p *parser) whyESModule() (whyESM, []logger.MsgData) {
1823318233
because := "This file is considered to be an ECMAScript module because"
1823418234
switch {

internal/js_printer/js_printer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1759,7 +1759,7 @@ func (p *printer) guardAgainstBehaviorChangeDueToSubstitution(expr js_ast.Expr,
17591759

17601760
// Constant folding is already implemented once in the parser. A smaller form
17611761
// of constant folding (just for numbers) is implemented here to clean up cross-
1762-
// module numeric constants and bitwise operations. This is not an general-
1762+
// module numeric constants and bitwise operations. This is not a general-
17631763
// purpose/optimal approach and never will be. For example, we can't affect
17641764
// tree shaking at this stage because it has already happened.
17651765
func (p *printer) lateConstantFoldUnaryOrBinaryOrIfExpr(expr js_ast.Expr) js_ast.Expr {

internal/linker/linker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5330,12 +5330,12 @@ func (c *linkerContext) renameSymbolsInChunk(chunk *chunkInfo, filesInOrder []ui
53305330
reservedNames := renamer.ComputeReservedNames(moduleScopes, c.graph.Symbols)
53315331

53325332
// Node contains code that scans CommonJS modules in an attempt to statically
5333-
// detect the set of export names that a module will use. However, it doesn't
5333+
// detect the set of export names that a module will use. However, it doesn't
53345334
// do any scope analysis so it can be fooled by local variables with the same
53355335
// name as the CommonJS module-scope variables "exports" and "module". Avoid
53365336
// using these names in this case even if there is not a risk of a name
53375337
// collision because there is still a risk of node incorrectly detecting
5338-
// something in a nested scope as an top-level export. Here's a case where
5338+
// something in a nested scope as a top-level export. Here's a case where
53395339
// this happened: https://github.com/evanw/esbuild/issues/3544
53405340
if c.options.OutputFormat == config.FormatCommonJS && c.options.Platform == config.PlatformNode {
53415341
reservedNames["exports"] = 1

0 commit comments

Comments
 (0)