mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
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:
@@ -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?
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user