Merge branch 'master' of github.com:jashkenas/coffeescript into 2

# Conflicts:
#	lib/coffee-script/nodes.js
#	lib/coffee-script/scope.js
This commit is contained in:
Geoffrey
2017-02-04 12:36:49 -08:00
5 changed files with 22 additions and 7 deletions

View File

@@ -1586,7 +1586,7 @@ exports.ModuleSpecifier = class ModuleSpecifier extends Base
children: ['original', 'alias']
compileNode: (o) ->
o.scope.add @identifier, @moduleDeclarationType
o.scope.find @identifier, @moduleDeclarationType
code = []
code.push @makeCode @original.value
code.push @makeCode " as #{@alias.value}" if @alias?

View File

@@ -44,9 +44,9 @@ function object that has a name filled in, or bottoms out.
Look up a variable name in lexical scope, and declare it if it does not
already exist.
find: (name) ->
find: (name, type = 'var') ->
return yes if @check name
@add name, 'var'
@add name, type
no
Reserve a variable name as originating from a function parameter for this
@@ -116,4 +116,3 @@ of this scope.
assignedVariables: ->
"#{v.name} = #{v.type.value}" for v in @variables when v.type.assigned