Skip to content

Commit 41beccb

Browse files
committed
reverting Scope#temporary simplification.
1 parent a4958e7 commit 41beccb

File tree

6 files changed

+29
-22
lines changed

6 files changed

+29
-22
lines changed

lib/grammar.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/nodes.js

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/optparse.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/rewriter.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/scope.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scope.coffee

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ exports.Scope = class Scope
5555

5656
# Generate a temporary variable name at the given index.
5757
temporary: (name, index) ->
58-
'_' + name + if index > 1 then index else ''
58+
if name.length > 1
59+
'_' + name + if index > 1 then index else ''
60+
else
61+
'_' + (index + parseInt name, 36).toString(36).replace /\d/g, 'a'
5962

6063
# Gets the type of a variable.
6164
type: (name) ->

0 commit comments

Comments
 (0)