septima-lang 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/jest-output.json CHANGED
@@ -1 +1 @@
1
- {"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":4,"numPassedTests":210,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":24,"numTotalTestSuites":4,"numTotalTests":234,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1662836503560,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima basics","location":null,"status":"passed","title":"basics"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima an optional return keyword can be placed before the result","location":null,"status":"passed","title":"an optional return keyword can be placed before the result"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima booleans","location":null,"status":"passed","title":"booleans"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima arithmetics","location":null,"status":"passed","title":"arithmetics"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima error message specifies the location in the file","location":null,"status":"passed","title":"error message specifies the location in the file"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima equality","location":null,"status":"passed","title":"equality"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima comparison","location":null,"status":"passed","title":"comparison"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima combined arithmetics and logical expressions","location":null,"status":"passed","title":"combined arithmetics and logical expressions"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima the rhs of a logical-or expression is evaluated only if lhs is false","location":null,"status":"passed","title":"the rhs of a logical-or expression is evaluated only if lhs is false"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima the rhs of a logical-and expression is evaluated only if lhs is true","location":null,"status":"passed","title":"the rhs of a logical-and expression is evaluated only if lhs is true"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima eats whitespace","location":null,"status":"passed","title":"eats whitespace"},{"ancestorTitles":["septima","unary expressions"],"failureMessages":[],"fullName":"septima unary expressions +","location":null,"status":"passed","title":"+"},{"ancestorTitles":["septima","unary expressions"],"failureMessages":[],"fullName":"septima unary expressions errors if + is applied to non-number","location":null,"status":"passed","title":"errors if + is applied to non-number"},{"ancestorTitles":["septima","unary expressions"],"failureMessages":[],"fullName":"septima unary expressions -","location":null,"status":"passed","title":"-"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings can be specified via the double-quotes notation","location":null,"status":"passed","title":"can be specified via the double-quotes notation"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings can be specified via the single-quotes notation","location":null,"status":"passed","title":"can be specified via the single-quotes notation"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings does not trim leading/trailing whitespace","location":null,"status":"passed","title":"does not trim leading/trailing whitespace"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings supports string methods","location":null,"status":"passed","title":"supports string methods"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings supports optional arguments of string methods","location":null,"status":"passed","title":"supports optional arguments of string methods"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let binds values to variables","location":null,"status":"passed","title":"binds values to variables"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let do not need the trailing semicolon","location":null,"status":"passed","title":"do not need the trailing semicolon"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let fails if the variable was not defined","location":null,"status":"passed","title":"fails if the variable was not defined"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let parenthsized expression can have let defintions","location":null,"status":"passed","title":"parenthsized expression can have let defintions"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let inner expressions can access variables from enclosing scopes","location":null,"status":"passed","title":"inner expressions can access variables from enclosing scopes"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let definitions from inner scopes overshadow definitions from outer scopes","location":null,"status":"passed","title":"definitions from inner scopes overshadow definitions from outer scopes"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let the body of a definition can reference an earlier definition from the same scope","location":null,"status":"passed","title":"the body of a definition can reference an earlier definition from the same scope"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let the body of a definition cannot reference a latter definition from the same scope","location":null,"status":"passed","title":"the body of a definition cannot reference a latter definition from the same scope"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let the body of a definition cannot reference itself","location":null,"status":"passed","title":"the body of a definition cannot reference itself"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let uses lexical scoping (and not dynamic scoping)","location":null,"status":"passed","title":"uses lexical scoping (and not dynamic scoping)"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let definitions go out of scope","location":null,"status":"passed","title":"definitions go out of scope"},{"ancestorTitles":["septima","arrays"],"failureMessages":[],"fullName":"septima arrays array literals are specified via the enclosing brackets notation ([])","location":null,"status":"passed","title":"array literals are specified via the enclosing brackets notation ([])"},{"ancestorTitles":["septima","arrays"],"failureMessages":[],"fullName":"septima arrays allow a dangling comma","location":null,"status":"passed","title":"allow a dangling comma"},{"ancestorTitles":["septima","arrays"],"failureMessages":[],"fullName":"septima arrays individual elements of an array can be accessed via the [<index>] notation","location":null,"status":"passed","title":"individual elements of an array can be accessed via the [<index>] notation"},{"ancestorTitles":["septima","arrays"],"failureMessages":[],"fullName":"septima arrays the <index> value at the [<index>] notation can be a computed value","location":null,"status":"passed","title":"the <index> value at the [<index>] notation can be a computed value"},{"ancestorTitles":["septima","objects","literals"],"failureMessages":[],"fullName":"septima objects literals are specified via JSON format","location":null,"status":"passed","title":"are specified via JSON format"},{"ancestorTitles":["septima","objects","literals"],"failureMessages":[],"fullName":"septima objects literals allow a dangling comma","location":null,"status":"passed","title":"allow a dangling comma"},{"ancestorTitles":["septima","objects","literals"],"failureMessages":[],"fullName":"septima objects literals a dangling comma in an empty object is not allowed","location":null,"status":"passed","title":"a dangling comma in an empty object is not allowed"},{"ancestorTitles":["septima","objects","literals"],"failureMessages":[],"fullName":"septima objects literals supports computed attributes names via the [<expression>]: <value> notation","location":null,"status":"passed","title":"supports computed attributes names via the [<expression>]: <value> notation"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes can be accessed via the .<ident> notation","location":null,"status":"passed","title":"can be accessed via the .<ident> notation"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes can be accessed via the [<name>] notation","location":null,"status":"passed","title":"can be accessed via the [<name>] notation"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes supports chains of attribute accesses mixing the .<ident> and the [<name>] notations","location":null,"status":"passed","title":"supports chains of attribute accesses mixing the .<ident> and the [<name>] notations"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes supports chains of calls to nested attributes which are lambda expressions","location":null,"status":"passed","title":"supports chains of calls to nested attributes which are lambda expressions"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes the <name> value at the [<name>] notation can be a computed value","location":null,"status":"passed","title":"the <name> value at the [<name>] notation can be a computed value"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects shallow copies an object into an object literal","location":null,"status":"passed","title":"shallow copies an object into an object literal"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects can be combined with hard-coded (literal) attributes","location":null,"status":"passed","title":"can be combined with hard-coded (literal) attributes"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects can be used multiple times inside a single object literal","location":null,"status":"passed","title":"can be used multiple times inside a single object literal"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects overrides attributes to its left","location":null,"status":"passed","title":"overrides attributes to its left"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects overridden by attributes to its right","location":null,"status":"passed","title":"overridden by attributes to its right"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects can be mixed with computed attribute names","location":null,"status":"passed","title":"can be mixed with computed attribute names"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects errors if applied to a non-object value","location":null,"status":"passed","title":"errors if applied to a non-object value"},{"ancestorTitles":["septima","spread operator in arrays"],"failureMessages":[],"fullName":"septima spread operator in arrays shallow copies an array into an array literal","location":null,"status":"passed","title":"shallow copies an array into an array literal"},{"ancestorTitles":["septima","spread operator in arrays"],"failureMessages":[],"fullName":"septima spread operator in arrays can be mixed with array elements","location":null,"status":"passed","title":"can be mixed with array elements"},{"ancestorTitles":["septima","spread operator in arrays"],"failureMessages":[],"fullName":"septima spread operator in arrays can be used multiple times inside an array literal","location":null,"status":"passed","title":"can be used multiple times inside an array literal"},{"ancestorTitles":["septima","spread operator in arrays"],"failureMessages":[],"fullName":"septima spread operator in arrays errors if applied to a non-array value","location":null,"status":"passed","title":"errors if applied to a non-array value"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if returns the value of the first branch if the condition is true","location":null,"status":"passed","title":"returns the value of the first branch if the condition is true"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if evaluates the first branch only if the condition is true","location":null,"status":"passed","title":"evaluates the first branch only if the condition is true"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if returns the value of the second branch if the condition is false","location":null,"status":"passed","title":"returns the value of the second branch if the condition is false"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if evaluates the second branch only if the condition is false","location":null,"status":"passed","title":"evaluates the second branch only if the condition is false"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if yells if conditions is not boolean","location":null,"status":"passed","title":"yells if conditions is not boolean"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions binds the value of the actual arg to the formal arg","location":null,"status":"passed","title":"binds the value of the actual arg to the formal arg"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can be stored in a variable","location":null,"status":"passed","title":"can be stored in a variable"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation a single formal argument does not need to be surrounded with parenthesis","location":null,"status":"passed","title":"a single formal argument does not need to be surrounded with parenthesis"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation (a) => <expression>","location":null,"status":"passed","title":"(a) => <expression>"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation () => <expression>","location":null,"status":"passed","title":"() => <expression>"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation (a,b) => <expression>","location":null,"status":"passed","title":"(a,b) => <expression>"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation body of an arrow function can be { return <expression>}","location":null,"status":"passed","title":"body of an arrow function can be { return <expression>}"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation body of an arrow function can include let definitions","location":null,"status":"passed","title":"body of an arrow function can include let definitions"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can have no args","location":null,"status":"passed","title":"can have no args"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions error on arg list mismatch","location":null,"status":"passed","title":"error on arg list mismatch"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can be recursive","location":null,"status":"passed","title":"can be recursive"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can access definitions from the enclosing scope","location":null,"status":"passed","title":"can access definitions from the enclosing scope"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions expression trace on error","location":null,"status":"passed","title":"expression trace on error"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions only lexical scope is considered when looking up a definition","location":null,"status":"passed","title":"only lexical scope is considered when looking up a definition"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can return another lambda expression (a-la currying)","location":null,"status":"passed","title":"can return another lambda expression (a-la currying)"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink specified via the \"sink\" literal","location":null,"status":"passed","title":"specified via the \"sink\" literal"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink access to non-existing attribute of an object evalutes to a sink","location":null,"status":"passed","title":"access to non-existing attribute of an object evalutes to a sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an expression involving a sink evaluates to sink","location":null,"status":"passed","title":"an expression involving a sink evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an array can hold a sink without becoming a sink itself","location":null,"status":"passed","title":"an array can hold a sink without becoming a sink itself"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an object can hold a sink without becoming a sink itself","location":null,"status":"passed","title":"an object can hold a sink without becoming a sink itself"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an if() expression an have a sink positive/negative branch without becoming a sink itself","location":null,"status":"passed","title":"an if() expression an have a sink positive/negative branch without becoming a sink itself"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an if() expression becomes a sink itself if the branch dictated by the condition evaluates to sink","location":null,"status":"passed","title":"an if() expression becomes a sink itself if the branch dictated by the condition evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an if() expression becomes a sink itself if the the condition expression evaluates to sink","location":null,"status":"passed","title":"an if() expression becomes a sink itself if the the condition expression evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an && expression with sinks","location":null,"status":"passed","title":"an && expression with sinks"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an || expression with sinks","location":null,"status":"passed","title":"an || expression with sinks"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink access to an attribute of a sink evaluates to sink","location":null,"status":"passed","title":"access to an attribute of a sink evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink calling a sink evaluates to sink","location":null,"status":"passed","title":"calling a sink evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink a sink compared with itself evaluates to true","location":null,"status":"passed","title":"a sink compared with itself evaluates to true"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink a sink compared with other types evaluates to false","location":null,"status":"passed","title":"a sink compared with other types evaluates to false"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink errors when a sink is ordered with other types","location":null,"status":"passed","title":"errors when a sink is ordered with other types"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink the ?? operator evaluates to its right-hand-side if its left-hand-side is a sink","location":null,"status":"passed","title":"the ?? operator evaluates to its right-hand-side if its left-hand-side is a sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink the ?? operator evaluates to its left-hand-side if it is a non-sink","location":null,"status":"passed","title":"the ?? operator evaluates to its left-hand-side if it is a non-sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink the .where attribure of the result holds the source code of the sink","location":null,"status":"passed","title":"the .where attribure of the result holds the source code of the sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink the .message attribure of the result provides a human readable summary","location":null,"status":"passed","title":"the .message attribure of the result provides a human readable summary"},{"ancestorTitles":["septima","sink!"],"failureMessages":[],"fullName":"septima sink! captures the expression trace at runtime","location":null,"status":"passed","title":"captures the expression trace at runtime"},{"ancestorTitles":["septima","sink!!"],"failureMessages":[],"fullName":"septima sink!! captures the expression trace and the symbol-table at runtime","location":null,"status":"passed","title":"captures the expression trace and the symbol-table at runtime"},{"ancestorTitles":["septima","sink!!"],"failureMessages":[],"fullName":"septima sink!! can be used to recover values of definitions from a crash site","location":null,"status":"passed","title":"can be used to recover values of definitions from a crash site"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods concat","location":null,"status":"passed","title":"concat"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods every","location":null,"status":"passed","title":"every"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods filter","location":null,"status":"passed","title":"filter"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods find","location":null,"status":"passed","title":"find"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods find returns sink if no matching element exists","location":null,"status":"passed","title":"find returns sink if no matching element exists"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods findIndex","location":null,"status":"passed","title":"findIndex"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods findIndex returns -1 if no matching element exists","location":null,"status":"passed","title":"findIndex returns -1 if no matching element exists"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods flatMap","location":null,"status":"passed","title":"flatMap"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods map","location":null,"status":"passed","title":"map"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods reduce","location":null,"status":"passed","title":"reduce"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods reduceRight","location":null,"status":"passed","title":"reduceRight"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods some","location":null,"status":"passed","title":"some"},{"ancestorTitles":["septima","Object.keys()"],"failureMessages":[],"fullName":"septima Object.keys() returns names of all attributes of the given object","location":null,"status":"passed","title":"returns names of all attributes of the given object"},{"ancestorTitles":["septima","Object.keys()"],"failureMessages":[],"fullName":"septima Object.keys() fails if applied to a non-object value","location":null,"status":"passed","title":"fails if applied to a non-object value"},{"ancestorTitles":["septima","Object.entries()"],"failureMessages":[],"fullName":"septima Object.entries() returns a [key, value] pair for each attribute of the given object","location":null,"status":"passed","title":"returns a [key, value] pair for each attribute of the given object"},{"ancestorTitles":["septima","Object.entries()"],"failureMessages":[],"fullName":"septima Object.entries() fails if applied to a non-object value","location":null,"status":"passed","title":"fails if applied to a non-object value"},{"ancestorTitles":["septima","Object.fromEntries()"],"failureMessages":[],"fullName":"septima Object.fromEntries() constructs an object from a list of [key, value] pairs describing its attributes","location":null,"status":"passed","title":"constructs an object from a list of [key, value] pairs describing its attributes"},{"ancestorTitles":["septima","Object.fromEntries()"],"failureMessages":[],"fullName":"septima Object.fromEntries() fails if applied to a non-array value","location":null,"status":"passed","title":"fails if applied to a non-array value"},{"ancestorTitles":["septima","Object.fromEntries()"],"failureMessages":[],"fullName":"septima Object.fromEntries() the input array must be an array of pairs","location":null,"status":"passed","title":"the input array must be an array of pairs"},{"ancestorTitles":["septima","Object.fromEntries()"],"failureMessages":[],"fullName":"septima Object.fromEntries() the first element in each pair must be a string","location":null,"status":"passed","title":"the first element in each pair must be a string"},{"ancestorTitles":["septima","comments"],"failureMessages":[],"fullName":"septima comments anything from '//' up to the end-of-line is ignored","location":null,"status":"passed","title":"anything from '//' up to the end-of-line is ignored"},{"ancestorTitles":["septima","comments"],"failureMessages":[],"fullName":"septima comments allow consecutive lines which are all commented out","location":null,"status":"passed","title":"allow consecutive lines which are all commented out"},{"ancestorTitles":["septima","comments"],"failureMessages":[],"fullName":"septima comments a comment inside a comment has no effect","location":null,"status":"passed","title":"a comment inside a comment has no effect"},{"ancestorTitles":["septima","evaluation stack"],"failureMessages":[],"fullName":"septima evaluation stack max recursion depth","location":null,"status":"passed","title":"max recursion depth"},{"ancestorTitles":["septima","preimport"],"failureMessages":[],"fullName":"septima preimport definitions from a preimported file can be used","location":null,"status":"passed","title":"definitions from a preimported file can be used"},{"ancestorTitles":["septima","preimport"],"failureMessages":[],"fullName":"septima preimport supports multiple preimports","location":null,"status":"passed","title":"supports multiple preimports"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima support file names in locations","location":null,"status":"todo","title":"support file names in locations"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima string interpolation via `foo` strings","location":null,"status":"todo","title":"string interpolation via `foo` strings"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima imports","location":null,"status":"todo","title":"imports"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima arrow functions","location":null,"status":"todo","title":"arrow functions"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima optional parameters","location":null,"status":"todo","title":"optional parameters"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima optional type annotations?","location":null,"status":"todo","title":"optional type annotations?"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima allow redundant commas","location":null,"status":"todo","title":"allow redundant commas"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima left associativity of +/-","location":null,"status":"todo","title":"left associativity of +/-"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima comparison of arrays","location":null,"status":"todo","title":"comparison of arrays"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima comparison of lambdas?","location":null,"status":"todo","title":"comparison of lambdas?"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima deep equality of objects","location":null,"status":"todo","title":"deep equality of objects"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima \"abcdef\"[1] == \"b\"","location":null,"status":"todo","title":"\"abcdef\"[1] == \"b\""},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima an object literal cannot have a repeated attribute name that","location":null,"status":"todo","title":"an object literal cannot have a repeated attribute name that"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima quoting of a ticks inside a string","location":null,"status":"todo","title":"quoting of a ticks inside a string"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima number in scientific notation","location":null,"status":"todo","title":"number in scientific notation"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima number methods","location":null,"status":"todo","title":"number methods"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima drop the fun () notation and use just arrow functions","location":null,"status":"todo","title":"drop the fun () notation and use just arrow functions"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima proper internal representation of arrow function, in particular: show(), span()","location":null,"status":"todo","title":"proper internal representation of arrow function, in particular: show(), span()"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima sink sinkifies arrays and objects it is stored at","location":null,"status":"todo","title":"sink sinkifies arrays and objects it is stored at"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima {foo}","location":null,"status":"todo","title":"{foo}"}],"endTime":1662836504144,"message":"","name":"/home/imaman/code/imaman/bigband/modules/septima-lang/dist/tests/septima.spec.js","startTime":1662836503578,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value arithmetics","location":null,"status":"passed","title":"arithmetics"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value comparisons of numbers","location":null,"status":"passed","title":"comparisons of numbers"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value booleans","location":null,"status":"passed","title":"booleans"},{"ancestorTitles":["value","boolean operators"],"failureMessages":[],"fullName":"value boolean operators or","location":null,"status":"passed","title":"or"},{"ancestorTitles":["value","boolean operators"],"failureMessages":[],"fullName":"value boolean operators and","location":null,"status":"passed","title":"and"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value comparisons of booleans","location":null,"status":"passed","title":"comparisons of booleans"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value strings","location":null,"status":"passed","title":"strings"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value comparisons of strings","location":null,"status":"passed","title":"comparisons of strings"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value arrays","location":null,"status":"passed","title":"arrays"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value objects","location":null,"status":"passed","title":"objects"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value yells if access() is called with value which is neither string or num","location":null,"status":"passed","title":"yells if access() is called with value which is neither string or num"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value json","location":null,"status":"passed","title":"json"},{"ancestorTitles":["value","ifElse"],"failureMessages":[],"fullName":"value ifElse when applied to true evaluates the positive branch","location":null,"status":"passed","title":"when applied to true evaluates the positive branch"},{"ancestorTitles":["value","ifElse"],"failureMessages":[],"fullName":"value ifElse when applied to false evaluates the positive branch","location":null,"status":"passed","title":"when applied to false evaluates the positive branch"},{"ancestorTitles":["value","ifElse"],"failureMessages":[],"fullName":"value ifElse errors if applied to a non-boolean","location":null,"status":"passed","title":"errors if applied to a non-boolean"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink exported as undefined","location":null,"status":"passed","title":"exported as undefined"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink arithmetic operations on sink evaluate to sink","location":null,"status":"passed","title":"arithmetic operations on sink evaluate to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink boolean operations on sink evaluate to sink","location":null,"status":"passed","title":"boolean operations on sink evaluate to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink when sink is the right-hand-side of a boolean expression, the result is sink only if the left-hand-side dictates so","location":null,"status":"passed","title":"when sink is the right-hand-side of a boolean expression, the result is sink only if the left-hand-side dictates so"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink ifElse with sink condition evaluates to sink","location":null,"status":"passed","title":"ifElse with sink condition evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink ifElse with sink positive expression evaluates to sink only if the condition is true","location":null,"status":"passed","title":"ifElse with sink positive expression evaluates to sink only if the condition is true"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink ifElse with sink negative expression evaluates to sink only if the condition is false","location":null,"status":"passed","title":"ifElse with sink negative expression evaluates to sink only if the condition is false"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink access to an attribute of a sink evaluates to sink","location":null,"status":"passed","title":"access to an attribute of a sink evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink calling a sink evaluates to sink","location":null,"status":"passed","title":"calling a sink evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink applying .keys() to sink evaluates to sink","location":null,"status":"passed","title":"applying .keys() to sink evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink applying .entries() to sink evaluates to sink","location":null,"status":"passed","title":"applying .entries() to sink evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink applying .fromEntries() to sink evaluates to sink","location":null,"status":"passed","title":"applying .fromEntries() to sink evaluates to sink"},{"ancestorTitles":["value","sink","unsink()"],"failureMessages":[],"fullName":"value sink unsink() when applied to a non-sink value evaluates to it","location":null,"status":"passed","title":"when applied to a non-sink value evaluates to it"},{"ancestorTitles":["value","sink","unsink()"],"failureMessages":[],"fullName":"value sink unsink() when applied to a sink value evaluates to its argument","location":null,"status":"passed","title":"when applied to a sink value evaluates to its argument"},{"ancestorTitles":["value","sink","comparisons"],"failureMessages":[],"fullName":"value sink comparisons comparing a sink with itself evaluates to true","location":null,"status":"passed","title":"comparing a sink with itself evaluates to true"},{"ancestorTitles":["value","sink","comparisons"],"failureMessages":[],"fullName":"value sink comparisons comparing a sink with other types evaluates to false","location":null,"status":"passed","title":"comparing a sink with other types evaluates to false"},{"ancestorTitles":["value","sink","comparisons"],"failureMessages":[],"fullName":"value sink comparisons erros when trying to order a sink with a non-sink","location":null,"status":"passed","title":"erros when trying to order a sink with a non-sink"},{"ancestorTitles":["value","type erros"],"failureMessages":[],"fullName":"value type erros emits erros when numeric operations are applied to a boolean (either lhs or rhs)","location":null,"status":"passed","title":"emits erros when numeric operations are applied to a boolean (either lhs or rhs)"},{"ancestorTitles":["value","type erros"],"failureMessages":[],"fullName":"value type erros emits erros when boolean operations are applied to a number (either lhs or rhs)","location":null,"status":"passed","title":"emits erros when boolean operations are applied to a number (either lhs or rhs)"},{"ancestorTitles":["value","foreign code calls"],"failureMessages":[],"fullName":"value foreign code calls invokes the given function","location":null,"status":"passed","title":"invokes the given function"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios .length","location":null,"status":"passed","title":".length"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .at() method","location":null,"status":"passed","title":"provides the .at() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .at() method","location":null,"status":"passed","title":"provides the .at() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .charAt() method","location":null,"status":"passed","title":"provides the .charAt() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .concat() method","location":null,"status":"passed","title":"provides the .concat() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .endsWith() method","location":null,"status":"passed","title":"provides the .endsWith() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .endsWith() method","location":null,"status":"passed","title":"provides the .endsWith() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .includes() method","location":null,"status":"passed","title":"provides the .includes() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .includes() method","location":null,"status":"passed","title":"provides the .includes() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .indexOf() method","location":null,"status":"passed","title":"provides the .indexOf() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .lastIndexOf() method","location":null,"status":"passed","title":"provides the .lastIndexOf() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .match() method","location":null,"status":"passed","title":"provides the .match() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .matchAll() method","location":null,"status":"passed","title":"provides the .matchAll() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .padEnd() method","location":null,"status":"passed","title":"provides the .padEnd() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .padStart() method","location":null,"status":"passed","title":"provides the .padStart() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .repeat() method","location":null,"status":"passed","title":"provides the .repeat() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .replace() method","location":null,"status":"passed","title":"provides the .replace() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .replaceAll() method","location":null,"status":"passed","title":"provides the .replaceAll() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .search() method","location":null,"status":"passed","title":"provides the .search() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .slice() method","location":null,"status":"passed","title":"provides the .slice() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .split() method","location":null,"status":"passed","title":"provides the .split() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .startsWith() method","location":null,"status":"passed","title":"provides the .startsWith() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .startsWith() method","location":null,"status":"passed","title":"provides the .startsWith() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .substring() method","location":null,"status":"passed","title":"provides the .substring() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .substring() method","location":null,"status":"passed","title":"provides the .substring() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .toLowerCase() method","location":null,"status":"passed","title":"provides the .toLowerCase() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .toUpperCase() method","location":null,"status":"passed","title":"provides the .toUpperCase() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .trim() method","location":null,"status":"passed","title":"provides the .trim() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .trimEnd() method","location":null,"status":"passed","title":"provides the .trimEnd() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .trimStart() method","location":null,"status":"passed","title":"provides the .trimStart() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations .length","location":null,"status":"passed","title":".length"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .at() method","location":null,"status":"passed","title":"provides the .at() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .at() method","location":null,"status":"passed","title":"provides the .at() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .concat() method","location":null,"status":"passed","title":"provides the .concat() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .entries() method","location":null,"status":"passed","title":"provides the .entries() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .includes() method","location":null,"status":"passed","title":"provides the .includes() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .includes() method","location":null,"status":"passed","title":"provides the .includes() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .indexOf() method","location":null,"status":"passed","title":"provides the .indexOf() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .join() method","location":null,"status":"passed","title":"provides the .join() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .lastIndexOf() method","location":null,"status":"passed","title":"provides the .lastIndexOf() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .lastIndexOf() method","location":null,"status":"passed","title":"provides the .lastIndexOf() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .reverse() method","location":null,"status":"passed","title":"provides the .reverse() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .slice() method","location":null,"status":"passed","title":"provides the .slice() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .slice() method","location":null,"status":"passed","title":"provides the .slice() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .slice() method","location":null,"status":"passed","title":"provides the .slice() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations .flat() flattens","location":null,"status":"passed","title":".flat() flattens"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value array.sort()","location":null,"status":"todo","title":"array.sort()"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value what happens when we get an undefined from a foreign call (like Array.get())","location":null,"status":"todo","title":"what happens when we get an undefined from a foreign call (like Array.get())"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value access to non-existing string method (a sad path test)","location":null,"status":"todo","title":"access to non-existing string method (a sad path test)"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value access to non-existing array method (a sad path test)","location":null,"status":"todo","title":"access to non-existing array method (a sad path test)"}],"endTime":1662836504335,"message":"","name":"/home/imaman/code/imaman/bigband/modules/septima-lang/dist/tests/value.spec.js","startTime":1662836504150,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["parser"],"failureMessages":[],"fullName":"parser show()","location":null,"status":"passed","title":"show()"},{"ancestorTitles":["parser"],"failureMessages":[],"fullName":"parser syntax errors","location":null,"status":"passed","title":"syntax errors"},{"ancestorTitles":["parser","unit"],"failureMessages":[],"fullName":"parser unit show","location":null,"status":"passed","title":"show"},{"ancestorTitles":["parser","expression"],"failureMessages":[],"fullName":"parser expression show","location":null,"status":"passed","title":"show"}],"endTime":1662836504451,"message":"","name":"/home/imaman/code/imaman/bigband/modules/septima-lang/dist/tests/parser.spec.js","startTime":1662836504343,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["septima-compute-module"],"failureMessages":[],"fullName":"septima-compute-module fetches the content of the module to compute from the given callback function","location":null,"status":"passed","title":"fetches the content of the module to compute from the given callback function"},{"ancestorTitles":["septima-compute-module"],"failureMessages":[],"fullName":"septima-compute-module can use exported definitions from another module","location":null,"status":"passed","title":"can use exported definitions from another module"},{"ancestorTitles":["septima-compute-module"],"failureMessages":[],"fullName":"septima-compute-module errors if the path to input from is not a string literal","location":null,"status":"passed","title":"errors if the path to input from is not a string literal"}],"endTime":1662836504550,"message":"","name":"/home/imaman/code/imaman/bigband/modules/septima-lang/dist/tests/septima-compute-module.spec.js","startTime":1662836504455,"status":"passed","summary":""}],"wasInterrupted":false}
1
+ {"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":4,"numPassedTests":219,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":23,"numTotalTestSuites":4,"numTotalTests":242,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1662998545179,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":["septima-compute-module"],"failureMessages":[],"fullName":"septima-compute-module fetches the content of the module to compute from the given callback function","location":null,"status":"passed","title":"fetches the content of the module to compute from the given callback function"},{"ancestorTitles":["septima-compute-module"],"failureMessages":[],"fullName":"septima-compute-module can use exported definitions from another module","location":null,"status":"passed","title":"can use exported definitions from another module"},{"ancestorTitles":["septima-compute-module"],"failureMessages":[],"fullName":"septima-compute-module errors if the path to input from is not a string literal","location":null,"status":"passed","title":"errors if the path to input from is not a string literal"},{"ancestorTitles":["septima-compute-module"],"failureMessages":[],"fullName":"septima-compute-module support the passing of args into the runtime","location":null,"status":"passed","title":"support the passing of args into the runtime"},{"ancestorTitles":["septima-compute-module"],"failureMessages":[],"fullName":"septima-compute-module the args object is available only at the main module","location":null,"status":"passed","title":"the args object is available only at the main module"}],"endTime":1662998546486,"message":"","name":"/home/imaman/code/imaman/bigband/modules/septima-lang/dist/tests/septima-compute-module.spec.js","startTime":1662998545611,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["parser"],"failureMessages":[],"fullName":"parser show()","location":null,"status":"passed","title":"show()"},{"ancestorTitles":["parser"],"failureMessages":[],"fullName":"parser syntax errors","location":null,"status":"passed","title":"syntax errors"},{"ancestorTitles":["parser","unit"],"failureMessages":[],"fullName":"parser unit show","location":null,"status":"passed","title":"show"},{"ancestorTitles":["parser","expression"],"failureMessages":[],"fullName":"parser expression show","location":null,"status":"passed","title":"show"}],"endTime":1662998546539,"message":"","name":"/home/imaman/code/imaman/bigband/modules/septima-lang/dist/tests/parser.spec.js","startTime":1662998545700,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value arithmetics","location":null,"status":"passed","title":"arithmetics"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value comparisons of numbers","location":null,"status":"passed","title":"comparisons of numbers"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value booleans","location":null,"status":"passed","title":"booleans"},{"ancestorTitles":["value","boolean operators"],"failureMessages":[],"fullName":"value boolean operators or","location":null,"status":"passed","title":"or"},{"ancestorTitles":["value","boolean operators"],"failureMessages":[],"fullName":"value boolean operators and","location":null,"status":"passed","title":"and"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value comparisons of booleans","location":null,"status":"passed","title":"comparisons of booleans"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value strings","location":null,"status":"passed","title":"strings"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value comparisons of strings","location":null,"status":"passed","title":"comparisons of strings"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value arrays","location":null,"status":"passed","title":"arrays"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value objects","location":null,"status":"passed","title":"objects"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value yells if access() is called with value which is neither string or num","location":null,"status":"passed","title":"yells if access() is called with value which is neither string or num"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value json","location":null,"status":"passed","title":"json"},{"ancestorTitles":["value","ifElse"],"failureMessages":[],"fullName":"value ifElse when applied to true evaluates the positive branch","location":null,"status":"passed","title":"when applied to true evaluates the positive branch"},{"ancestorTitles":["value","ifElse"],"failureMessages":[],"fullName":"value ifElse when applied to false evaluates the positive branch","location":null,"status":"passed","title":"when applied to false evaluates the positive branch"},{"ancestorTitles":["value","ifElse"],"failureMessages":[],"fullName":"value ifElse errors if applied to a non-boolean","location":null,"status":"passed","title":"errors if applied to a non-boolean"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink exported as undefined","location":null,"status":"passed","title":"exported as undefined"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink arithmetic operations on sink evaluate to sink","location":null,"status":"passed","title":"arithmetic operations on sink evaluate to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink boolean operations on sink evaluate to sink","location":null,"status":"passed","title":"boolean operations on sink evaluate to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink when sink is the right-hand-side of a boolean expression, the result is sink only if the left-hand-side dictates so","location":null,"status":"passed","title":"when sink is the right-hand-side of a boolean expression, the result is sink only if the left-hand-side dictates so"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink ifElse with sink condition evaluates to sink","location":null,"status":"passed","title":"ifElse with sink condition evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink ifElse with sink positive expression evaluates to sink only if the condition is true","location":null,"status":"passed","title":"ifElse with sink positive expression evaluates to sink only if the condition is true"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink ifElse with sink negative expression evaluates to sink only if the condition is false","location":null,"status":"passed","title":"ifElse with sink negative expression evaluates to sink only if the condition is false"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink access to an attribute of a sink evaluates to sink","location":null,"status":"passed","title":"access to an attribute of a sink evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink calling a sink evaluates to sink","location":null,"status":"passed","title":"calling a sink evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink applying .keys() to sink evaluates to sink","location":null,"status":"passed","title":"applying .keys() to sink evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink applying .entries() to sink evaluates to sink","location":null,"status":"passed","title":"applying .entries() to sink evaluates to sink"},{"ancestorTitles":["value","sink"],"failureMessages":[],"fullName":"value sink applying .fromEntries() to sink evaluates to sink","location":null,"status":"passed","title":"applying .fromEntries() to sink evaluates to sink"},{"ancestorTitles":["value","sink","unsink()"],"failureMessages":[],"fullName":"value sink unsink() when applied to a non-sink value evaluates to it","location":null,"status":"passed","title":"when applied to a non-sink value evaluates to it"},{"ancestorTitles":["value","sink","unsink()"],"failureMessages":[],"fullName":"value sink unsink() when applied to a sink value evaluates to its argument","location":null,"status":"passed","title":"when applied to a sink value evaluates to its argument"},{"ancestorTitles":["value","sink","comparisons"],"failureMessages":[],"fullName":"value sink comparisons comparing a sink with itself evaluates to true","location":null,"status":"passed","title":"comparing a sink with itself evaluates to true"},{"ancestorTitles":["value","sink","comparisons"],"failureMessages":[],"fullName":"value sink comparisons comparing a sink with other types evaluates to false","location":null,"status":"passed","title":"comparing a sink with other types evaluates to false"},{"ancestorTitles":["value","sink","comparisons"],"failureMessages":[],"fullName":"value sink comparisons erros when trying to order a sink with a non-sink","location":null,"status":"passed","title":"erros when trying to order a sink with a non-sink"},{"ancestorTitles":["value","type erros"],"failureMessages":[],"fullName":"value type erros emits erros when numeric operations are applied to a boolean (either lhs or rhs)","location":null,"status":"passed","title":"emits erros when numeric operations are applied to a boolean (either lhs or rhs)"},{"ancestorTitles":["value","type erros"],"failureMessages":[],"fullName":"value type erros emits erros when boolean operations are applied to a number (either lhs or rhs)","location":null,"status":"passed","title":"emits erros when boolean operations are applied to a number (either lhs or rhs)"},{"ancestorTitles":["value","foreign code calls"],"failureMessages":[],"fullName":"value foreign code calls invokes the given function","location":null,"status":"passed","title":"invokes the given function"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios .length","location":null,"status":"passed","title":".length"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .at() method","location":null,"status":"passed","title":"provides the .at() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .at() method","location":null,"status":"passed","title":"provides the .at() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .charAt() method","location":null,"status":"passed","title":"provides the .charAt() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .concat() method","location":null,"status":"passed","title":"provides the .concat() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .endsWith() method","location":null,"status":"passed","title":"provides the .endsWith() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .endsWith() method","location":null,"status":"passed","title":"provides the .endsWith() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .includes() method","location":null,"status":"passed","title":"provides the .includes() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .includes() method","location":null,"status":"passed","title":"provides the .includes() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .indexOf() method","location":null,"status":"passed","title":"provides the .indexOf() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .lastIndexOf() method","location":null,"status":"passed","title":"provides the .lastIndexOf() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .match() method","location":null,"status":"passed","title":"provides the .match() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .matchAll() method","location":null,"status":"passed","title":"provides the .matchAll() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .padEnd() method","location":null,"status":"passed","title":"provides the .padEnd() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .padStart() method","location":null,"status":"passed","title":"provides the .padStart() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .repeat() method","location":null,"status":"passed","title":"provides the .repeat() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .replace() method","location":null,"status":"passed","title":"provides the .replace() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .replaceAll() method","location":null,"status":"passed","title":"provides the .replaceAll() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .search() method","location":null,"status":"passed","title":"provides the .search() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .slice() method","location":null,"status":"passed","title":"provides the .slice() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .split() method","location":null,"status":"passed","title":"provides the .split() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .startsWith() method","location":null,"status":"passed","title":"provides the .startsWith() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .startsWith() method","location":null,"status":"passed","title":"provides the .startsWith() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .substring() method","location":null,"status":"passed","title":"provides the .substring() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .substring() method","location":null,"status":"passed","title":"provides the .substring() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .toLowerCase() method","location":null,"status":"passed","title":"provides the .toLowerCase() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .toUpperCase() method","location":null,"status":"passed","title":"provides the .toUpperCase() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .trim() method","location":null,"status":"passed","title":"provides the .trim() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .trimEnd() method","location":null,"status":"passed","title":"provides the .trimEnd() method"},{"ancestorTitles":["value","string operatios"],"failureMessages":[],"fullName":"value string operatios provides the .trimStart() method","location":null,"status":"passed","title":"provides the .trimStart() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations .length","location":null,"status":"passed","title":".length"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .at() method","location":null,"status":"passed","title":"provides the .at() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .at() method","location":null,"status":"passed","title":"provides the .at() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .concat() method","location":null,"status":"passed","title":"provides the .concat() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .entries() method","location":null,"status":"passed","title":"provides the .entries() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .includes() method","location":null,"status":"passed","title":"provides the .includes() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .includes() method","location":null,"status":"passed","title":"provides the .includes() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .indexOf() method","location":null,"status":"passed","title":"provides the .indexOf() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .join() method","location":null,"status":"passed","title":"provides the .join() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .lastIndexOf() method","location":null,"status":"passed","title":"provides the .lastIndexOf() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .lastIndexOf() method","location":null,"status":"passed","title":"provides the .lastIndexOf() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .reverse() method","location":null,"status":"passed","title":"provides the .reverse() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .slice() method","location":null,"status":"passed","title":"provides the .slice() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .slice() method","location":null,"status":"passed","title":"provides the .slice() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations provides the .slice() method","location":null,"status":"passed","title":"provides the .slice() method"},{"ancestorTitles":["value","array operations"],"failureMessages":[],"fullName":"value array operations .flat() flattens","location":null,"status":"passed","title":".flat() flattens"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value array.sort()","location":null,"status":"todo","title":"array.sort()"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value what happens when we get an undefined from a foreign call (like Array.get())","location":null,"status":"todo","title":"what happens when we get an undefined from a foreign call (like Array.get())"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value access to non-existing string method (a sad path test)","location":null,"status":"todo","title":"access to non-existing string method (a sad path test)"},{"ancestorTitles":["value"],"failureMessages":[],"fullName":"value access to non-existing array method (a sad path test)","location":null,"status":"todo","title":"access to non-existing array method (a sad path test)"}],"endTime":1662998546764,"message":"","name":"/home/imaman/code/imaman/bigband/modules/septima-lang/dist/tests/value.spec.js","startTime":1662998545695,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima basics","location":null,"status":"passed","title":"basics"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima an optional return keyword can be placed before the result","location":null,"status":"passed","title":"an optional return keyword can be placed before the result"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima booleans","location":null,"status":"passed","title":"booleans"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima arithmetics","location":null,"status":"passed","title":"arithmetics"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima error message specifies the location in the file","location":null,"status":"passed","title":"error message specifies the location in the file"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima equality","location":null,"status":"passed","title":"equality"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima comparison","location":null,"status":"passed","title":"comparison"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima combined arithmetics and logical expressions","location":null,"status":"passed","title":"combined arithmetics and logical expressions"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima the rhs of a logical-or expression is evaluated only if lhs is false","location":null,"status":"passed","title":"the rhs of a logical-or expression is evaluated only if lhs is false"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima the rhs of a logical-and expression is evaluated only if lhs is true","location":null,"status":"passed","title":"the rhs of a logical-and expression is evaluated only if lhs is true"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima eats whitespace","location":null,"status":"passed","title":"eats whitespace"},{"ancestorTitles":["septima","unary expressions"],"failureMessages":[],"fullName":"septima unary expressions +","location":null,"status":"passed","title":"+"},{"ancestorTitles":["septima","unary expressions"],"failureMessages":[],"fullName":"septima unary expressions errors if + is applied to non-number","location":null,"status":"passed","title":"errors if + is applied to non-number"},{"ancestorTitles":["septima","unary expressions"],"failureMessages":[],"fullName":"septima unary expressions -","location":null,"status":"passed","title":"-"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings can be specified via the double-quotes notation","location":null,"status":"passed","title":"can be specified via the double-quotes notation"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings can be specified via the single-quotes notation","location":null,"status":"passed","title":"can be specified via the single-quotes notation"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings does not trim leading/trailing whitespace","location":null,"status":"passed","title":"does not trim leading/trailing whitespace"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings supports string methods","location":null,"status":"passed","title":"supports string methods"},{"ancestorTitles":["septima","strings"],"failureMessages":[],"fullName":"septima strings supports optional arguments of string methods","location":null,"status":"passed","title":"supports optional arguments of string methods"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let binds values to variables","location":null,"status":"passed","title":"binds values to variables"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let do not need the trailing semicolon","location":null,"status":"passed","title":"do not need the trailing semicolon"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let fails if the variable was not defined","location":null,"status":"passed","title":"fails if the variable was not defined"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let parenthsized expression can have let defintions","location":null,"status":"passed","title":"parenthsized expression can have let defintions"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let inner expressions can access variables from enclosing scopes","location":null,"status":"passed","title":"inner expressions can access variables from enclosing scopes"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let definitions from inner scopes overshadow definitions from outer scopes","location":null,"status":"passed","title":"definitions from inner scopes overshadow definitions from outer scopes"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let the body of a definition can reference an earlier definition from the same scope","location":null,"status":"passed","title":"the body of a definition can reference an earlier definition from the same scope"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let the body of a definition cannot reference a latter definition from the same scope","location":null,"status":"passed","title":"the body of a definition cannot reference a latter definition from the same scope"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let the body of a definition cannot reference itself","location":null,"status":"passed","title":"the body of a definition cannot reference itself"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let uses lexical scoping (and not dynamic scoping)","location":null,"status":"passed","title":"uses lexical scoping (and not dynamic scoping)"},{"ancestorTitles":["septima","let"],"failureMessages":[],"fullName":"septima let definitions go out of scope","location":null,"status":"passed","title":"definitions go out of scope"},{"ancestorTitles":["septima","arrays"],"failureMessages":[],"fullName":"septima arrays array literals are specified via the enclosing brackets notation ([])","location":null,"status":"passed","title":"array literals are specified via the enclosing brackets notation ([])"},{"ancestorTitles":["septima","arrays"],"failureMessages":[],"fullName":"septima arrays allow a dangling comma","location":null,"status":"passed","title":"allow a dangling comma"},{"ancestorTitles":["septima","arrays"],"failureMessages":[],"fullName":"septima arrays individual elements of an array can be accessed via the [<index>] notation","location":null,"status":"passed","title":"individual elements of an array can be accessed via the [<index>] notation"},{"ancestorTitles":["septima","arrays"],"failureMessages":[],"fullName":"septima arrays the <index> value at the [<index>] notation can be a computed value","location":null,"status":"passed","title":"the <index> value at the [<index>] notation can be a computed value"},{"ancestorTitles":["septima","objects","literals"],"failureMessages":[],"fullName":"septima objects literals are specified via JSON format","location":null,"status":"passed","title":"are specified via JSON format"},{"ancestorTitles":["septima","objects","literals"],"failureMessages":[],"fullName":"septima objects literals allow a dangling comma","location":null,"status":"passed","title":"allow a dangling comma"},{"ancestorTitles":["septima","objects","literals"],"failureMessages":[],"fullName":"septima objects literals a dangling comma in an empty object is not allowed","location":null,"status":"passed","title":"a dangling comma in an empty object is not allowed"},{"ancestorTitles":["septima","objects","literals"],"failureMessages":[],"fullName":"septima objects literals supports computed attributes names via the [<expression>]: <value> notation","location":null,"status":"passed","title":"supports computed attributes names via the [<expression>]: <value> notation"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes can be accessed via the .<ident> notation","location":null,"status":"passed","title":"can be accessed via the .<ident> notation"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes can be accessed via the [<name>] notation","location":null,"status":"passed","title":"can be accessed via the [<name>] notation"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes supports chains of attribute accesses mixing the .<ident> and the [<name>] notations","location":null,"status":"passed","title":"supports chains of attribute accesses mixing the .<ident> and the [<name>] notations"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes supports chains of calls to nested attributes which are lambda expressions","location":null,"status":"passed","title":"supports chains of calls to nested attributes which are lambda expressions"},{"ancestorTitles":["septima","objects","attributes"],"failureMessages":[],"fullName":"septima objects attributes the <name> value at the [<name>] notation can be a computed value","location":null,"status":"passed","title":"the <name> value at the [<name>] notation can be a computed value"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects shallow copies an object into an object literal","location":null,"status":"passed","title":"shallow copies an object into an object literal"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects can be combined with hard-coded (literal) attributes","location":null,"status":"passed","title":"can be combined with hard-coded (literal) attributes"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects can be used multiple times inside a single object literal","location":null,"status":"passed","title":"can be used multiple times inside a single object literal"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects overrides attributes to its left","location":null,"status":"passed","title":"overrides attributes to its left"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects overridden by attributes to its right","location":null,"status":"passed","title":"overridden by attributes to its right"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects can be mixed with computed attribute names","location":null,"status":"passed","title":"can be mixed with computed attribute names"},{"ancestorTitles":["septima","spread operator in objects"],"failureMessages":[],"fullName":"septima spread operator in objects errors if applied to a non-object value","location":null,"status":"passed","title":"errors if applied to a non-object value"},{"ancestorTitles":["septima","spread operator in arrays"],"failureMessages":[],"fullName":"septima spread operator in arrays shallow copies an array into an array literal","location":null,"status":"passed","title":"shallow copies an array into an array literal"},{"ancestorTitles":["septima","spread operator in arrays"],"failureMessages":[],"fullName":"septima spread operator in arrays can be mixed with array elements","location":null,"status":"passed","title":"can be mixed with array elements"},{"ancestorTitles":["septima","spread operator in arrays"],"failureMessages":[],"fullName":"septima spread operator in arrays can be used multiple times inside an array literal","location":null,"status":"passed","title":"can be used multiple times inside an array literal"},{"ancestorTitles":["septima","spread operator in arrays"],"failureMessages":[],"fullName":"septima spread operator in arrays errors if applied to a non-array value","location":null,"status":"passed","title":"errors if applied to a non-array value"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if returns the value of the first branch if the condition is true","location":null,"status":"passed","title":"returns the value of the first branch if the condition is true"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if evaluates the first branch only if the condition is true","location":null,"status":"passed","title":"evaluates the first branch only if the condition is true"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if returns the value of the second branch if the condition is false","location":null,"status":"passed","title":"returns the value of the second branch if the condition is false"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if evaluates the second branch only if the condition is false","location":null,"status":"passed","title":"evaluates the second branch only if the condition is false"},{"ancestorTitles":["septima","if"],"failureMessages":[],"fullName":"septima if yells if conditions is not boolean","location":null,"status":"passed","title":"yells if conditions is not boolean"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions binds the value of the actual arg to the formal arg","location":null,"status":"passed","title":"binds the value of the actual arg to the formal arg"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can be stored in a variable","location":null,"status":"passed","title":"can be stored in a variable"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions allows a dangling comma, at the call site, after the last actual argument","location":null,"status":"passed","title":"allows a dangling comma, at the call site, after the last actual argument"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation a single formal argument does not need to be surrounded with parenthesis","location":null,"status":"passed","title":"a single formal argument does not need to be surrounded with parenthesis"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation (a) => <expression>","location":null,"status":"passed","title":"(a) => <expression>"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation () => <expression>","location":null,"status":"passed","title":"() => <expression>"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation (a,b) => <expression>","location":null,"status":"passed","title":"(a,b) => <expression>"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation body of an arrow function can be { return <expression>}","location":null,"status":"passed","title":"body of an arrow function can be { return <expression>}"},{"ancestorTitles":["septima","lambda expressions","arrow function notation"],"failureMessages":[],"fullName":"septima lambda expressions arrow function notation body of an arrow function can include let definitions","location":null,"status":"passed","title":"body of an arrow function can include let definitions"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can have no args","location":null,"status":"passed","title":"can have no args"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions errors on arg list mismatch","location":null,"status":"passed","title":"errors on arg list mismatch"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can be recursive","location":null,"status":"passed","title":"can be recursive"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can access definitions from the enclosing scope","location":null,"status":"passed","title":"can access definitions from the enclosing scope"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions expression trace on error","location":null,"status":"passed","title":"expression trace on error"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions only lexical scope is considered when looking up a definition","location":null,"status":"passed","title":"only lexical scope is considered when looking up a definition"},{"ancestorTitles":["septima","lambda expressions"],"failureMessages":[],"fullName":"septima lambda expressions can return another lambda expression (a-la currying)","location":null,"status":"passed","title":"can return another lambda expression (a-la currying)"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink specified via the \"sink\" literal","location":null,"status":"passed","title":"specified via the \"sink\" literal"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink access to non-existing attribute of an object evalutes to a sink","location":null,"status":"passed","title":"access to non-existing attribute of an object evalutes to a sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an expression involving a sink evaluates to sink","location":null,"status":"passed","title":"an expression involving a sink evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink the \"undefined\" literal is an alias for \"sink\"","location":null,"status":"passed","title":"the \"undefined\" literal is an alias for \"sink\""},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an array can hold a sink without becoming a sink itself","location":null,"status":"passed","title":"an array can hold a sink without becoming a sink itself"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an object can hold a sink without becoming a sink itself","location":null,"status":"passed","title":"an object can hold a sink without becoming a sink itself"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an if() expression an have a sink positive/negative branch without becoming a sink itself","location":null,"status":"passed","title":"an if() expression an have a sink positive/negative branch without becoming a sink itself"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an if() expression becomes a sink itself if the branch dictated by the condition evaluates to sink","location":null,"status":"passed","title":"an if() expression becomes a sink itself if the branch dictated by the condition evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an if() expression becomes a sink itself if the the condition expression evaluates to sink","location":null,"status":"passed","title":"an if() expression becomes a sink itself if the the condition expression evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an && expression with sinks","location":null,"status":"passed","title":"an && expression with sinks"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink an || expression with sinks","location":null,"status":"passed","title":"an || expression with sinks"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink access to an attribute of a sink evaluates to sink","location":null,"status":"passed","title":"access to an attribute of a sink evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink calling a sink evaluates to sink","location":null,"status":"passed","title":"calling a sink evaluates to sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink a sink compared with itself evaluates to true","location":null,"status":"passed","title":"a sink compared with itself evaluates to true"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink a sink compared with other types evaluates to false","location":null,"status":"passed","title":"a sink compared with other types evaluates to false"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink errors when a sink is ordered with other types","location":null,"status":"passed","title":"errors when a sink is ordered with other types"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink the ?? operator evaluates to its right-hand-side if its left-hand-side is a sink","location":null,"status":"passed","title":"the ?? operator evaluates to its right-hand-side if its left-hand-side is a sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink the ?? operator evaluates to its left-hand-side if it is a non-sink","location":null,"status":"passed","title":"the ?? operator evaluates to its left-hand-side if it is a non-sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink the .where attribure of the result holds the source code of the sink","location":null,"status":"passed","title":"the .where attribure of the result holds the source code of the sink"},{"ancestorTitles":["septima","sink"],"failureMessages":[],"fullName":"septima sink the .message attribure of the result provides a human readable summary","location":null,"status":"passed","title":"the .message attribure of the result provides a human readable summary"},{"ancestorTitles":["septima","sink!"],"failureMessages":[],"fullName":"septima sink! captures the expression trace at runtime","location":null,"status":"passed","title":"captures the expression trace at runtime"},{"ancestorTitles":["septima","sink!"],"failureMessages":[],"fullName":"septima sink! can also appear in code as undefined!","location":null,"status":"passed","title":"can also appear in code as undefined!"},{"ancestorTitles":["septima","sink!!"],"failureMessages":[],"fullName":"septima sink!! captures the expression trace and the symbol-table at runtime","location":null,"status":"passed","title":"captures the expression trace and the symbol-table at runtime"},{"ancestorTitles":["septima","sink!!"],"failureMessages":[],"fullName":"septima sink!! can be used to recover values of definitions from a crash site","location":null,"status":"passed","title":"can be used to recover values of definitions from a crash site"},{"ancestorTitles":["septima","sink!!"],"failureMessages":[],"fullName":"septima sink!! can also appear in code as undefined!!","location":null,"status":"passed","title":"can also appear in code as undefined!!"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods concat","location":null,"status":"passed","title":"concat"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods every","location":null,"status":"passed","title":"every"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods filter","location":null,"status":"passed","title":"filter"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods find","location":null,"status":"passed","title":"find"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods find returns sink if no matching element exists","location":null,"status":"passed","title":"find returns sink if no matching element exists"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods findIndex","location":null,"status":"passed","title":"findIndex"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods findIndex returns -1 if no matching element exists","location":null,"status":"passed","title":"findIndex returns -1 if no matching element exists"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods flatMap","location":null,"status":"passed","title":"flatMap"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods map","location":null,"status":"passed","title":"map"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods reduce","location":null,"status":"passed","title":"reduce"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods reduceRight","location":null,"status":"passed","title":"reduceRight"},{"ancestorTitles":["septima","array methods"],"failureMessages":[],"fullName":"septima array methods some","location":null,"status":"passed","title":"some"},{"ancestorTitles":["septima","Object.keys()"],"failureMessages":[],"fullName":"septima Object.keys() returns names of all attributes of the given object","location":null,"status":"passed","title":"returns names of all attributes of the given object"},{"ancestorTitles":["septima","Object.keys()"],"failureMessages":[],"fullName":"septima Object.keys() fails if applied to a non-object value","location":null,"status":"passed","title":"fails if applied to a non-object value"},{"ancestorTitles":["septima","Object.entries()"],"failureMessages":[],"fullName":"septima Object.entries() returns a [key, value] pair for each attribute of the given object","location":null,"status":"passed","title":"returns a [key, value] pair for each attribute of the given object"},{"ancestorTitles":["septima","Object.entries()"],"failureMessages":[],"fullName":"septima Object.entries() fails if applied to a non-object value","location":null,"status":"passed","title":"fails if applied to a non-object value"},{"ancestorTitles":["septima","Object.fromEntries()"],"failureMessages":[],"fullName":"septima Object.fromEntries() constructs an object from a list of [key, value] pairs describing its attributes","location":null,"status":"passed","title":"constructs an object from a list of [key, value] pairs describing its attributes"},{"ancestorTitles":["septima","Object.fromEntries()"],"failureMessages":[],"fullName":"septima Object.fromEntries() fails if applied to a non-array value","location":null,"status":"passed","title":"fails if applied to a non-array value"},{"ancestorTitles":["septima","Object.fromEntries()"],"failureMessages":[],"fullName":"septima Object.fromEntries() the input array must be an array of pairs","location":null,"status":"passed","title":"the input array must be an array of pairs"},{"ancestorTitles":["septima","Object.fromEntries()"],"failureMessages":[],"fullName":"septima Object.fromEntries() the first element in each pair must be a string","location":null,"status":"passed","title":"the first element in each pair must be a string"},{"ancestorTitles":["septima","comments"],"failureMessages":[],"fullName":"septima comments anything from '//' up to the end-of-line is ignored","location":null,"status":"passed","title":"anything from '//' up to the end-of-line is ignored"},{"ancestorTitles":["septima","comments"],"failureMessages":[],"fullName":"septima comments allow consecutive lines which are all commented out","location":null,"status":"passed","title":"allow consecutive lines which are all commented out"},{"ancestorTitles":["septima","comments"],"failureMessages":[],"fullName":"septima comments a comment inside a comment has no effect","location":null,"status":"passed","title":"a comment inside a comment has no effect"},{"ancestorTitles":["septima","evaluation stack"],"failureMessages":[],"fullName":"septima evaluation stack max recursion depth","location":null,"status":"passed","title":"max recursion depth"},{"ancestorTitles":["septima","preimport"],"failureMessages":[],"fullName":"septima preimport definitions from a preimported file can be used","location":null,"status":"passed","title":"definitions from a preimported file can be used"},{"ancestorTitles":["septima","preimport"],"failureMessages":[],"fullName":"septima preimport supports multiple preimports","location":null,"status":"passed","title":"supports multiple preimports"},{"ancestorTitles":["septima","args"],"failureMessages":[],"fullName":"septima args are bounded at runtime to a special variable called \"args\"","location":null,"status":"passed","title":"are bounded at runtime to a special variable called \"args\""},{"ancestorTitles":["septima","args"],"failureMessages":[],"fullName":"septima args are shadowed by a program-defined \"args\" symbol","location":null,"status":"passed","title":"are shadowed by a program-defined \"args\" symbol"},{"ancestorTitles":["septima","args"],"failureMessages":[],"fullName":"septima args are supported also via the Septima.run() API","location":null,"status":"passed","title":"are supported also via the Septima.run() API"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima support file names in locations","location":null,"status":"todo","title":"support file names in locations"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima string interpolation via `foo` strings","location":null,"status":"todo","title":"string interpolation via `foo` strings"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima imports","location":null,"status":"todo","title":"imports"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima optional parameters","location":null,"status":"todo","title":"optional parameters"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima optional type annotations?","location":null,"status":"todo","title":"optional type annotations?"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima allow redundant commas","location":null,"status":"todo","title":"allow redundant commas"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima left associativity of +/-","location":null,"status":"todo","title":"left associativity of +/-"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima comparison of arrays","location":null,"status":"todo","title":"comparison of arrays"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima comparison of lambdas?","location":null,"status":"todo","title":"comparison of lambdas?"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima deep equality of objects","location":null,"status":"todo","title":"deep equality of objects"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima \"abcdef\"[1] == \"b\"","location":null,"status":"todo","title":"\"abcdef\"[1] == \"b\""},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima an object literal cannot have a repeated attribute name that","location":null,"status":"todo","title":"an object literal cannot have a repeated attribute name that"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima quoting of a ticks inside a string","location":null,"status":"todo","title":"quoting of a ticks inside a string"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima number in scientific notation","location":null,"status":"todo","title":"number in scientific notation"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima number methods","location":null,"status":"todo","title":"number methods"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima drop the fun () notation and use just arrow functions","location":null,"status":"todo","title":"drop the fun () notation and use just arrow functions"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima proper internal representation of arrow function, in particular: show(), span()","location":null,"status":"todo","title":"proper internal representation of arrow function, in particular: show(), span()"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima sink sinkifies arrays and objects it is stored at","location":null,"status":"todo","title":"sink sinkifies arrays and objects it is stored at"},{"ancestorTitles":["septima"],"failureMessages":[],"fullName":"septima {foo}","location":null,"status":"todo","title":"{foo}"}],"endTime":1662998547510,"message":"","name":"/home/imaman/code/imaman/bigband/modules/septima-lang/dist/tests/septima.spec.js","startTime":1662998545695,"status":"passed","summary":""}],"wasInterrupted":false}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "septima-lang",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
package/src/parser.ts CHANGED
@@ -307,11 +307,15 @@ export class Parser {
307
307
  while (true) {
308
308
  const arg = this.expression()
309
309
  actualArgs.push(arg)
310
- const end = this.scanner.consumeIf(')')
310
+ let end = this.scanner.consumeIf(')')
311
311
  if (end) {
312
312
  return { actualArgs, end }
313
313
  }
314
314
  this.scanner.consume(',')
315
+ end = this.scanner.consumeIf(')')
316
+ if (end) {
317
+ return { actualArgs, end }
318
+ }
315
319
  }
316
320
  }
