From cff9f91beeb8105dba48cd97f4584b5669356a0f Mon Sep 17 00:00:00 2001
From: ValKmjolnir
Date: Mon, 19 Sep 2022 00:10:08 +0800
Subject: [PATCH] :rocket: move `pic` directory into `doc`
---
doc/README_zh.md | 2 +-
doc/benchmark.md | 4 ++--
doc/nasal-http-test-web.html | 4 ++--
{pic => doc/pic}/benchmark.png | Bin
{pic => doc/pic}/favicon.ico | Bin
{pic => doc/pic}/mandelbrot.png | Bin
{pic => doc/pic}/nasal.png | Bin
nasal_codegen.h | 4 ++--
test/httptest.nas | 4 ++--
9 files changed, 9 insertions(+), 9 deletions(-)
rename {pic => doc/pic}/benchmark.png (100%)
rename {pic => doc/pic}/favicon.ico (100%)
rename {pic => doc/pic}/mandelbrot.png (100%)
rename {pic => doc/pic}/nasal.png (100%)
diff --git a/doc/README_zh.md b/doc/README_zh.md
index cc3b6ff..aadf3d0 100644
--- a/doc/README_zh.md
+++ b/doc/README_zh.md
@@ -94,7 +94,7 @@ if(os.platform()=="windows")
## __教程__
Nasal是非常容易上手的,你甚至可以在15分钟之内看完这里的基本教程并且直接开始编写你想要的程序。
-__如果你先前已经是C/C++,javascript选手,那么这个教程几乎可以不用看了……__ 在看完该教程之后,基本上你就完全掌握了这个语言:
+__如果你先前已经是C/C++, javascript选手,那么几乎可以不用看这个教程……__ 在看完该教程之后,基本上你就完全掌握了这个语言:
基本类型
diff --git a/doc/benchmark.md b/doc/benchmark.md
index 59580e4..da0f094 100644
--- a/doc/benchmark.md
+++ b/doc/benchmark.md
@@ -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:
-
+
diff --git a/doc/nasal-http-test-web.html b/doc/nasal-http-test-web.html
index 7b4d582..7532e25 100644
--- a/doc/nasal-http-test-web.html
+++ b/doc/nasal-http-test-web.html
@@ -60,8 +60,8 @@
Benchmark | 执行效率
-
- 
+
+ 
Benchmark of different versions of nasal interpreter(left).
diff --git a/pic/benchmark.png b/doc/pic/benchmark.png
similarity index 100%
rename from pic/benchmark.png
rename to doc/pic/benchmark.png
diff --git a/pic/favicon.ico b/doc/pic/favicon.ico
similarity index 100%
rename from pic/favicon.ico
rename to doc/pic/favicon.ico
diff --git a/pic/mandelbrot.png b/doc/pic/mandelbrot.png
similarity index 100%
rename from pic/mandelbrot.png
rename to doc/pic/mandelbrot.png
diff --git a/pic/nasal.png b/doc/pic/nasal.png
similarity index 100%
rename from pic/nasal.png
rename to doc/pic/nasal.png
diff --git a/nasal_codegen.h b/nasal_codegen.h
index c98964a..f3f627d 100644
--- a/nasal_codegen.h
+++ b/nasal_codegen.h
@@ -7,7 +7,7 @@
#include
#include
-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;
diff --git a/test/httptest.nas b/test/httptest.nas
index 3d56fdd..97fd283 100644
--- a/test/httptest.nas
+++ b/test/httptest.nas
@@ -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);