📝 update test files

This commit is contained in:
ValKmjolnir 2022-05-17 18:22:24 +08:00
parent 712a047a43
commit f8692f1e4e
29 changed files with 4 additions and 46 deletions

View File

@ -448,11 +448,11 @@ var NM2M=1852;
var R2D=180/math.pi; var R2D=180/math.pi;
# functions that not supported in this runtime: # functions that not supported in this runtime:
var bind=func(function,locals,outer_scope={}){ var bind=func(function,locals,outer_scope=nil){
die("this runtime does not support bind"); die("this runtime does not support bind");
} }
var call=func(function,args=[],_me=nil,locals={},error=[]){ var call=func(function,args=nil,_me=nil,locals=nil,error=nil){
die("this runtime does not support call"); die("this runtime does not support call");
} }

View File

@ -448,11 +448,11 @@ var NM2M=1852;
var R2D=180/math.pi; var R2D=180/math.pi;
# functions that not supported in this runtime: # functions that not supported in this runtime:
var bind=func(function,locals,outer_scope={}){ var bind=func(function,locals,outer_scope=nil){
die("this runtime does not support bind"); die("this runtime does not support bind");
} }
var call=func(function,args=[],_me=nil,locals={},error=[]){ var call=func(function,args=nil,_me=nil,locals=nil,error=nil){
die("this runtime does not support call"); die("this runtime does not support call");
} }

View File

