file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
crates/swc_ecma_minifier/tests/terser/compress/wrap_iife/wrap_iife_in_return_call/output.terser.js | JavaScript | (function () {
return (function () {
console.log("test");
})();
})()();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_with_side_effects/input.js | JavaScript | var GeneratorPrototype = Object.getPrototypeOf(
Object.getPrototypeOf((function* () {})())
);
evaluate(GeneratorPrototype);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_with_side_effects/output.js | JavaScript | var GeneratorPrototype = Object.getPrototypeOf(
Object.getPrototypeOf((function* () {})())
);
evaluate(GeneratorPrototype);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_with_side_effects/output.mangleOnly.js | JavaScript | var t = Object.getPrototypeOf(Object.getPrototypeOf((function*() {})()));
evaluate(t);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_with_side_effects/output.terser.js | JavaScript | var GeneratorPrototype = Object.getPrototypeOf(
Object.getPrototypeOf((function* () {})())
);
evaluate(GeneratorPrototype);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_without_side_effects/input.js | JavaScript | var GeneratorPrototype = Object.getPrototypeOf(
Object.getPrototypeOf((function* () {})())
);
evaluate(GeneratorPrototype);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_without_side_effects/output.js | JavaScript | var GeneratorPrototype = Object.getPrototypeOf(
Object.getPrototypeOf((function* () {})())
);
evaluate(GeneratorPrototype);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_without_side_effects/output.mangleOnly.js | JavaScript | var t = Object.getPrototypeOf(Object.getPrototypeOf((function*() {})()));
evaluate(t);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/empty_generator_as_parameter_without_side_effects/output.terser.js | JavaScript | var GeneratorPrototype = Object.getPrototypeOf(
Object.getPrototypeOf((function* () {})())
);
evaluate(GeneratorPrototype);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generator_yield_undefined/input.js | JavaScript | function* fn() {
yield;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generator_yield_undefined/output.js | JavaScript | function* fn() {
yield;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generator_yield_undefined/output.mangleOnly.js | JavaScript | function* i() {
yield;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generator_yield_undefined/output.terser.js | JavaScript | function* fn() {
yield;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators/input.js | JavaScript | function* fn() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators/output.js | JavaScript | function* fn() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators/output.mangleOnly.js | JavaScript | function* n() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators/output.terser.js | JavaScript | function* fn() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield/input.js | JavaScript | function* fn() {
yield remote();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield/output.js | JavaScript | function* fn() {
yield remote();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield/output.mangleOnly.js | JavaScript | function* e() {
yield remote();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield/output.terser.js | JavaScript | function* fn() {
yield remote();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield_assign/input.js | JavaScript | function* fn() {
var x = {};
x.prop = yield 5;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield_assign/output.js | JavaScript | function* fn() {
var x = {};
x.prop = yield 5;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield_assign/output.mangleOnly.js | JavaScript | function* i() {
var i = {};
i.prop = yield 5;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/generators_yield_assign/output.terser.js | JavaScript | function* fn() {
var x = {};
x.prop = yield 5;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2689/input.js | JavaScript | function* y() {
var t = yield x();
return new t();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2689/output.js | JavaScript | function* y() {
return new (yield x())();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2689/output.mangleOnly.js | JavaScript | function* n() {
var n = yield x();
return new n();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2689/output.terser.js | JavaScript | function* y() {
return new (yield x())();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2832/input.js | JavaScript | function* gen(i) {
const result = yield ((x = i), -x);
var x;
console.log(x);
console.log(result);
yield 2;
}
var x = gen(1);
console.log(x.next("first").value);
console.log(x.next("second").value);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2832/output.js | JavaScript | function* gen(i) {
const result = yield (x = i, -x);
var x;
console.log(x);
console.log(result);
yield 2;
}
var x = gen(1);
console.log(x.next("first").value);
console.log(x.next("second").value);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2832/output.mangleOnly.js | JavaScript | function* o(o) {
const l = yield ((e = o), -e);
var e;
console.log(e);
console.log(l);
yield 2;
}
var l = o(1);
console.log(l.next("first").value);
console.log(l.next("second").value);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_2832/output.terser.js | JavaScript | function* gen(i) {
const result = yield ((x = i), -x);
var x;
console.log(x);
console.log(result);
yield 2;
}
var x = gen(1);
console.log(x.next("first").value);
console.log(x.next("second").value);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_t60/input.js | JavaScript | function* t() {
const v = yield 1;
yield 2;
return v;
}
var g = t();
console.log(g.next().value, g.next().value);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_t60/output.js | JavaScript | function* t() {
const v = yield 1;
yield 2;
return v;
}
var g = t();
console.log(g.next().value, g.next().value);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_t60/output.mangleOnly.js | JavaScript | function* e() {
const e = yield 1;
yield 2;
return e;
}
var n = e();
console.log(n.next().value, n.next().value);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/issue_t60/output.terser.js | JavaScript | function* t() {
const v = yield 1;
yield 2;
return v;
}
var g = t();
console.log(g.next().value, g.next().value);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_ES5_property/input.js | JavaScript | "use strict";
console.log({ yield: 42 }.yield);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_ES5_property/output.js | JavaScript | "use strict";
console.log({ yield: 42 }.yield);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_ES5_property/output.mangleOnly.js | JavaScript | "use strict";
console.log({
yield: 42
}.yield);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_ES5_property/output.terser.js | JavaScript | "use strict";
console.log({ yield: 42 }.yield);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_identifier_in_function_in_generator/input.js | JavaScript | var g = function* () {
function h() {
yield = 1;
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_identifier_in_function_in_generator/output.js | JavaScript | var g = function* () {
function h() {
yield = 1;
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_identifier_in_function_in_generator/output.mangleOnly.js | JavaScript | var n = function*() {
function n() {
yield = 1;
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_identifier_in_function_in_generator/output.terser.js | JavaScript | var g = function* () {
function h() {
yield = 1;
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_identifier_outside_strict_mode/input.js | JavaScript | import yield from "bar";
yield = 123;
while (true) {
yield: for (;;) break yield;
foo();
}
while (true) yield: for (;;) continue yield;
function yield() {}
function foo(...yield) {}
try {
new Error("");
} catch (yield) {}
var yield = "foo";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_identifier_outside_strict_mode/output.js | JavaScript | import yield from "bar";
yield = 123;
while (true) {
yield: for (;;) break yield;
foo();
}
while (true) yield: for (;;) continue yield;
function yield() {}
function foo(...yield) {}
try {
new Error("");
} catch (yield) {}
var yield = "foo";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_as_identifier_outside_strict_mode/output.terser.js | JavaScript | import yield from "bar";
yield = 123;
while (true) {
yield: for (;;) break yield;
foo();
}
while (true) yield: for (;;) continue yield;
function yield() {}
function foo(...yield) {}
try {
new Error("");
} catch (yield) {}
var yield = "foo";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_before_punctuators/input.js | JavaScript | iter = (function* () {
assignmentResult = [x = yield] = value;
})();
function* g1() {
yield;
}
function* g2() {
[yield];
}
function* g3() {
yield, yield;
}
function* g4() {
(yield) ? yield : yield;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_before_punctuators/output.js | JavaScript | iter = (function*() {
assignmentResult = [x = yield] = value;
})();
function* g1() {
yield;
}
function* g2() {
[(yield)];
}
function* g3() {
yield, yield;
}
function* g4() {
(yield) ? yield : yield;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_before_punctuators/output.mangleOnly.js | JavaScript | iter = (function*() {
assignmentResult = [x = yield] = value;
})();
function* i() {
yield;
}
function* e() {
[
yield
];
}
function* n() {
yield, yield;
}
function* l() {
(yield) ? yield : yield;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_before_punctuators/output.terser.js | JavaScript | iter = (function* () {
assignmentResult = [x = yield] = value;
})();
function* g1() {
yield;
}
function* g2() {
[yield];
}
function* g3() {
yield, yield;
}
function* g4() {
(yield) ? yield : yield;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_dot/input.js | JavaScript | function* foo() {
yield x.foo;
(yield x).foo;
yield (yield obj.foo()).bar();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_dot/output.js | JavaScript | function* foo() {
yield x.foo;
(yield x).foo;
yield (yield obj.foo()).bar();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_dot/output.mangleOnly.js | JavaScript | function* o() {
yield x.foo;
(yield x).foo;
yield (yield obj.foo()).bar();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_dot/output.terser.js | JavaScript | function* foo() {
yield x.foo;
(yield x).foo;
yield (yield obj.foo()).bar();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_optimize_expression/input.js | JavaScript | function* f1() {
yield;
}
function* f2() {
yield undefined;
}
function* f3() {
yield null;
}
function* f4() {
yield* undefined;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_optimize_expression/output.js | JavaScript | function* f1() {
yield;
}
function* f2() {
yield;
}
function* f3() {
yield null;
}
function* f4() {
yield* void 0;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_optimize_expression/output.mangleOnly.js | JavaScript | function* n() {
yield;
}
function* i() {
yield undefined;
}
function* d() {
yield null;
}
function* e() {
yield* undefined;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_optimize_expression/output.terser.js | JavaScript | function* f1() {
yield;
}
function* f2() {
yield;
}
function* f3() {
yield null;
}
function* f4() {
yield* void 0;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_statements/input.js | JavaScript | function* fn() {
var a = (yield 1) + (yield 2);
var b = (yield 3) === (yield 4);
var c = (yield 5) << (yield 6);
var d = yield 7;
var e = (yield 8) ? yield 9 : yield 10;
var f = -(yield 11);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_statements/output.js | JavaScript | function* fn() {
var a = (yield 1) + (yield 2);
var b = (yield 3) === (yield 4);
var c = (yield 5) << (yield 6);
var d = yield 7;
var e = (yield 8) ? yield 9 : yield 10;
var f = -(yield 11);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_statements/output.mangleOnly.js | JavaScript | function* i() {
var i = (yield 1) + (yield 2);
var d = (yield 3) === (yield 4);
var e = (yield 5) << (yield 6);
var l = yield 7;
var y = (yield 8) ? yield 9 : yield 10;
var a = -(yield 11);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_statements/output.terser.js | JavaScript | function* fn() {
var a = (yield 1) + (yield 2);
var b = (yield 3) === (yield 4);
var c = (yield 5) << (yield 6);
var d = yield 7;
var e = (yield 8) ? yield 9 : yield 10;
var f = -(yield 11);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_sub/input.js | JavaScript | function* foo() {
yield x["foo"];
(yield x)["foo"];
yield (yield obj.foo())["bar"]();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_sub/output.js | JavaScript | function* foo() {
yield x["foo"];
(yield x)["foo"];
yield (yield obj.foo())["bar"]();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_sub/output.mangleOnly.js | JavaScript | function* o() {
yield x["foo"];
(yield x)["foo"];
yield (yield obj.foo())["bar"]();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser/compress/yield/yield_sub/output.terser.js | JavaScript | function* foo() {
yield x["foo"];
(yield x)["foo"];
yield (yield obj.foo())["bar"]();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser_exec.rs | Rust | extern crate swc_malloc;
use std::{
fmt::Debug,
fs::read_to_string,
path::{Path, PathBuf},
process::Command,
sync::mpsc,
thread,
time::{Duration, Instant},
};
use ansi_term::Color;
use anyhow::{anyhow, bail, Context, Error};
use serde::Deserialize;
use swc_common::{
comments::SingleThr... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_minifier/tests/terser_exec_base.js | JavaScript | global.id = (v) => v;
global.leak = (cb) => cb;
global.sideefffect = (() => {
let i = 0;
return () => {
console.log(`Side effect: ${i++}`);
};
})();
global.pass = () => console.log("PASS");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/compare.rs | Rust | extern crate swc_malloc;
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{FileName, Span, DUMMY_SP};
use swc_ecma_ast::Module;
use swc_ecma_parser::{Parser, StringInput, Syntax};
use swc_ecma_visit::{Fold, FoldWith, VisitMut, VisitMutWith};
static SOURC... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/files/angular-1.2.5.js | JavaScript | /**
* @license AngularJS v1.2.5
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {'use strict';
/**
* @description
*
* This object provides a utility for producing rich Error messages within
* Angular. It can be called as follows:
*
* var exampleMinEr... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/files/backbone-1.1.0.js | JavaScript | // Backbone.js 1.1.0
// (c) 2010-2011 Jeremy Ashkenas, DocumentCloud Inc.
// (c) 2011-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
(function(... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/files/jquery-1.9.1.js | JavaScript | /*!
* jQuery JavaScript Library v1.9.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-2-4
*/
(function( window, undefined ) {
// Can't do t... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/files/jquery.mobile-1.4.2.js | JavaScript | /*!
* jQuery Mobile 1.4.2
* Git HEAD hash: 9d9a42a27d0c693e8b5569c3a10d771916af5045 <> Date: Fri Feb 28 2014 17:32:01 UTC
* http://jquerymobile.com
*
* Copyright 2010, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
*/
(function ( root, doc, factory ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/files/mootools-1.4.5.js | JavaScript | /*
---
MooTools: the javascript framework
web build:
- http://mootools.net/core/76bf47062d6c1983d66ce47ad66aa0e0
packager build:
- packager build Core/Core Core/Array Core/String Core/Number Core/Function Core/Object Core/Event Core/Browser Core/Class Core/Class.Extras Core/Slick.Parser Core/Slick.Finder Core/Eleme... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/files/underscore-1.5.2.js | JavaScript | // Underscore.js 1.5.2
// http://underscorejs.org
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/files/yui-3.12.0.js | JavaScript | /*
YUI 3.12.0 (build 8655935)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
/**
The YUI module contains the components required for building the YUI seed file.
This includes the script loading mechanism, a simple queue, and the core
utilities for the ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/lexer.rs | Rust | extern crate swc_malloc;
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::FileName;
use swc_ecma_parser::{lexer::Lexer, StringInput, Syntax, TsSyntax};
fn bench_module(b: &mut Bencher, syntax: Syntax, src: &'static str) {
let _ = ::testing::run_test(... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/benches/parser.rs | Rust | extern crate swc_malloc;
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{comments::SingleThreadedComments, FileName};
use swc_ecma_parser::{lexer::Lexer, Parser, StringInput, Syntax, TsSyntax};
fn bench_module(b: &mut Bencher, syntax: Syntax, src: &'st... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/colors.js | JavaScript | "use strict";
/**
* Extract red color out of a color integer:
*
* 0x00DEAD -> 0x00
*
* @param {Number} color
* @return {Number}
*/
function red(color) {
return color >> 16;
}
/**
* Extract green out of a color integer:
*
* 0x00DEAD -> 0xDE
*
* @param {Number} color
* @return {Number}
*/
function gre... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/examples/lexer.rs | Rust | use swc_common::{
errors::{ColorConfig, Handler},
sync::Lrc,
FileName, SourceMap,
};
use swc_ecma_parser::{lexer::Lexer, Capturing, Parser, StringInput, Syntax};
fn main() {
let cm: Lrc<SourceMap> = Default::default();
let handler = Handler::with_tty_emitter(ColorConfig::Auto, true, false, Some(cm.... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/examples/parse-all.rs | Rust | #![deny(warnings)]
extern crate swc_malloc;
use std::{env, path::PathBuf, time::Instant};
use codspeed_criterion_compat::black_box;
use swc_common::{errors::HANDLER, GLOBALS};
use swc_ecma_parser::parse_file_as_module;
use walkdir::WalkDir;
fn main() {
let dirs = env::args().skip(1).collect::<Vec<_>>();
let... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/examples/perf.rs | Rust | extern crate swc_malloc;
use std::{collections::hash_map::DefaultHasher, hash::Hash};
use codspeed_criterion_compat::black_box;
use swc_common::{sync::Lrc, SourceMap};
use swc_ecma_parser::{lexer::Lexer, Parser, StringInput, Syntax, TsSyntax};
fn main() {
let mut cnt = 0;
let mut hasher = DefaultHasher::new(... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/examples/typescript.rs | Rust | use swc_common::{
errors::{ColorConfig, Handler},
sync::Lrc,
FileName, SourceMap,
};
use swc_ecma_parser::{lexer::Lexer, Capturing, Parser, StringInput, Syntax};
fn main() {
let cm: Lrc<SourceMap> = Default::default();
let handler = Handler::with_tty_emitter(ColorConfig::Auto, true, false, Some(cm.... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/scripts/crlf.sh | Shell | #!/usr/bin/env bash
find tests/tsc -type f -exec ./scripts/dos2unix.sh {} \;
find tests/typescript -type f -exec ./scripts/dos2unix.sh {} \;
find tests/typescript-errors -type f -exec ./scripts/dos2unix.sh {} \;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/scripts/dos2unix.sh | Shell | #!/usr/bin/env bash
for x
do
echo "Converting $x"
mkdir -p $(dirname "tmp.$x")
tr -d '\015' < "$x" > "tmp.$x"
mv "tmp.$x" "$x"
done | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/scripts/tsc/copy-all-tests.sh | Shell | #!/usr/bin/env bash
#
# Usage: `./scripts/tsc/copy-all-tests.sh ~/projects/TypeScript`
#
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
set -eu
npx tsc ./scripts/tsc/copy-test.ts
find "$1/tests/cases/conformance" -type f | sort -R | xargs -P 10 -L 1 -I {} node "$SCRIPT_DIR/copy-test... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/scripts/tsc/copy-test.ts | TypeScript | #!/usr/bin/env npx ts-node
// Usage: ./scripts/copy-ts-tests.ts ~/projects/TypeScript
import * as ts from "typescript";
import * as fs from "fs";
import * as path from "path";
import { promisify } from "util";
const targetDir = path.resolve(__dirname, "..", "..", "tests", "tsc");
const fileToCheck = process.argv[2... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/error.rs | Rust | #![allow(dead_code)]
use std::{borrow::Cow, fmt::Debug};
use swc_atoms::Atom;
use swc_common::{
errors::{DiagnosticBuilder, Handler},
Span, Spanned,
};
use crate::token::Token;
/// Note: this struct is 8 bytes.
#[derive(Debug, Clone, PartialEq)]
pub struct Error {
error: Box<(Span, SyntaxError)>,
}
imp... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/comments_buffer.rs | Rust | use std::{iter::Rev, rc::Rc, vec::IntoIter};
use swc_common::{comments::Comment, BytePos};
#[derive(Clone)]
pub(crate) struct BufferedComment {
pub kind: BufferedCommentKind,
pub pos: BytePos,
pub comment: Comment,
}
#[derive(Clone)]
pub(crate) enum BufferedCommentKind {
Leading,
Trailing,
}
#[d... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/input.rs | Rust | pub use swc_common::input::*;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/jsx.rs | Rust | use either::Either;
use smartstring::{LazyCompact, SmartString};
use super::*;
impl Lexer<'_> {
pub(super) fn read_jsx_token(&mut self) -> LexResult<Option<Token>> {
debug_assert!(self.syntax.jsx());
let start = self.input.cur_pos();
let mut chunk_start = self.input.cur_pos();
let... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/mod.rs | Rust | //! ECMAScript lexer.
use std::{cell::RefCell, char, iter::FusedIterator, mem::transmute, rc::Rc};
use either::Either::{Left, Right};
use smallvec::{smallvec, SmallVec};
use swc_atoms::{Atom, AtomStoreCell};
use swc_common::{
comments::Comments,
input::{Input, StringInput},
BytePos, Span,
};
use swc_ecma_... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/number.rs | Rust | //! Lexer methods related to reading numbers.
//!
//!
//! See https://tc39.github.io/ecma262/#sec-literals-numeric-literals
use std::borrow::Cow;
use either::Either;
use num_bigint::BigInt as BigIntValue;
use num_traits::{Num as NumTrait, ToPrimitive};
use tracing::trace;
use super::*;
struct LazyBigInt<const RADIX:... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/state.rs | Rust | use std::mem::take;
use smallvec::{smallvec, SmallVec};
use swc_common::{BytePos, Span};
use tracing::trace;
use super::{
comments_buffer::{BufferedComment, BufferedCommentKind},
Context, Input, Lexer,
};
use crate::{
error::{Error, SyntaxError},
input::Tokens,
lexer::util::CharExt,
token::{Bi... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/table.rs | Rust | //! Lookup table for byte handlers.
//!
//! Idea is taken from ratel.
//!
//! https://github.com/ratel-rust/ratel-core/blob/e55a1310ba69a3f5ce2a9a6eef643feced02ac08/ratel/src/lexer/mod.rs#L665
use either::Either;
use swc_common::input::Input;
use swc_ecma_ast::AssignOp;
use super::{pos_span, util::CharExt, LexResult,... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/tests.rs | Rust | extern crate test;
use std::{ops::Range, str};
use swc_atoms::Atom;
use swc_common::{BytePos, Span};
use swc_ecma_ast::{AssignOp, AssignOp::*};
use test::{black_box, Bencher};
use super::state::{lex, lex_module_errors, lex_tokens, with_lexer};
use crate::{
error::{Error, SyntaxError},
lexer::state::lex_error... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/util.rs | Rust | //! Ported from [babylon/util/identifier.js][]
//!
//!
//! [babylon/util/identifier.js]:https://github.com/babel/babel/blob/master/packages/babylon/src/util/identifier.js
use std::char;
use swc_common::{
comments::{Comment, CommentKind},
input::Input,
BytePos, Span,
};
use swc_ecma_ast::Ident;
use tracing:... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/lexer/whitespace.rs | Rust | /// Returns true if it's done
pub(super) type ByteHandler = Option<for<'aa> fn(&mut SkipWhitespace<'aa>) -> u32>;
/// Lookup table for whitespace
static BYTE_HANDLERS: [ByteHandler; 256] = [
// 0 1 2 3 4 5 6 7 8 9 A B C D E F //
___, ___, ___, ___, ___, ___, ___... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.