Permalink
Browse files

s/string-literal/token

  • Loading branch information...
1 parent 59b41ba commit a9f3c3364b25075aaf4849e498d63e6e18553890 @thorstadt committed Mar 1, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/bean/surgeon.clj
View
10 src/bean/surgeon.clj
@@ -32,12 +32,12 @@
(loop [changed-lines {}
remaining tokens]
(if (seq remaining)
- (let [string-literal (first remaining)
- start (.getCharPositionInLine string-literal)
- token-size (count (.getText string-literal))
+ (let [token (first remaining)
+ start (.getCharPositionInLine token)
+ token-size (count (.getText token))
stop (+ start
token-size)
- line-number (.getLine string-literal)
+ line-number (.getLine token)
charoffset (or
(:charoffset (get changed-lines line-number))
0)
@@ -46,7 +46,7 @@
(nth lines (- line-number 1)))
beginning (.substring line-text 0 (+ charoffset start))
end (.substring line-text (+ charoffset stop))
- new-value (f string-literal)
+ new-value (f token)
modified (str beginning new-value end)]
(recur
(merge changed-lines {line-number

0 comments on commit a9f3c33

Please sign in to comment.