in() === '1,2,3,4,5');
try {
  b.set(a, 1);
  assert(1 === 0); // Should not get here.
} catch (e) {
  assert(e instanceof RangeError);
}

b.set(new Int32Array([99, 98]), 2);
assert(b.join() === '1,2,99,98,5');

b.set(new Int32Array([99, 98, 97]), 2);
assert(b.join() === '1,2,99,98,97');

try {
  b.set(new Int32Array([99, 98, 97, 96]), 2);
  assert(1 === 0); // Should not get here.
} catch (e) {
  assert(e instanceof RangeError);
}

try {
  b.set([101, 102, 103, 104], 4);
  assert(1 === 0); // Should not get here.
} catch (e) {
  assert(e instanceof RangeError);
}

//  ab = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
//  a1 = [ ^, ^, ^, ^, ^, ^, ^, ^ ]
//  a2 =             [ ^, ^, ^, ^ ]
var ab = new ArrayBuffer(8);
var a1 = new Uint8Array(ab);
for (var i = 0; i < a1.length; i += 1) {
  a1.set([i], i);
}

var a2 = new Uint8Array(ab, 4);
a1.set(a2, 2);
assert(a1.join() === '0,1,4,5,6,7,6,7');
assert(a2.join() === '6,7,6,7');

var a3 = new Uint32Array(ab, 4);
a1.set(a3, 2);
assert(a1.join() === '0,1,6,5,6,7,6,7');
assert(a3.join() === '117835526');

var a4 = new Uint8Array(ab, 0, 4);
a1.set(a4, 2);
assert(a1.join() === '0,1,0,1,6,5,6,7');
assert(a4.join() === '0,1,0,1');

var a5 = new Uint32Array(ab, 4, 1);
a1.set(a5, 2);
assert(a1.join() === '0,1,6,1,6,5,6,7');
assert(a5.join() === '117835014');

var c = new Int32Array([0xFFFFFFFF]);
var d = new Uint8Array(4);
d.set(c);
assert(d.join() === '255,0,0,0');

var e = new Float32Array([3.33]);
var f = new Uint8Array(1);
f.set(e);
assert(f.join() === '3');
e.set(f);
assert(e.join() === '3');


python-coveralls
coverage
nose


/**
 * @file lexer.js
 * @author clark-t (clarktanglei@163.com)
 * @description 词法分析器
 */

/**
 * 格式化规则
 *
 * @typedef {Array} Rule
 * @param {Function} Rule[0] 执行规则的方法
 * @param {*} Rule[1] 规则描述对象
 */

/**
 * AST 节点对象
 *
 * @typedef {Object} ASTNode
 * @property {string} type AST 节点类型描述
 */

/**
 * 对字符串解析的结果做缓存处理
 *
 * @param {Function} callback 字符串解析回调
 * @p