Skip to content

Instantly share code, notes, and snippets.

View StanAngeloff's full-sized avatar

Stan Angeloff StanAngeloff

View GitHub Profile
mapResponse: (string, block) ->
xml2object.parse string, (error, responseObject) =>
if error
if block then block error else throw error
else
[root, map]: @responseMap
body: responseObject?['soap:Envelope']?['soap:Body']?[root]
if body
result: map2object body, map
if block then block null, result else result
diff --git a/src/grammar.coffee b/src/grammar.coffee
index 9602555..d4c70fc 100644
--- a/src/grammar.coffee
+++ b/src/grammar.coffee
@@ -87,6 +87,7 @@ grammar: {
Expression: [
o "Value"
o "Call"
+ o "RedirectedCall"
o "Code"

Under Expression: [ line 87, after o "Call" line 89 add:

    o "ForwardCall"

Under operators: [ end of file, add:

  ["right",     'FORWARD']
diff --git a/src/nodes.coffee b/src/nodes.coffee
index 275d9b3..06f2ea8 100644
--- a/src/nodes.coffee
+++ b/src/nodes.coffee
@@ -447,7 +447,11 @@ exports.CallNode: class CallNode extends BaseNode
temp: o.scope.freeVariable()
obj: temp
meth: "($temp = ${ @variable.source })${ @variable.last }"
- "${@prefix()}${meth}.apply($obj, ${ @compileSplatArguments(o) })"
+ if @isNew
for i in [0..10]
switch i
when 5
( -> break)()
console.log i
(function() {
for (var child, i = 0, length = document.childNodes.length; i < length && (child = document.childNodes[i]); i ++) {
if (child.nodeType === 7) {
if (child.nodeValue.indexOf('aero') > 0) {
child.nodeValue = 'discard="discard"';
document.removeChild(child);
}
}
}
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/common/chrome_switches.h"
#include "base/base_switches.h"
#include "base/command_line.h"
namespace switches {
diff --git a/src/command.coffee b/src/command.coffee
index 3056894..beeb09c 100644
--- a/src/command.coffee
+++ b/src/command.coffee
@@ -96,7 +96,7 @@ compileScript = (source, code, base) ->
o = options
codeOpts = compileOptions source
if o.require
- require fs.realpathSync file for file in o.require
+ require(if helpers.starts(file, '.') then fs.realpathSync(file) else file) for file in o.require
require 'b'
this_ is_ file_ a
property = (instance, name) ->
instance[name] =
get: -> instance["_#{name}"]
set: (value) -> instance["_#{name}"] = value
get = (instance, route, block) ->
instance.routes[route] = type: 'get', block: block
put = (instance, route, block) ->
instance.routes[route] = type: 'put', block: block