@ -1,4 +1,3 @@
import("lib.nas");
var char_ttf=[ var char_ttf=[
[" "," "," "," "," "," "], [" "," "," "," "," "," "],
[" ████╗"," ██╔██║"," ██╔╝██║"," ███████║","██╔═══██║","╚═╝ ╚═╝"], [" ████╗"," ██╔██║"," ██╔╝██║"," ███████║","██╔═══██║","╚═╝ ╚═╝"],

View File

@ -1,5 +1,4 @@
# Road check and auto pilot by ValKmjolnir # Road check and auto pilot by ValKmjolnir
import("lib.nas");
import("test/props_sim.nas"); import("test/props_sim.nas");
var dt=0.01; var dt=0.01;
var intergral=0; var intergral=0;

View File

@ -1,5 +1,3 @@
import("lib.nas");
var mandelbrot= var mandelbrot=
"[A mandelbrot set fractal viewer in brainf*** written by Erik Bosman] "[A mandelbrot set fractal viewer in brainf*** written by Erik Bosman]
+++++++++++++[->++>>>+++++>++>+<<<<<<]>>>>>++++++>--->>>>>>>>>>+++++++++++++++[[ +++++++++++++[->++>>>+++++>++>+<<<<<<]>>>>>++++++>--->>>>>>>>>>+++++++++++++++[[

View File

@ -1,5 +1,3 @@
import("lib.nas");
var mandelbrot= var mandelbrot=
"[A mandelbrot set fractal viewer in brainf*** written by Erik Bosman] "[A mandelbrot set fractal viewer in brainf*** written by Erik Bosman]
+++++++++++++[->++>>>+++++>++>+<<<<<<]>>>>>++++++>--->>>>>>>>>>+++++++++++++++[[ +++++++++++++[->++>>>+++++>++>+<<<<<<]>>>>>++++++>--->>>>>>>>>>+++++++++++++++[[

View File

@ -1,8 +1,6 @@
import("stl/lib.nas");
import("stl/queue.nas"); import("stl/queue.nas");
rand(time(0)); rand(time(0));
var pixel=[' ','#','.','*']; var pixel=[' ','#','.','*'];
var map=[]; var map=[];
for(var i=0;i<10;i+=1) for(var i=0;i<10;i+=1)

View File

@ -1,5 +1,3 @@
import("lib.nas");
rand(time(0)); rand(time(0));
var new_neuron=func() var new_neuron=func()

View File

@ -1,4 +1,3 @@
import("lib.nas");
var source=[ var source=[
"main.cpp ", "main.cpp ",
"nasal_err.h ", "nasal_err.h ",

View File

@ -1,4 +1,3 @@
import("lib.nas");
var condition_true=1; var condition_true=1;
var condition_false=0; var condition_false=0;
if(condition_true) if(condition_true)

View File

@ -1,5 +1,3 @@
import("lib.nas");
var student=func(n,a){ var student=func(n,a){
return { return {
print_info:func println(n,' ',a), print_info:func println(n,' ',a),

View File

@ -1,5 +1,3 @@
import("lib.nas");
var ResultTrait={ var ResultTrait={
Ok:func(val){ Ok:func(val){
me.ok=val; me.ok=val;

View File

@ -1,4 +1,3 @@
import("lib.nas");
var fib=func(x) var fib=func(x)
{ {
if(x<2) return x; if(x<2) return x;

View File

@ -1,5 +1,3 @@
import("lib.nas");
var fd=io.open("test/filesystem.nas"); var fd=io.open("test/filesystem.nas");
while((var line=io.readln(fd))!=nil) while((var line=io.readln(fd))!=nil)
println(line); println(line);

View File

@ -1,8 +1,6 @@
# hexdump.nas by ValKmjolnir # hexdump.nas by ValKmjolnir
# 2021/8/13 # 2021/8/13
import("lib.nas");
# init # init
var hex_num=[ var hex_num=[
'0','1','2','3', '0','1','2','3',

View File

@ -1,6 +1,4 @@
#lib json.nas #lib json.nas
import("lib.nas");
var JSON=func(){ var JSON=func(){
var ( var (

View File

@ -1,4 +1,3 @@
import("lib.nas");
# union set # union set
var n=4; var n=4;
var input=[[0,1],[0,2],[1,2]]; var input=[[0,1],[0,2],[1,2]];

View File

@ -1,5 +1,3 @@
import("lib.nas");
var lexer=func(file) var lexer=func(file)
{ {
var (ptr,token)=(0,[]); var (ptr,token)=(0,[]);

View File

@ -1,5 +1,3 @@
import("lib.nas");
var map=nil; var map=nil;
var check=func(x,y) var check=func(x,y)

View File

@ -1,4 +1,3 @@
import("lib.nas");
for(;;)break; for(;;)break;
for(;;) for(;;)
{ {

View File

@ -1,5 +1,4 @@
#automatically generated by bfconvertor.nas #automatically generated by bfconvertor.nas
import('lib.nas');
var ptr=0; var ptr=0;
var paper=[]; var paper=[];
setsize(paper,131072); setsize(paper,131072);

View File

@ -1,4 +1,3 @@
import("lib.nas");
var (yMin,yMax,xMin,xMax,line)=(-0.2,0.2,-1.5,-1.0,""); var (yMin,yMax,xMin,xMax,line)=(-0.2,0.2,-1.5,-1.0,"");
var (yDel,xDel)=(yMax-yMin,xMax-xMin); var (yDel,xDel)=(yMax-yMin,xMax-xMin);
for(var yPixel=0;yPixel<24;yPixel+=1) for(var yPixel=0;yPixel<24;yPixel+=1)

View File

@ -1,5 +1,3 @@
import("lib.nas");
var check=func(x){ var check=func(x){
if(x<0x100000000) if(x<0x100000000)
return x; return x;

View File

@ -1,4 +1,3 @@
import("lib.nas");
import("./module/libfib.nas"); import("./module/libfib.nas");
println(libfib); println(libfib);

View File

@ -1,6 +1,5 @@
# This is written for Nasal Intepreter # This is written for Nasal Intepreter
# Sidi Liang # Sidi Liang
import("lib.nas");
var w = 1; var w = 1;
var x = "hello"; var x = "hello";
var f = func(){ var f = func(){

View File

@ -1,5 +1,3 @@
import("lib.nas");
var is_prime=func(x){ var is_prime=func(x){
for(var i=2;i<x;i+=1) for(var i=2;i<x;i+=1)
if(x/i==int(x/i)) if(x/i==int(x/i))

View File

@ -1,5 +1,3 @@
import("lib.nas");
var geodinfo=func(lat,lon){ var geodinfo=func(lat,lon){
return {}; return {};
} }

View File

@ -1,4 +1,3 @@
import("lib.nas");
import("./module/libkey.nas"); import("./module/libkey.nas");
var list=func(){ var list=func(){
var (begin,end,len)=(nil,nil,0); var (begin,end,len)=(nil,nil,0);

View File

@ -1,6 +1,4 @@
import("lib.nas");
import("./module/libkey.nas"); import("./module/libkey.nas");
var color=[ var color=[
"\e[31m","\e[32m","\e[33m","\e[34m","\e[35m","\e[36m", "\e[31m","\e[32m","\e[33m","\e[34m","\e[35m","\e[36m",
"\e[91m","\e[92m","\e[93m","\e[94m","\e[95m","\e[96m", "\e[91m","\e[92m","\e[93m","\e[94m","\e[95m","\e[96m",