Skip to content

Commit 81f19d0

Browse files
committedMar 3, 2025
Run format
1 parent 8fef11f commit 81f19d0

13 files changed

+16
-16
lines changed
 

‎src/createContext.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const createEmptyDebugger = () => ({
119119
state: {
120120
it: (function* (): any {
121121
return
122-
})(),
122+
})()
123123
}
124124
})
125125

‎src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export async function runFilesInContext(
253253
export function resume(result: Result): Finished | ResultError | Promise<Result> {
254254
if (result.status === 'finished' || result.status === 'error') {
255255
return result
256-
}
256+
}
257257
const value = resumeEvaluate(result.context)
258258
return CSEResultPromise(result.context, value)
259259
}

‎src/repl/__tests__/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ describe('Make sure each subcommand can be run', () => {
1717
)
1818
}
1919
)
20-
})
20+
})

‎src/repl/__tests__/svmc.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ describe('Test output options', () => {
107107
expect(contents).toMatchSnapshot()
108108
})
109109
})
110-
})
110+
})

‎src/repl/__tests__/transpiler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ test('pretranspile option', async () => {
6363
const [[fileName, contents]] = mockedWriteFile.mock.calls
6464
expect(fileName).toEqual('out.js')
6565
expect(contents).toEqual('1 + 1;\n')
66-
})
66+
})

‎src/repl/__tests__/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ export function expectWritten(f: (contents: string) => any) {
3535
expect(f).toHaveBeenCalledTimes(1)
3636
const [[contents]] = asMockedFunc(f).mock.calls
3737
return expect(contents)
38-
}
38+
}

‎src/repl/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/env/node
22
import { getMainCommand } from './main'
33

4-
getMainCommand().parseAsync()
4+
getMainCommand().parseAsync()

‎src/repl/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export const getMainCommand = () =>
88
new Command()
99
.addCommand(getSVMCCommand())
1010
.addCommand(getTranspilerCommand())
11-
.addCommand(getReplCommand(), { isDefault: true })
11+
.addCommand(getReplCommand(), { isDefault: true })

‎src/repl/svmc.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ strings containing the names of the VM-internal functions.`
103103
const outputFileName = opts.out ?? `${basename(inputFile, extToRemove)}${ext}`
104104
await fs.writeFile(outputFileName, output)
105105
console.log(`Output written to ${outputFileName}`)
106-
})
106+
})

‎src/repl/transpiler.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ export const getTranspilerCommand = () =>
2020
new Command('transpiler')
2121
.addOption(getVariantOption(Variant.DEFAULT, [Variant.DEFAULT, Variant.NATIVE]))
2222
.addOption(getChapterOption(Chapter.SOURCE_4, chapterParser))
23-
.option(
24-
'-p, --pretranspile',
25-
"only pretranspile and don't perform Source -> JS transpilation"
26-
)
23+
.option('-p, --pretranspile', "only pretranspile and don't perform Source -> JS transpilation")
2724
.option('-o, --out <outFile>', 'Specify a file to write to')
2825
.argument('<filename>')
2926
.action(async (fileName, opts) => {

‎src/runner/sourceRunner.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ async function sourceRunner(
223223
return runCSEMachine(program, context, theOptions)
224224
}
225225

226-
assert(context.executionMethod !== 'auto', 'Execution method should have been properly determined!')
226+
assert(
227+
context.executionMethod !== 'auto',
228+
'Execution method should have been properly determined!'
229+
)
227230
return runNative(program, context, theOptions)
228231
}
229232

‎src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -498,4 +498,4 @@ export type RecursivePartial<T> = T extends Array<any>
498498
}>
499499
: T
500500

501-
export type NodeTypeToNode<T extends Node['type']> = Extract<Node, { type: T }>
501+
export type NodeTypeToNode<T extends Node['type']> = Extract<Node, { type: T }>

‎src/utils/testing/misc.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ export function expectNodeType<T extends Node['type']>(
2424
node: Node
2525
): asserts node is NodeTypeToNode<T> {
2626
expect(node.type).toEqual(typeStr)
27-
}
27+
}

0 commit comments

Comments
 (0)
Please sign in to comment.