mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Improve comments formatting for better output in annotated source
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user