This commit is contained in:
Valk Richard Li 2020-09-12 00:03:35 -07:00 committed by GitHub
parent 5e18b2dcfc
commit 5e99660d09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -5,6 +5,13 @@
# before running this file will be translated to abstract syntax tree
# and this ast will be linked before main ast as main-ast's beginning
# print
var print=func(elements...)
{
nasal_call_builtin_std_cout(elements);
return nil;
};
# append
# The first argument specifies a vector.
# Appends the remaining arguments to the end of the vector.
@ -19,9 +26,9 @@ var append=func(vector,elements...)
# The first argument specifies a vector, the second a number representing the desired size of that vector.
# If the vector is currently larger than the specified size,it is truncated.
# If it is smaller, it is padded with nil entries.Returns the vector operated upon.
var setsize=func(vector,__size)
var setsize=func(vector,size)
{
nasal_call_builtin_set_size(vector,__size);
nasal_call_builtin_set_size(vector,size);
return nil;
}

View File

@ -65,10 +65,4 @@ var io=
{
return nasal_call_builtin_builtin_stat(filename);
},
};
var print=func(dyn...)
{
nasal_call_builtin_std_cout(dyn);
return nil;
};