Add 'again' macro for recursive expansion
The 'again' macro is a new addition to the macro system, allowing for recursive macro expansion. This commit introduces the necessary AST nodes, macro expansion logic, and an integration test to ensure its functionality. The `soa_series.myc` example has also been updated to demonstrate its usage.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
(do
|
||||
(repeat n 10 (print n)
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
;; Output: 26.7
|
||||
;; Output: 228
|
||||
;; Benchmark: 1.4us
|
||||
;; Benchmark-Repeat: 1406
|
||||
(do
|
||||
@@ -8,6 +8,8 @@
|
||||
(push my_ticks {:price 11.2 :volume 200 :msg "B"})
|
||||
(push my_ticks {:price 15.5 :volume 300 :msg "C"})
|
||||
|
||||
(repeat n 100 (push my_ticks {:price (+ n 15.5) :volume (ceil (/ n 300)) :msg "??"})
|
||||
)
|
||||
|
||||
(def prices (.price my_ticks))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user