parse fn forward declarations

This commit is contained in:
Scott Richmond 2024-06-04 11:17:25 -04:00
parent 3903f10c8d
commit d0a6cdbf54

View File

@ -786,7 +786,7 @@
(def data (case (-> parser current type)
:lbrace (fn-clauses parser)
:lparen (fn-simple parser)
(panic parser (string "expected clause or clauses, got " (-> current parser type)))))
:nothing))
@{:type :fn :name name :data data :token origin})
([err] err)))
@ -1130,7 +1130,9 @@
(do
# (comment
(def source `
print! ("hello")
fn foo
fn bar
fn () -> :baz
`)
(def scanned (s/scan source))
(print "\n***NEW PARSE***\n")