Improve comments formatting for better output in annotated source

This commit is contained in:
Geoffrey Booth
2016-12-03 21:53:43 -08:00
parent 026d9d6ccd
commit 2f72d0394f
2 changed files with 7 additions and 5 deletions

View File

@@ -48,10 +48,10 @@ exports.Lexer = class Lexer
@exportSpecifierList = no # Used to identify when in an EXPORT {...} FROM? ...
@chunkLine =
opts.line or 0 # The start line for the current @chunk.
opts.line or 0 # The start line for the current @chunk.
@chunkColumn =
opts.column or 0 # The start column of the current @chunk.
code = @clean code # The stripped, cleaned original source code.
opts.column or 0 # The start column of the current @chunk.
code = @clean code # The stripped, cleaned original source code.
# At every position, run through this list of attempted matches,
# short-circuiting if any of them succeed. Their order determines precedence:

View File

@@ -795,7 +795,8 @@ exports.TaggedTemplateCall = class TaggedTemplateCall extends Call
super variable, [ arg ], soak
compileNode: (o) ->
o.inTaggedTemplateCall = yes # Tell StringWithInterpolations whether to compile as ES2015 or not; remove in CoffeeScript 2
# Tell `StringWithInterpolations` whether to compile as ES2015 or not; will be removed in CoffeeScript 2.
o.inTaggedTemplateCall = yes
@variable.compileToFragments(o, LEVEL_ACCESS).concat @args[0].compileToFragments(o, LEVEL_LIST)
#### Extends
@@ -1428,7 +1429,8 @@ exports.Assign = class Assign extends Base
unless varBase.isAssignable()
@variable.error "'#{@variable.compile o}' can't be assigned"
unless varBase.hasProperties?()
if @moduleDeclaration # `moduleDeclaration` can be `'import'` or `'export'`
# `moduleDeclaration` can be `'import'` or `'export'`
if @moduleDeclaration
@checkAssignability o, varBase
o.scope.add varBase.value, @moduleDeclaration
else if @param