arc-lang 0.6.6 → 0.6.7
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/dist/interpreter.js +1 -0
- package/dist/lexer.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/interpreter.js
CHANGED
|
@@ -215,6 +215,7 @@ function resolveAsync(v) {
|
|
|
215
215
|
function makePrelude(env) {
|
|
216
216
|
const fns = {
|
|
217
217
|
print: (...args) => { console.log(args.map(toStr).join(" ")); return null; },
|
|
218
|
+
throw: (msg) => { throw new Error(toStr(msg ?? "error")); },
|
|
218
219
|
arity: (v) => {
|
|
219
220
|
if (v && typeof v === "object" && v.__fn)
|
|
220
221
|
return (v.params || []).length;
|
package/dist/lexer.js
CHANGED
|
@@ -150,7 +150,7 @@ export function lex(source) {
|
|
|
150
150
|
str += advance();
|
|
151
151
|
continue;
|
|
152
152
|
}
|
|
153
|
-
if (peek() === "{") {
|
|
153
|
+
if (peek() === "{" && /[a-zA-Z_]/.test(peek(1))) {
|
|
154
154
|
hasInterp = true;
|
|
155
155
|
if (str.length > 0 || parts.length === 0) {
|
|
156
156
|
parts.push(tok(TokenType.String, str, sl, sc));
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED