Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion napi/parser/bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,5 +377,4 @@ module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind
module.exports.ImportNameKind = nativeBinding.ImportNameKind
module.exports.parseAsync = nativeBinding.parseAsync
module.exports.parseSync = nativeBinding.parseSync
module.exports.parseWithoutReturn = nativeBinding.parseWithoutReturn
module.exports.Severity = nativeBinding.Severity
7 changes: 0 additions & 7 deletions napi/parser/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,6 @@ export interface ParserOptions {
/** Parse synchronously. */
export declare function parseSync(filename: string, sourceText: string, options?: ParserOptions | undefined | null): ParseResult

/**
* Parse without returning anything.
*
* This is for benchmark purposes such as measuring napi communication overhead.
*/
export declare function parseWithoutReturn(filename: string, sourceText: string, options?: ParserOptions | undefined | null): void

export declare const enum Severity {
Error = 'Error',
Warning = 'Warning',
Expand Down
11 changes: 0 additions & 11 deletions napi/parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@ fn parse<'a>(
.parse()
}

/// Parse without returning anything.
///
/// This is for benchmark purposes such as measuring napi communication overhead.
#[napi]
pub fn parse_without_return(filename: String, source_text: String, options: Option<ParserOptions>) {
let options = options.unwrap_or_default();
let allocator = Allocator::default();
let source_type = get_source_type(&filename, &options);
parse(&allocator, source_type, &source_text, &options);
}

fn parse_with_return(filename: &str, source_text: String, options: &ParserOptions) -> ParseResult {
let allocator = Allocator::default();
let source_type = get_source_type(filename, options);
Expand Down
Loading