Skip to content

Commit 6cf4567

Browse files
committed
rename compiler to interperter for TypeScript_original
1 parent 2211a45 commit 6cf4567

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

doc/sources/interpreters/TypeScript_original.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you have NodeJS v22.6.0+:
1313
require'sniprun'.setup({
1414
interpreter_options = {
1515
TypeScript_original = {
16-
compiler = 'node'
16+
interpreter = 'node'
1717
}
1818
}
1919
}

src/interpreters/TypeScript_original.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub struct TypeScript_original {
99
main_file_path: String,
1010

1111
//specific to Typescript
12-
compiler: String,
12+
interpreter: String,
1313
}
1414

1515
impl ReplLikeInterpreter for TypeScript_original {}
@@ -27,7 +27,7 @@ impl Interpreter for TypeScript_original {
2727
//pre-create string pointing to main file's and binary's path
2828
let mfp = lwd + "/main.ts";
2929

30-
let compiler = match TypeScript_original::get_interpreter_option(&data, "compiler") {
30+
let interpreter = match TypeScript_original::get_interpreter_option(&data, "interpreter") {
3131
Some(user_compiler) => user_compiler.to_string().replace("\"", ""),
3232
None => "ts-node".to_string()
3333
};
@@ -36,7 +36,7 @@ impl Interpreter for TypeScript_original {
3636
support_level,
3737
code: String::new(),
3838
main_file_path: mfp,
39-
compiler
39+
interpreter
4040
})
4141
}
4242

@@ -123,7 +123,7 @@ impl Interpreter for TypeScript_original {
123123

124124
fn execute(&mut self) -> Result<String, SniprunError> {
125125
//run th binary and get the std output (or stderr)
126-
let interpreter = TypeScript_original::get_interpreter_or(&self.data, &self.compiler);
126+
let interpreter = TypeScript_original::get_interpreter_or(&self.data, &self.interpreter);
127127
let output = Command::new(interpreter.split_whitespace().next().unwrap())
128128
.args(interpreter.split_whitespace().skip(1))
129129
.arg(&self.main_file_path)

0 commit comments

Comments
 (0)