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_parser/src/lib.rs | Rust | //! EcmaScript/TypeScript parser for the rust programming language.
//!
//! # Features
//!
//! ## Heavily tested
//!
//! Passes almost all tests from [tc39/test262][].
//!
//! ## Error reporting
//!
//! ```sh
//! error: 'implements', 'interface', 'let', 'package', 'private', 'protected', 'public', 'static', or 'yield'... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/macros.rs | Rust | #[allow(unused)]
macro_rules! tok {
('`') => {
crate::token::Token::BackQuote
};
// (';') => { Token::Semi };
('@') => {
crate::token::Token::At
};
('#') => {
crate::token::Token::Hash
};
('&') => {
crate::token::Token::BinOp(crate::token::BinOpToken::Bit... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/class_and_fn.rs | Rust | use swc_common::Spanned;
use super::*;
use crate::lexer::TokenContext;
/// Parser for function expression and function declaration.
impl<I: Tokens> Parser<I> {
pub(super) fn parse_async_fn_expr(&mut self) -> PResult<Box<Expr>> {
let start = cur_pos!(self);
expect!(self, "async");
self.pars... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/expr.rs | Rust | use either::Either;
use rustc_hash::FxHashMap;
use swc_common::{ast_node, util::take::Take, Spanned};
use super::{pat::PatType, util::ExprExt, *};
use crate::{lexer::TokenContext, parser::class_and_fn::IsSimpleParameterList};
mod ops;
#[cfg(test)]
mod tests;
mod verifier;
impl<I: Tokens> Parser<I> {
pub fn parse... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/expr/ops.rs | Rust | //! Parser for unary operations and binary operations.
use tracing::trace;
use super::*;
impl<I: Tokens> Parser<I> {
/// Name from spec: 'LogicalORExpression'
pub(super) fn parse_bin_expr(&mut self) -> PResult<Box<Expr>> {
trace_cur!(self, parse_bin_expr);
let ctx = self.ctx();
let l... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/expr/tests.rs | Rust | use std::hint::black_box;
use swc_common::{FileName, SourceMap, DUMMY_SP as span};
use swc_ecma_visit::assert_eq_ignore_span;
use super::*;
use crate::{parse_file_as_expr, EsSyntax};
fn syntax() -> Syntax {
Syntax::Es(EsSyntax {
allow_super_outside_method: true,
..Default::default()
})
}
fn ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/expr/verifier.rs | Rust | #[cfg(feature = "verify")]
use swc_ecma_visit::{noop_visit_type, Visit, VisitWith};
use super::*;
impl<I: Tokens> Parser<I> {
#[cfg(feature = "verify")]
pub(in crate::parser) fn verify_expr(&mut self, expr: Box<Expr>) -> PResult<Box<Expr>> {
let mut v = Verifier { errors: Vec::new() };
v.visi... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/ident.rs | Rust | //! 12.1 Identifiers
use either::Either;
use swc_atoms::atom;
use super::*;
use crate::token::{IdentLike, Keyword};
impl<I: Tokens> Parser<I> {
pub(super) fn parse_maybe_private_name(&mut self) -> PResult<Either<PrivateName, IdentName>> {
let is_private = is!(self, '#');
if is_private {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/input.rs | Rust | use std::{cell::RefCell, mem, mem::take, rc::Rc};
use debug_unreachable::debug_unreachable;
use lexer::TokenContexts;
use swc_common::{BytePos, Span};
use super::Parser;
use crate::{
error::Error,
lexer::{self},
token::*,
Context, EsVersion, Syntax,
};
/// Clone should be cheap if you are parsing typ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/jsx.rs | Rust | use either::Either;
use swc_common::Spanned;
use super::*;
#[cfg(test)]
mod tests;
impl<I: Tokens> Parser<I> {
/// Parse next token as JSX identifier
pub(super) fn parse_jsx_ident(&mut self) -> PResult<Ident> {
debug_assert!(self.input.syntax().jsx());
trace_cur!(self, parse_jsx_ident);
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/jsx/tests.rs | Rust | use swc_common::DUMMY_SP as span;
use swc_ecma_visit::assert_eq_ignore_span;
use super::*;
fn jsx(src: &'static str) -> Box<Expr> {
test_parser(
src,
crate::Syntax::Es(crate::EsSyntax {
jsx: true,
..Default::default()
}),
|p| p.parse_expr(),
)
}
#[test]... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/macros.rs | Rust | macro_rules! unexpected {
($p:expr, $expected:literal) => {{
let got = $p.input.dump_cur();
syntax_error!(
$p,
$p.input.cur_span(),
SyntaxError::Unexpected {
got,
expected: $expected
}
)
}};
}
/// This handl... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/mod.rs | Rust | #![allow(clippy::let_unit_value)]
#![deny(non_snake_case)]
use std::ops::{Deref, DerefMut};
use rustc_hash::FxHashMap;
use swc_atoms::Atom;
use swc_common::{comments::Comments, input::StringInput, BytePos, Span};
use swc_ecma_ast::*;
pub use self::input::{Capturing, Tokens, TokensInput};
use self::{input::Buffer, ut... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/object.rs | Rust | //! Parser for object literal.
use swc_common::{Spanned, DUMMY_SP};
use super::*;
use crate::parser::class_and_fn::is_not_this;
impl<I: Tokens> Parser<I> {
/// Parse a object literal or object pattern.
pub(super) fn parse_object<T>(&mut self) -> PResult<T>
where
Self: ParseObject<T>,
{
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/pat.rs | Rust | //! 13.3.3 Destructuring Binding Patterns
use swc_common::Spanned;
use super::{util::ExprExt, *};
use crate::{
parser::{class_and_fn::is_not_this, expr::AssignTargetOrSpread},
token::{IdentLike, Keyword},
};
impl<I: Tokens> Parser<I> {
pub fn parse_pat(&mut self) -> PResult<Pat> {
self.parse_bind... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/stmt.rs | Rust | use swc_common::Spanned;
use typed_arena::Arena;
use super::{pat::PatType, *};
use crate::error::SyntaxError;
mod module_item;
impl<'a, I: Tokens> Parser<I> {
pub fn parse_module_item(&mut self) -> PResult<ModuleItem> {
self.parse_stmt_like(true, true)
}
pub(super) fn parse_block_body<Type>(
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/stmt/module_item.rs | Rust | use super::*;
impl<I: Tokens> Parser<I> {
fn parse_import(&mut self) -> PResult<ModuleItem> {
let start = cur_pos!(self);
if peeked_is!(self, '.') {
let expr = self.parse_expr()?;
eat!(self, ';');
return Ok(ExprStmt {
span: span!(self, start),
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/tests.rs | Rust | use swc_common::comments::SingleThreadedComments;
use super::*;
use crate::EsSyntax;
fn program(src: &'static str) -> Program {
test_parser(src, Default::default(), |p| p.parse_program())
}
/// Assert that Parser.parse_program returns [Program::Module].
fn module(src: &'static str) -> Module {
program(src).e... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/typescript.rs | Rust | use std::fmt::Write;
use either::Either;
use swc_atoms::atom;
use swc_common::Spanned;
use super::*;
use crate::{lexer::TokenContexts, parser::class_and_fn::IsSimpleParameterList, token::Keyword};
impl<I: Tokens> Parser<I> {
/// `tsNextTokenCanFollowModifier`
fn ts_next_token_can_follow_modifier(&mut self) -... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/parser/util.rs | Rust | use super::*;
use crate::token::{IdentLike, Keyword};
impl Context {
pub(crate) fn is_reserved(self, word: &Word) -> bool {
match *word {
Word::Keyword(Keyword::Let) => self.strict,
Word::Keyword(Keyword::Await) => self.in_async || self.in_static_block || self.strict,
Wo... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/src/token.rs | Rust | //! Ported from [babel/babylon][]
//!
//! [babel/babylon]:https://github.com/babel/babel/blob/2d378d076eb0c5fe63234a8b509886005c01d7ee/packages/babylon/src/tokenizer/types.js
use std::{
borrow::Cow,
fmt::{self, Debug, Display, Formatter},
};
use num_bigint::BigInt as BigIntValue;
use swc_atoms::{atom, Atom, At... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/binding-pattern/description.js | JavaScript | // self - local self
// ArrayBindingPattern -> [Elision? BindingRestElement -> BindingIdentifier]
/*
* ArrayBindingPattern
* Elision = ,
* BindingRestElement = ... SELF | ... identifier
* BindingElementList = ,? BindingElement | self ,? BindingElement
* BindingElement = identifier = _ | SELF = _
*
* */
let simple_arr... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments.rs | Rust | use std::path::PathBuf;
use swc_common::{
comments::SingleThreadedComments,
errors::{DiagnosticBuilder, Handler},
input::SourceFileInput,
BytePos, Span,
};
use swc_ecma_ast::*;
use swc_ecma_parser::{lexer::Lexer, EsSyntax, Parser, Syntax, TsSyntax};
use swc_ecma_visit::{Visit, VisitWith};
use testing::... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/exprs/array/blockStmt/input.js | JavaScript | React.useEffect(() => {
// @refresh reset
}); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/exprs/call/simple/input.js | JavaScript | test(123/*post: 9*/, 456/*post: 10*/);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/exprs/paren-annotations/1/input.js | JavaScript | const fnB = /*#__NO_SIDE_EFFECTS__*/ (args) => {
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/exprs/paren-pure/1/input.js | JavaScript | /*#__PURE__*/ (console.log('simple'))
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/exprs/paren-pure/2/input.js | JavaScript |
/*#__PURE__*/((() => import('./any'))())
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/exprs/paren-pure/3/input.js | JavaScript | /*#__PURE__*/(((() => import('./any'))()))
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/issue-3715/input.js | JavaScript | a() /* IMPORTANT_DO_NOT_REMOVE */;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/issue-4876/input.js | JavaScript | /*!
something v5.1.0
more
else
*/
// a
console.log(1);
// b | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/stmts/block/input.js | JavaScript | while (1) {
/* test */
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/comments/stmts/switch/input.js | JavaScript | switch (1) {
case 2:
3;
// 4
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/common/mod.rs | Rust | use swc_common::Span;
use swc_ecma_ast::*;
use swc_ecma_visit::{Fold, FoldWith};
pub struct Normalizer {
pub drop_span: bool,
pub is_test262: bool,
}
impl Fold for Normalizer {
fn fold_class_members(&mut self, mut node: Vec<ClassMember>) -> Vec<ClassMember> {
node = node.fold_children_with(self);
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors.rs | Rust | #![allow(unused)]
use std::{
fs::read_to_string,
path::{Path, PathBuf},
};
use pretty_assertions::assert_eq;
use swc_common::{errors::Handler, sync::Lrc, SourceMap};
use swc_ecma_ast::*;
use swc_ecma_parser::{lexer::Lexer, PResult, Parser, StringInput};
use swc_ecma_visit::{Fold, FoldWith};
use testing::{run_... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/arguments/input.js | JavaScript | class A {
static {
class B {
[arguments]
}
}
foo = arguments
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/arrow-function-binding-rest-property/input.js | JavaScript | ({...a.b})=>{};
(a, {...b.c})=>{};
(...{...{}})=>{};
(a, ...{...{}})=>{};
([...{...[]}])=>{};
(a, [...{...[]}])=>{}; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/arrow-function-member-as-binding-identifier/input.js | JavaScript | ({a: b.c })=>{};
([a.b])=>{};
(a.b)=>{};
(_, {a: b.c })=>{};
(_, [a.b])=>{};
(_, a.b)=>{};
(...a.b)=>{};
([...a.b])=>{};
({...a.b})=>{};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/async-line-break/1/input.js | JavaScript | foo = async
() => 42
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/async-line-break/2/input.js | JavaScript | foo = async
function() {
return 42
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/bad_character_escape_sequence/input.js | JavaScript | const string = "\xZZ";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/bad_character_escape_sequence_1/input.js | JavaScript | const string = "\x";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/bad_character_escape_sequence_2/input.js | JavaScript | const string = "\uZZZZ";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/bad_character_escape_sequence_3/input.js | JavaScript | const string = "\u{FFFFFF}";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/bad_character_escape_sequence_4/input.js | JavaScript | const string = "\xFZ";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/bad_character_escape_sequence_5/input.js | JavaScript | const string = "\u{ZZZZ}";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/bad_character_escape_sequence_6/input.js | JavaScript | const string = "\u{FFFFFF}";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/conflict_marker_diff_3_trivia_1/input.ts | TypeScript | class C {
<<<<<<< HEAD
v = 1;
||||||| merged common ancestors
v = 3;
=======
v = 2;
>>>>>>> Branch-a
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/conflict_marker_diff_3_trivia_2/input.ts | TypeScript | class C {
foo() {
<<<<<<< B
a();
}
||||||| merged common ancestors
c();
}
=======
b();
}
>>>>>>> A
public bar() { }
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/conflict_marker_trivia_1/input.ts | TypeScript | class C {
<<<<<<< HEAD
v = 1;
=======
v = 2;
>>>>>>> Branch-a
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/conflict_marker_trivia_2/input.ts | TypeScript | class C {
foo() {
<<<<<<< B
a();
}
=======
b();
}
>>>>>>> A
public bar() { }
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/conflict_marker_trivia_3/input.tsx | TypeScript (TSX) | const x = <div/>;
<<<<<<< HEAD | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/conflict_marker_trivia_4/input.ts | TypeScript | const x = <div>
<<<<<<< HEAD | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/.invalid-for-await-using-binding-of-of/input.mjs | JavaScript | for await (using of of of);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/.invalid-for-using-binding-of-of/input.js | JavaScript | for (using of of of);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-duplicate-using-bindings/input.js | JavaScript | {
using f, f = foo();
}
{
using g = foo();
using g = foo();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-for-using-binding-in/input.js | JavaScript | for (using foo in {});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-for-using-binding-of-in/input.js | JavaScript | for (using of in []);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-in-single-statement-context/input.js | JavaScript | {
while (1) using a;
for (;;) using b;
do using c; while (1);
if (1) using d;
with (1) using e;
label: using f;
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-labeled-using-binding/input.js | JavaScript | {
label: using x = bar();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-script-top-level-labeled-using-binding/input.js | JavaScript | label: using x = bar();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-script-top-level-using-binding/.input.js | JavaScript | using x = bar();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-using-binding-await-module/input.js | JavaScript | {
using await = h();
}
{
using \u0061wait = h();
}
{
using x, await = h();
}
{
for (using await of []);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-using-binding-await-script/input.js | JavaScript | {
using await = h();
}
{
using \u0061wait = h();
}
{
using x, await = h();
}
{
for (using await of []);
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-using-binding-let/input.js | JavaScript | {
using let = h();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-using-binding-pattern-declaration/input.js | JavaScript | {
using { foo } = f();
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/explicit-resource-management/invalid-using-binding-pattern-for-lhs/input.js | JavaScript | {
for (using { qux } of h());
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/issue-2834/input.js | JavaScript | ([(a)]) => {};
({ a: (b) }) => {};
for (const [(a)] of arr) {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/issue-4991/1/input.js | JavaScript | const str = "meta";
console.log(import[str]); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/issue-4991/2/input.js | JavaScript | console.log(import?.[meta]); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/issue-4991/3/input.js | JavaScript | console.log(import?.meta); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/issue-4991/4/input.js | JavaScript | console.log(import.[meta]); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/issue-8268/1/input.js | JavaScript | export { default }
export { if }
export { default as foo }
export { if as bar }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/issue-8268/2/input.ts | TypeScript | export { type export }
export { type if }
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/issue-8269/input.js | JavaScript | {
let let
}
{
const let = 0
}
{
class let { }
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/issue-8687/input.ts | TypeScript | class Foo {
private #p1() { }
private #p2: number;
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/jsx_in_js/input.js | JavaScript | const a = (
<section>
<a href="/foo">foo</a>
</section>
);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/label/input.js | JavaScript | "use strict"
a: function b() {} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/optional-chaining/tagged-template.js | JavaScript | a?.b``
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/rest-initializer/input.js | JavaScript | [...a=1]=[];
[a,...b=1]=[];
([...a=1])=>{};
([a,...b=1])=>{};
({...a=1}={});
({a,...b=1}={});
({...a=1})=>{};
({a,...b=1})=>{};
(...a=1)=>{};
(a,...b=1)=>{};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/rest-not-last/input.js | JavaScript | [...a, b] = [...spread];
const [...a, b] = [...spread];
([...a, b]) => {};
({ ...a, b }) => {};
(...a, b) => {};
class c {
constructor(...a, b) {}
fn(...a, b) {}
}
function fn([...a, b]) {}
function fn({ ...a, b }) {}
function fn(...a, b) {}
({ ...a, b } = { ...spread });
const { ...a, b } = { ...spread };
for ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/rest-trailing-comma/input.js | JavaScript | [...a,]=[...spread,];
const [...a,] = [...spread,];
([...a,],)=>{};
({...a,},)=>{};
(...a,)=>{};
class c {
constructor(...a,){}
fn(...a,) {}
}
function fn([...a,],) {};
function fn({...a,},) {};
function fn(...a,) {};
({...a,}={...spread,});
const {...a,} = {...spread,};
for ([...a,] of a) {}
for ({...a,} of b) {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/strict-mode/argument/input.js | JavaScript | export function f0() {
return Array.from(arguments, arguments => arguments + 1, (arguments, b) => arguments + b);
} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/ts1106/input.js | JavaScript | let async;
for (async of [1]) ; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/unterminated_string_constant/input.js | JavaScript | const string = "\ | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/errors/unterminated_string_constant_1/input.js | JavaScript | const string = "\" | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js.rs | Rust | #![allow(clippy::needless_update)]
use std::{
fs::File,
io::Read,
path::{Path, PathBuf},
};
use swc_common::{comments::SingleThreadedComments, FileName};
use swc_ecma_ast::*;
use swc_ecma_parser::{lexer::Lexer, EsSyntax, PResult, Parser, Syntax};
use swc_ecma_visit::FoldWith;
use testing::StdErr;
use cra... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/deferred-import-evaluation/.attributes-expression/input.js | JavaScript | import.defer("x", { with: { attr: "val" } });
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/deferred-import-evaluation/.dynamic-import-no-createImportExpressions/input.js | JavaScript | import.defer("foo"); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/deferred-import-evaluation/.dynamic-import/input.js | JavaScript | import.defer("foo"); | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/deferred-import-evaluation/attributes-declaration/input.js | JavaScript | import defer * as ns from "x" with { attr: "val" }; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/deferred-import-evaluation/import-defer/input.js | JavaScript | import defer * as ns from "x";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/deferred-import-evaluation/no-default/input.js | JavaScript | import defer x from "x";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/deferred-import-evaluation/no-named/input.js | JavaScript | import defer { x } from "x";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/explicit-resource-management/.valid-for-using-binding-escaped-of-of/input.js | JavaScript | for (using o\u0066 of of);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-for-await-using-binding-escaped-of-of/input.mjs | JavaScript | for await (using \u006ff of of);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-using-as-identifier-callee/input.js | JavaScript | using (x);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-using-as-identifier-computed-member-no-plugin/input.js | JavaScript | using [x] = 0;
for (using [x] of []);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-using-as-identifier-computed-member/input.js | JavaScript | using [x] = 0;
for (using [x] of []);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/js/explicit-resource-management/valid-using-as-identifier-expression-statement/input.js | JavaScript | using
reader = getReader()
| 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.