This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>1 1 1 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Regular - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>1 1 1 1</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/lexer.js b/lib/lexer.js | |
index 155a137..21e7159 100644 | |
--- a/lib/lexer.js | |
+++ b/lib/lexer.js | |
@@ -1,36 +1,12 @@ | |
var _ = require('lodash'); | |
-var TYPES = exports.types = { | |
- WHITESPACE: 0, | |
- STRING: 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function anonymous(_swig,_ctx,_filters,_,_fn) { | |
var _output = ""; | |
_output += _filters["e"]((((typeof obj !== "undefined" && obj.hasOwnProperty("a")) ? ((typeof obj !== "undefined" && obj.hasOwnProperty("a")) ? obj.a : "") : ((typeof _ctx.obj !== "undefined" && _ctx.obj.hasOwnProperty("a")) ? _ctx.obj.a : "")))); | |
_output += "\n"; | |
_output += _filters["e"]((((typeof obj !== "undefined") ? ((typeof obj !== "undefined") ? obj : "") : ((typeof _ctx.obj !== "undefined") ? _ctx.obj : ""))['b'])); | |
_output += "\n"; | |
return _output; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmarking | |
Bigger is better | |
======================================== | |
basic.html compile | |
---------------------------------------- | |
[email protected] 5714 | |
Swig:Next 10240 | |
---------------------------------------- | |
Swig:Next is 1.79 times faster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<script src="swig.pack.min.js"></script> | |
</head> | |
<body> | |
<script> | |
var ctx = { | |
abcdefghijklmnopqrstuvwxyz: [ | |
{ foo: 'bar' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% block content %}{% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/variables.test.js b/tests/variables.test.js | |
index fc7cc70..162dc11 100644 | |
--- a/tests/variables.test.js | |
+++ b/tests/variables.test.js | |
@@ -61,6 +61,9 @@ var cases = { | |
{ c: '{{ food.a }}', e: 'tacos' }, | |
{ c: '{{ food["a"] }}', e: 'tacos' }, | |
{ c: '{{ g[0][h.g.i]["c"].b[i] }}', e: 'hi!' }, | |
+ ], | |
+ 'getters work just fine': [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['modules/foo'], function (foo) { | |
describe('test foo', function () { | |
// ... | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.row { | |
width: 100%; | |
padding: 0; | |
clear: both; | |
height: 1%; | |
} | |
.row:after { | |
display: block; | |
height: 0; | |
clear: both; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
, . . | |
. _.-=~~~--._ | |
.+'#### ***#'+. . . | |
. .'/#######/ ; # ##'. | |
. / |###### ######\ . | |
.' \### \\ # ^ ###'. | |
(; |## . ___ ##) . | |
'. ## #####.#.' | |
. \ : #### #### / . . | |
'. ## ## .' |