From 3736571ad0758211abb988cfa1c3152dbc37f07c Mon Sep 17 00:00:00 2001 From: Jon Rafkind Date: Thu, 14 Jul 2011 16:53:00 -0600 Subject: [PATCH] fix sequences --- collects/honu/core/main.rkt | 3 +++ collects/honu/core/private/parse2.rkt | 7 +++++++ collects/tests/honu/test.honu | 4 ++-- collects/tests/honu/test.rkt | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/collects/honu/core/main.rkt b/collects/honu/core/main.rkt index 76b4343d05..9cd31bc045 100644 --- a/collects/honu/core/main.rkt +++ b/collects/honu/core/main.rkt @@ -9,6 +9,9 @@ print (rename-out [#%dynamic-honu-module-begin #%module-begin] [honu-function function] + [honu-var var] + [literal:honu-= =] + [literal:semicolon |;|] [literal:#%braces #%braces] [literal:#%parens #%parens]) ) diff --git a/collects/honu/core/private/parse2.rkt b/collects/honu/core/private/parse2.rkt index 83e51b7785..9f705e752d 100644 --- a/collects/honu/core/private/parse2.rkt +++ b/collects/honu/core/private/parse2.rkt @@ -135,6 +135,13 @@ (lambda (x) x) (left current)))] [(semicolon? #'head) + (do-parse #'(rest ...) 0 + (lambda (stuff) + (with-syntax ([stuff stuff] + [current (left current)]) + #'(begin current stuff))) + #'(void)) + #; (with-syntax ([so-far (left current)]) #'(splicing-let-syntax ([more (lambda (stx) (parse #'(rest ...)))]) diff --git a/collects/tests/honu/test.honu b/collects/tests/honu/test.honu index dd56efea87..38a640901e 100644 --- a/collects/tests/honu/test.honu +++ b/collects/tests/honu/test.honu @@ -16,13 +16,13 @@ function test(t, a, b){ */ function test1(){ - print(5) -/* var x = 3; +/* const y = 2; test("x = 3", x, 3); test("y = 2", y, 2); */ + print(x) } test1() diff --git a/collects/tests/honu/test.rkt b/collects/tests/honu/test.rkt index 09c7d09215..3dc83ee0b8 100644 --- a/collects/tests/honu/test.rkt +++ b/collects/tests/honu/test.rkt @@ -47,6 +47,7 @@ (let () (fake-module-begin #hx(honu_function test(x){ + print(x); print(x) } test(2))))