🚀 move `pic` directory into `doc`
|
@ -94,7 +94,7 @@ if(os.platform()=="windows")
|
|||
## __教程__
|
||||
|
||||
Nasal是非常容易上手的,你甚至可以在15分钟之内看完这里的基本教程并且直接开始编写你想要的程序。
|
||||
__如果你先前已经是C/C++,javascript选手,那么这个教程几乎可以不用看了……__ 在看完该教程之后,基本上你就完全掌握了这个语言:
|
||||
__如果你先前已经是C/C++, javascript选手,那么几乎可以不用看这个教程……__ 在看完该教程之后,基本上你就完全掌握了这个语言:
|
||||
|
||||
<details><summary>基本类型</summary>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# __Benchmark__
|
||||
|
||||

|
||||

|
||||
|
||||
## version 6.5 (i5-8250U windows10 2021/6/19)
|
||||
|
||||
|
@ -109,4 +109,4 @@ And we use this bf interpreter to draw a mandelbrot set.
|
|||
|
||||
In 2022/2/17 update we added `\e` into the lexer. And the `bfcolored.nas` uses this special ASCII code. Here is the result:
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
</p>
|
||||
</text>
|
||||
<h2> Benchmark | 执行效率</h2>
|
||||
<img src="/pic/benchmark.png" width="450" height="350"></img>
|
||||
<img src="/pic/mandelbrot.png" width="450" height="350"><br /></img>
|
||||
<img src="/doc/pic/benchmark.png" width="450" height="350"></img>
|
||||
<img src="/doc/pic/mandelbrot.png" width="450" height="350"><br /></img>
|
||||
<text>
|
||||
<p>
|
||||
Benchmark of different versions of nasal interpreter(left).
|
||||
|
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
@ -7,7 +7,7 @@
|
|||
#include <stack>
|
||||
#include <unordered_map>
|
||||
|
||||
enum op_code:u8
|
||||
enum op_code_type:u8
|
||||
{
|
||||
op_exit, // stop the virtual machine
|
||||
op_intg, // global scope size
|
||||
|
@ -487,7 +487,7 @@ void nasal_codegen::call_id(const nasal_ast& ast)
|
|||
{
|
||||
gen(op_callb,i,ast.line());
|
||||
if(local.empty())
|
||||
die("should warp native functions in local scope",ast.line(),ast.col());
|
||||
die("should warp native function in local scope",ast.line(),ast.col());
|
||||
return;
|
||||
}
|
||||
i32 index;
|
||||
|
|
|
@ -308,10 +308,10 @@ while(1){
|
|||
break;
|
||||
}
|
||||
elsif(path=="/favicon.ico")
|
||||
http.send(client,respond.ok(io.fin("./pic/favicon.ico")));
|
||||
http.send(client,respond.ok(io.fin("./doc/pic/favicon.ico")));
|
||||
elsif(path=="/license")
|
||||
http.send(client,respond.ok(io.fin("./LICENSE")));
|
||||
elsif(path=="/pic/nasal.png" or path=="/pic/benchmark.png" or path=="/pic/mandelbrot.png")
|
||||
elsif(path=="/doc/pic/nasal.png" or path=="/doc/pic/benchmark.png" or path=="/doc/pic/mandelbrot.png")
|
||||
http.send(client,respond.ok(io.fin("."~path)));
|
||||
else{
|
||||
var filename=substr(path,1,size(path)-1);
|
||||
|
|