Skip to content

Commit

Permalink
Fixes #1328
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed May 15, 2011
1 parent 2563324 commit f3758e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/nodes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions src/nodes.coffee
Expand Up @@ -907,9 +907,6 @@ exports.Assign = class Assign extends Base
constructor: (@variable, @value, @context, options) ->
@param = options and options.param

# Matchers for detecting class/method names
METHOD_DEF: /^(?:(\S+)\.prototype\.|\S+?)?\b([$A-Za-z_][$\w\x7f-\uffff]*)$/

children: ['variable', 'value']

assigns: (name) ->
Expand All @@ -935,7 +932,7 @@ exports.Assign = class Assign extends Base
o.scope.add name, 'var'
else
o.scope.find name
if @value instanceof Code and match = @METHOD_DEF.exec name
if @value instanceof Code and match = METHOD_DEF.exec name
@value.name = match[2]
@value.klass = match[1] if match[1]
val = @value.compile o, LEVEL_LIST
Expand Down Expand Up @@ -1802,6 +1799,7 @@ TAB = ' '

IDENTIFIER = /^[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*$/
SIMPLENUM = /^[+-]?\d+$/
METHOD_DEF = /^(?:([$A-Za-z_][$\w\x7f-\uffff]*)\.prototype\.)?([$A-Za-z_][$\w\x7f-\uffff]*)$/

# Is a literal value a string?
IS_STRING = /^['"]/
Expand Down

0 comments on commit f3758e4

Please sign in to comment.