Skip to content

Instantly share code, notes, and snippets.

View StanAngeloff's full-sized avatar

Stan Angeloff StanAngeloff

View GitHub Profile
diff --git a/lib/command.js b/lib/command.js
index cb1d9e7..a1fe63b 100644
--- a/lib/command.js
+++ b/lib/command.js
@@ -80,7 +80,7 @@
}
return _f;
});
- } else if (path.extname(source) === '.coffee') {
+ } else {
<?php
namespace my\space;
final class from_1
{
public function trigger()
{}
}
$toolkit.include('command.language');
$self.controller = function controller() {
var canChangeTriggerKeys, command, supportedLanguages, triggerKeys;
$toolkit.command.language.controller.apply(this, [(command = 'autoCloseFirst'), (triggerKeys = '/'), (supportedLanguages = ['HTML']), (canChangeTriggerKeys = false)]);
this.trigger = function trigger(e) {
var scimoz = ko.views.manager.currentView.scimoz;
if (scimoz.autoCActive()) {
window.setTimeout(function() {
scimoz.autoCComplete();
}, 250);
async_load(
-> # success
yay()
-> # failure
boo()
)
obj: {
_value: []
get value: -> @_value
set value: (val) -> @_value: val
one: (n) -> n.concat [n[-1] + 1]
two: (n) -> n.concat [n[-1] + 2]
}
if (!(cond)) {
expression;
}
vs.
if ( ! (cond)) {
expression;
}
# This is at the start of the current Lexer.
# Import the helpers we need.
helpers: require('./helpers').helpers
include: helpers.include
count: helpers.count
starts: helpers.starts
compact: helpers.compact
balanced_string: helpers.balanced_string
diff --git a/src/lexer.coffee b/src/lexer.coffee
index 1fba057..59c0595 100644
--- a/src/lexer.coffee
+++ b/src/lexer.coffee
@@ -199,7 +199,7 @@ exports.Lexer: class Lexer
prev: @prev(2)
size: indent.match(LAST_DENTS).reverse()[0].match(LAST_DENT)[1].length
next_character: @chunk.match(MULTI_DENT)[4]
- no_newlines: next_character is '.' or @unfinished()
+ no_newlines: next_character is '.' or next_character is '+' or @unfinished()
diff --git a/src/rewriter.coffee b/src/rewriter.coffee
index ec07bd4..6210088 100644
--- a/src/rewriter.coffee
+++ b/src/rewriter.coffee
@@ -54,10 +54,14 @@ exports.Rewriter: class Rewriter
adjust_comments: ->
@scan_tokens (prev, token, post, i) =>
return 1 unless token[0] is 'COMMENT'
+ before: @tokens[i - 2]
after: @tokens[i + 2]
[left: right]: bag