Loading repository data…
Loading repository data…
ehurturk / repository
REPL interpretation for a stripped down version of javascript
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
An evaluator of a stripped down version of JS, aiming to replicate REPL of Node.js.
You can run this project in 2 ways:
.jar from the releases section, and then run java -jar jseval-v1.0.jar [-gui | -help]Main.kt file located in src/main/kotlin/Main.kt.function double(x) {
return x * 2;
}
Tests are contained in src/test/ directory. The tests are:
EvalTests.kt
ParseTests.kt
You can use the following commands in the interactive session:
info: displays information about all the variables, their modifier types, and their values.assign [varname] [varvalue]:
varvalue can also be an expression (e.g. assign a c+4)evalLine [lineno]: evaluates the given line number and returns the result if it is an expressioninvoke [funcname] [args separated by comma]: invokes a function with the given arguments and returns the result import { foo, bar } from "/modules/my-module.js";
let x = 1 + foo;
let y = 2 * bar;
x + y