much stdlib docs

This commit is contained in:
Aidan 2020-07-19 14:37:20 -07:00
parent b941df68e1
commit ee39de01fd
No known key found for this signature in database
GPG key ID: 327711E983899316
9 changed files with 228 additions and 74 deletions

View file

@ -22,7 +22,15 @@ import (
"gitlab.com/whom/shs/log"
)
func export(input *ast.Token, vars ast.VarTable, funcs ast.FuncTable) *ast.Token {
/* Takes 2 args, a name and a value
* Exports a varable
* both args are evaluated
*
* Example:
* (export hw (concat "hello" " " "world"))
* (print hw)
*/
func Export(input *ast.Token, vars ast.VarTable, funcs ast.FuncTable) *ast.Token {
name := input
form := name.Next.Eval(funcs, vars, false)