{"record":{"id":"de9ce31db8467b22","repo":"swc-project/swc","slug":"failed-parse-args","errorCode":null,"errorMessage":"failed parse args","messagePattern":"failed parse args","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_ecma_codegen_macros/src/lib.rs","lineNumber":107,"sourceCode":"                .into_pairs()\n                .flat_map(|arg| arg.into_token_stream())\n                .collect();\n\n            let is_emit = self.emit;\n            i = parse_quote!(emit_node_inner!(emitter, #is_emit, #args));\n        }\n\n        i\n    }\n}\n\nfn parse_args<T, P>(tokens: TokenStream) -> Punctuated<T, P>\nwhere\n    T: Parse,\n    P: Parse + Token,\n{\n    let parser = Punctuated::parse_separated_nonempty;\n    parser.parse2(tokens).expect(\"failed parse args\")\n}\n","sourceCodeStart":89,"sourceCodeEnd":109,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_ecma_codegen_macros/src/lib.rs#L89-L109","documentation":"In parse_args of swc_ecma_codegen_macros, the macro's argument token stream could not be parsed as a non-empty Punctuated list of the expected elements. This fires during expansion of the codegen emit macros when the arguments do not match the expected comma-separated grammar — e.g. empty or malformed arguments — while fold_macro builds emit_node_inner! invocations.","triggerScenarios":"Thrown at crates/swc_ecma_codegen_macros/src/lib.rs:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the macro invocation's arguments form a valid comma-separated non-empty list","Remove stray or unbalanced tokens (extra commas, unmatched braces)","Reduce complex nested macro calls in the arguments to plain expressions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}