Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

+ Pulled unique.rb from ParseTree to sexp_processor.

[git-p4: depot-paths = "//src/sexp_processor/dev/": change = 5076]
  • Loading branch information...
commit fd08a920b196c38a9fe64e3a5c42864ab66ff42a 1 parent 30a546f
Ryan Davis authored June 17, 2009
1  Manifest.txt
@@ -5,6 +5,7 @@ Rakefile
5 5
 lib/composite_sexp_processor.rb
6 6
 lib/sexp.rb
7 7
 lib/sexp_processor.rb
  8
+lib/unique.rb
8 9
 test/test_composite_sexp_processor.rb
9 10
 test/test_environment.rb
10 11
 test/test_sexp.rb
15  lib/unique.rb
... ...
@@ -0,0 +1,15 @@
  1
+##
  2
+# Unique creates unique variable names.
  3
+
  4
+class Unique
  5
+  def self.reset # mostly for testing
  6
+    @@curr = 0
  7
+  end
  8
+
  9
+  def self.next
  10
+    @@curr += 1
  11
+    "temp_#{@@curr}".intern
  12
+  end
  13
+
  14
+  reset
  15
+end

0 notes on commit fd08a92

Please sign in to comment.
Something went wrong with that request. Please try again.