Skip to content
This repository

Replace "yield" function name with "cede" #28

Closed
wants to merge 1 commit into from

3 participants

Richard Simões Gradus Parnassum Hui Cao
Richard Simões

... in order to address part of issue #25.

Gradus Parnassum
Owner

Appreciate your time. I think using the word 'cede' should work.

Gradus Parnassum gradus closed this
Hui Cao

'cede' works
great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Apr 23, 2012
Richard Simões replace "yield" function name with "cede" 3966f5d
This page is out of date. Refresh to see the latest.
2  src/coffeecup.coffee
@@ -229,7 +229,7 @@ skeleton = (data = {}) ->
229 229
230 230 __cc.render_tag(name, idclass, attrs, contents)
231 231
232   - yield = (f) ->
  232 + cede = (f) ->
233 233 temp_buffer = []
234 234 old_buffer = __cc.buffer
235 235 __cc.buffer = temp_buffer
6 src/compiler.coffee
@@ -30,7 +30,7 @@ skeleton = '''
30 30 }
31 31 return escaped;
32 32 };
33   - var yield = function(f) {
  33 + var cede = function(f) {
34 34 var temp_buffer = '';
35 35 var old_buffer = __cc.buffer;
36 36 __cc.buffer = temp_buffer;
@@ -310,7 +310,7 @@ exports.compile = (source, hardcoded_locals, options) ->
310 310 when 'binary'
311 311
312 312 # Traverse the ast nodes, selectively escaping anything other
313   - # than hardcoded strings and calls to `yield`.
  313 + # than hardcoded strings and calls to `cede`.
314 314 escape_all = (node) ->
315 315 switch node[0]
316 316 when 'binary'
@@ -320,7 +320,7 @@ exports.compile = (source, hardcoded_locals, options) ->
320 320 when 'string'
321 321 return node
322 322 when 'call'
323   - if node[1][0] is 'name' and node[1][1] is 'yield'
  323 + if node[1][0] is 'name' and node[1][1] is 'cede'
324 324 return node
325 325 return escape node
326 326 else
2  src/skeleton.coffee
@@ -13,7 +13,7 @@ h = (txt) ->
13 13 escaped = txt
14 14 escaped
15 15
16   -yield = (f) ->
  16 +cede = (f) ->
17 17 temp_buffer = ""
18 18 old_buffer = __cc.buffer
19 19 __cc.buffer = temp_buffer

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.