Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple example doesn't work for me #5

Open
phunanon opened this issue Oct 3, 2023 · 0 comments
Open

Simple example doesn't work for me #5

phunanon opened this issue Oct 3, 2023 · 0 comments

Comments

@phunanon
Copy link

phunanon commented Oct 3, 2023

Terminal printout below

/c/me/gh/yascriptlang cat fib-time.yas 
def fib = fn (n) -> if n < 2 then n else fib(n - 1) + fib(n - 2);

time(fn-> {
  println(fib(15));
});
/c/me/gh/yascriptlang node bin/yas.js fib-time.yas
file:///C:/me/gh/yascriptlang/src/tokenizer/InputStream.js:56
    throw new Error(`${type}: ${msg} at line ${this.line}:${this.col}`);
    ^

" at line 1:65Error: Can't handle character: "
    at InputStream.croak ←[90m(file:///C:/me/gh/yascriptlang/←[39msrc/tokenizer/InputStream.js:56:11←[90m)←[39m
    at TokenStream.croak ←[90m(file:///C:/me/gh/yascriptlang/←[39msrc/tokenizer/TokenStream.js:196:23←[90m)←[39m
    at TokenStream.readNext ←[90m(file:///C:/me/gh/yascriptlang/←[39msrc/tokenizer/TokenStream.js:175:17←[90m)←[39m
    at TokenStream.peek ←[90m(file:///C:/me/gh/yascriptlang/←[39msrc/tokenizer/TokenStream.js:180:27←[90m)←[39m
    at TokenStream.eof ←[90m(file:///C:/me/gh/yascriptlang/←[39msrc/tokenizer/TokenStream.js:192:17←[90m)←[39m
    at Parser.parseToplevel ←[90m(file:///C:/me/gh/yascriptlang/←[39msrc/parser/Parser.js:370:25←[90m)←[39m
    at Parser.parse ←[90m(file:///C:/me/gh/yascriptlang/←[39msrc/parser/Parser.js:62:17←[90m)←[39m
    at run ←[90m(file:///C:/me/gh/yascriptlang/←[39msrc/index.js:22:22←[90m)←[39m
    at ←[90mfile:///C:/me/gh/yascriptlang/←[39mbin/yas.js:15:3
←[90m    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)←[39m

Node.js v18.13.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant