Skip to content

Commit

Permalink
chore: address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEdward162 committed Jan 30, 2024
1 parent da808fe commit 1baaafb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
5 changes: 1 addition & 4 deletions core/comlink/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//! This crate provides all tools to work with the Comlink tools.
//! This crate provides utilities to work with the Comlink tools.
pub mod comlink_parser;
pub mod json;
pub mod json_schema_validator;
pub mod typescript_parser;

#[cfg(feature = "wasm_entry")]
pub mod wasm_entry;
14 changes: 7 additions & 7 deletions packages/comlink_language_server/src/parser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TextCoderImpl implements TextCoder {
}

export class ComlinkParser extends AppContextSync {
public static parseProfileFileName(uri: DocumentUri): { scope?: string, name: string } {
public static parseProfileFileName(uri: DocumentUri): { scope?: string, name: string } {
const baseName = path.basename(uri, '.profile.ts')
const parts = baseName.split('.')
if (parts.length === 1) {
Expand All @@ -43,8 +43,8 @@ export class ComlinkParser extends AppContextSync {
await parser.init()

return parser
}
}
private readonly module: WebAssembly.Module
private readonly wasi: WASI
private readonly textCoder: TextCoder
Expand All @@ -55,7 +55,7 @@ export class ComlinkParser extends AppContextSync {
}
private parserState: undefined | { profile: string } | { profile: Profile, spans: ProfileSpans, diagnostics: Diagnostic[] }

private constructor(module: WebAssembly.Module) {
private constructor(module: WebAssembly.Module) {
super()

this.module = module
Expand Down Expand Up @@ -100,13 +100,13 @@ export class ComlinkParser extends AppContextSync {
writeStream(_handle: number, _data: Uint8Array): number { throw new Error('not implemented') }
closeStream(_handle: number): void { throw new Error('not implemented') }

public parseProfile(profile: string): { profile: Profile, spans: ProfileSpans, diagnostics: Diagnostic[] } {
this.parserState = { profile }
public parseProfile(profile: string): { profile: Profile, spans: ProfileSpans, diagnostics: Diagnostic[] } {
this.parserState = { profile }
this.instance!.parseTsProfile()

const result = this.parserState
this.parserState = undefined

return result as any
}
}
}
2 changes: 1 addition & 1 deletion packages/javascript_common/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class App extends AppContext {
dependencies: { network: Network, fileSystem: FileSystem, textCoder: TextCoder, timers: Timers, persistence: Persistence },
options: { userAgent?: string, metricsTimeout?: number }
) {
super()
super();

this.textCoder = dependencies.textCoder;
this.network = dependencies.network;
Expand Down

0 comments on commit 1baaafb

Please sign in to comment.