X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=clnl;a=blobdiff_plain;f=src%2Fmain%2Fcode-parse.lisp;h=644ef13278f3ea145cdfdeb40ef959dc69c0f3bb;hp=7cdf2b5b1864ff53ea9483a18464e2b906cc56c4;hb=c9cf0d1;hpb=b81522f0ac2ff7785ae543119cb947ed0870571c diff --git a/src/main/code-parse.lisp b/src/main/code-parse.lisp index 7cdf2b5..644ef13 100644 --- a/src/main/code-parse.lisp +++ b/src/main/code-parse.lisp @@ -32,9 +32,19 @@ DESCRIPTION: in the CLNL-CODE-PARSER package to tease out necessary information. Some of those things will involve code blocks that can then be transpiled." (let - ((*dynamic-prims* (mapcar #'global->prim external-globals))) + ((*dynamic-prims* + (append + (mapcar #'global->prim external-globals) + (procedures->prims lexed-ast)))) (parse-internal lexed-ast))) +(defun procedures->prims (lexed-ast) + (cond + ((not lexed-ast) nil) + ; We'll need argument handling here sometime :) + ((eql :to (car lexed-ast)) (cons (list :name (cadr lexed-ast)) (procedures-to-prims (cdr lexed-ast)))) + (t (procedures-to-prims (cdr lexed-ast))))) + (defun parse-internal (lexed-ast) (cond ((not lexed-ast) nil)