317
321
 
@@ -363,17 +367,17 @@ export class Parser {
363
367
  }
364
368
 
365
369
  maybePrimitiveLiteral(): Literal | undefined {
366
- let t = this.scanner.consumeIf('sink!!')
370
+ let t = this.scanner.consumeIf('sink!!') || this.scanner.consumeIf('undefined!!')
367
371
  if (t) {
368
372
  return { tag: 'literal', type: 'sink!!', t }
369
373
  }
370
374
 
371
- t = this.scanner.consumeIf('sink!')
375
+ t = this.scanner.consumeIf('sink!') || this.scanner.consumeIf('undefined!')
372
376
  if (t) {
373
377
  return { tag: 'literal', type: 'sink!', t }
374
378
  }
375
379
 
376
- t = this.scanner.consumeIf('sink')
380
+ t = this.scanner.consumeIf('sink') || this.scanner.consumeIf('undefined')
377
381
  if (t) {
378
382
  return { tag: 'literal', type: 'sink', t }
379
383
  }
package/src/runtime.ts CHANGED
@@ -62,9 +62,10 @@ export class Runtime {
62
62
  private readonly verbosity: Verbosity = 'quiet',
63
63
  private readonly preimports: Record<string, Value>,
64
64
  private readonly getAstOf: (fileName: string) => Unit,
65
+ private readonly args: Record<string, unknown>,
65
66
  ) {}
66
67
 
67
- private buildInitialSymbolTable() {
68
+ private buildInitialSymbolTable(generateTheArgsObject: boolean) {
68
69
  const empty = new EmptySymbolTable()
69
70
 
70
71
  const keys = Value.foreign(o => o.keys())
@@ -72,6 +73,10 @@ export class Runtime {
72
73
  const fromEntries = Value.foreign(o => o.fromEntries())
73
74
  let lib = new SymbolFrame('Object', { destination: Value.obj({ keys, entries, fromEntries }) }, empty)
74
75
 
76
+ if (generateTheArgsObject) {
77
+ lib = new SymbolFrame('args', { destination: Value.from(this.args) }, lib)
78
+ }
79
+
75
80
  for (const [importName, importValue] of Object.entries(this.preimports)) {
76
81
  lib = new SymbolFrame(importName, { destination: importValue }, lib)
77
82
  }
@@ -80,7 +85,7 @@ export class Runtime {
80
85
 
81
86
  compute() {
82
87
  try {
83
- const value = this.evalNode(this.root, this.buildInitialSymbolTable())
88
+ const value = this.evalNode(this.root, this.buildInitialSymbolTable(true))
84
89
  return { value }
85
90
  } catch (e) {
86
91
  const trace: AstNode[] = []
@@ -142,7 +147,7 @@ export class Runtime {
142
147
  imports,
143
148
  expression: { tag: 'topLevelExpression', definitions: exp.definitions, computation: { tag: 'export*' } },
144
149
  }
145
- return this.evalNode(unit, this.buildInitialSymbolTable())
150
+ return this.evalNode(unit, this.buildInitialSymbolTable(false))
146
151
  }
147
152
 
148
153
  shouldNeverHappen(exp)
package/src/septima.ts CHANGED
@@ -28,13 +28,13 @@ export class Septima {
28
28
  * @param options
29
29
  * @returns the value that `input` evaluates to
30
30
  */
31
- static run(input: string, options?: Options): unknown {
31
+ static run(input: string, options?: Options, args: Record<string, unknown> = {}): unknown {
32
32
  const onSink =
33
33
  options?.onSink ??
34
34
  ((r: ResultSink) => {
35
35
  throw new Error(r.message)
36
36
  })
37
- const res = new Septima().compute(input)
37
+ const res = new Septima().compute(input, {}, 'quiet', args)
38
38
  if (res.tag === 'ok') {
39
39
  return res.value
40
40
  }
@@ -48,21 +48,26 @@ export class Septima {
48
48
 
49
49
  constructor() {}
50
50
 
51
- computeModule(moduleName: string, moduleReader: (m: string) => string): Result {
51
+ computeModule(moduleName: string, moduleReader: (m: string) => string, args: Record<string, unknown>): Result {
52
52
  const input = moduleReader(moduleName)
53
53
  const sourceCode = new SourceCode(input)
54
- const value = this.computeImpl(sourceCode, 'quiet', {}, moduleReader)
54
+ const value = this.computeImpl(sourceCode, 'quiet', {}, moduleReader, args)
55
55
  if (!value.isSink()) {
56
56
  return { value: value.export(), tag: 'ok' }
57
57
  }
58
58
  return new ResultSinkImpl(value, sourceCode)
59
59
  }
60
60
 
61
- compute(input: string, preimports: Record<string, string> = {}, verbosity: Verbosity = 'quiet'): Result {
61
+ compute(
62
+ input: string,
63
+ preimports: Record<string, string> = {},
64
+ verbosity: Verbosity = 'quiet',
65
+ args: Record<string, unknown>,
66
+ ): Result {
62
67
  const lib: Record<string, Value> = {}
63
68
  for (const [importName, importCode] of Object.entries(preimports)) {
64
69
  const sourceCode = new SourceCode(importCode)
65
- const value = this.computeImpl(sourceCode, verbosity, {}, undefined)
70
+ const value = this.computeImpl(sourceCode, verbosity, {}, undefined, {})
66
71
  if (value.isSink()) {
67
72
  // TODO(imaman): cover!
68
73
  const r = new ResultSinkImpl(value, sourceCode)
@@ -72,7 +77,7 @@ export class Septima {
72
77
  }
73
78
 
74
79
  const sourceCode = new SourceCode(input)
75
- const value = this.computeImpl(sourceCode, verbosity, lib, undefined)
80
+ const value = this.computeImpl(sourceCode, verbosity, lib, undefined, args)
76
81
  if (!value.isSink()) {
77
82
  return { value: value.export(), tag: 'ok' }
78
83
  }
@@ -84,6 +89,7 @@ export class Septima {
84
89
  verbosity: Verbosity,
85
90
  lib: Record<string, Value>,
86
91
  moduleReader: undefined | ((m: string) => string),
92
+ args: Record<string, unknown>,
87
93
  ) {
88
94
  const scanner = new Scanner(sourceCode)
89
95
  const parser = new Parser(scanner)
@@ -95,7 +101,8 @@ export class Septima {
95
101
  }
96
102
  return parse(moduleReader(fileName))
97
103
  }
98
- const runtime = new Runtime(ast, verbosity, lib, getAstOf)
104
+
105
+ const runtime = new Runtime(ast, verbosity, lib, getAstOf, args)
99
106
  const c = runtime.compute()
100
107
 
101
108
  if (c.value) {
@@ -4,9 +4,9 @@ import { shouldNeverHappen } from '../src/should-never-happen'
4
4
  /**
5
5
  * Runs a Septima program for testing purposes. Throws an error If the program evaluated to `sink`.
6
6
  */
7
- async function run(mainModule: string, inputs: Record<string, string>) {
7
+ async function run(mainModule: string, inputs: Record<string, string>, args: Record<string, unknown> = {}) {
8
8
  const septima = new Septima()
9
- const res = septima.computeModule(mainModule, (m: string) => inputs[m])
9
+ const res = septima.computeModule(mainModule, (m: string) => inputs[m], args)
10
10
  if (res.tag === 'ok') {
11
11
  return res.value
12
12
  }
@@ -30,4 +30,12 @@ describe('septima-compute-module', () => {
30
30
  'Expected a string literal at (1:22..24) 500',
31
31
  )
32
32
  })
33
+ test('support the passing of args into the runtime', async () => {
34
+ expect(await run('a', { a: `args.x * args.y` }, { x: 5, y: 9 })).toEqual(45)
35
+ })
36
+ test('the args object is available only at the main module', async () => {
37
+ await expect(
38
+ run('a', { a: `import * as b from 'b'; args.x + '_' + b.foo`, b: `let foo = args.x ?? 'N/A'; {}` }, { x: 'Red' }),
39
+ ).rejects.toThrowError(/Symbol args was not found when evaluating/)
40
+ })
33
41
  })