1249 Commits

Author SHA1 Message Date
Paul R. Tagliamonte
0eb4029d74 Merge branch 'jd/clean-hystring' of git://github.com/jd/hy 2013-04-06 19:17:28 -04:00
Julien Danjou
801c4e0099 Remove useless code
This seems to have no purpose to me.

Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-06 23:40:21 +02:00
Julien Danjou
8b144a4f3d Make HySymbol bytes free!
We can know use any amount and type of bytes to build a HyString, meaning we
can use Unicode and UTF-8 for our function and variables.

Eat that, snake!

Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-06 23:37:34 +02:00
Paul R. Tagliamonte
914011175f Style fixes 2013-04-06 13:15:32 -04:00
Julien Danjou
0eb795b4a5 Check the number of arguments for each function
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-06 19:00:32 +02:00
Paul R. Tagliamonte
4b57fd0a51 Adding in an If mangle 2013-04-06 11:10:33 -04:00
Paul R. Tagliamonte
a625493a3f Style fix 2013-04-06 08:18:45 -04:00
Paul R. Tagliamonte
6aebc5820f Merge branch 'jd/if' of git://github.com/jd/hy 2013-04-06 08:18:13 -04:00
Paul R. Tagliamonte
c612582e7b cosmetic style fix 2013-04-06 08:17:04 -04:00
Julien Danjou
3e9a2178c5 Add support for unary operators (not, ~)
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-06 10:38:41 +02:00
Julien Danjou
b36018981a if: emit error on too many args
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-06 10:13:14 +02:00
Paul R. Tagliamonte
7abc472336 Implementing `let' 2013-04-05 21:54:04 -04:00
Paul R. Tagliamonte
d48c2b7cae Calling this 0.9.4 2013-04-05 20:47:25 -04:00
Paul R. Tagliamonte
d762625aeb also ignore setf / setv 2013-04-05 20:00:19 -04:00
Paul R. Tagliamonte
65ad7a3b87 Adding FunctionDef as a returnable 2013-04-05 19:46:27 -04:00
Paul R. Tagliamonte
1d01d8874a Bugfix for #50. I'm slowly starting to take a shine to this. 2013-04-05 19:29:31 -04:00
Paul R. Tagliamonte
7da1129298 Merge branch 'master' into bugfix/branch-mangler 2013-04-04 21:52:45 -04:00
Paul R. Tagliamonte
9578ae7a57 This fix is in living memory of paroneayea 2013-04-04 21:52:15 -04:00
Paul R. Tagliamonte
7c9fa3758c Print is for loosers. 2013-04-04 21:50:01 -04:00
Paul R. Tagliamonte
4e2e18576a Fixing a subtle bug. 2013-04-04 21:49:04 -04:00
Paul R. Tagliamonte
256506ede0 Sketch for #50 - branch mangler
This is only slightly better. The insert point needs to walk
    with the for loop.
2013-04-04 21:47:00 -04:00
Paul R. Tagliamonte
b2406a9d72 list flattener 2013-04-04 19:32:56 -04:00
Nicolas Dandrimont
940afcafa9 Allow (do) inside (defn)
Closes #59
2013-04-04 11:07:38 +02:00
Paul R. Tagliamonte
d421d869af Fixing the "olasd" bug 2013-04-03 20:18:56 -04:00
Nicolas Dandrimont
d070d3d484 Add while loops to the compiler 2013-04-03 19:55:09 +02:00
James King
dceaad716a [WIP] Added lambda list keyword parsing step
This allows us to translate lisp argument lists to Python ones.

(defun foo (x y &rest z &optional {foo 3} &aux kwargs))

translates roughly to:

def foo(x, y, *z, foo=3, **kwargs):
  pass
2013-04-03 11:39:31 -04:00
James King
c200b4e3d1 Added HyLambdaListKeyword tokens to the lexer
The name "lambda list keyword" is a historical artifact from the CLHS
and not optimal (http://clhs.lisp.se/Body/26_glo_l.htm).

The name may change at some point.
2013-04-03 10:19:18 -04:00
Paul Tagliamonte
0eeb5321e1 Merge branch 'jd/if-parsing' of git://github.com/jd/hy 2013-04-03 09:00:53 -04:00
Julien Danjou
1c8d21e3de Raises TypeError on bad if statements
This relates to issue #6.

Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-03 11:25:17 +02:00
Paul R. Tagliamonte
9c3142f752 tigten that code up a skitch 2013-04-02 21:00:50 -04:00
Paul R. Tagliamonte
26f38367e9 cleaning the last bit up 2013-04-02 20:47:24 -04:00
Paul R. Tagliamonte
c8d3a1859e Reflowing the list-comp bits. 2013-04-02 20:47:24 -04:00
Paul Tagliamonte
12106d3d37 idle cleanup 2013-04-02 14:50:16 -04:00
James King
aa3a4e54cd Minor py3.3 fixes 2013-04-02 14:38:21 -04:00
Paul R. Tagliamonte
b1c605cc6a Updating the tests to not break Python 3.x 2013-04-01 23:06:59 -04:00
Paul R. Tagliamonte
fb6ec426e6 Adding in list comprehensions.
Thanks to paroneayea for the syntax brotip.
2013-04-01 22:47:11 -04:00
Paul R. Tagliamonte
c4b270a727 test coverage bits 2013-04-01 22:07:05 -04:00
Paul R. Tagliamonte
bb14b7a7f6 Add progn in :) 2013-04-01 21:08:32 -04:00
Paul Tagliamonte
6831841699 Adding in some tests for print 2013-04-01 19:51:21 -04:00
Christopher Allan Webber
b4ba4087df Minor stylistic change to compiler.py 2013-04-01 18:41:55 -05:00
Christopher Allan Webber
f8be07b643 Defun is now an alias for defn 2013-04-01 16:36:56 -05:00
Christopher Allan Webber
73695881a9 Provide setf and setv as options for setting variables. 2013-04-01 16:32:48 -05:00
Christopher Allan Webber
9416422330 Changing cond to be more common lisp / emacs lisp like
Instead of:
  (cond (condition-1) (body-1)
        (condition-2) (body-2))

We now work like:

  (cond ((condition-1) (body-1)
         (condition-2) (body-2)))
2013-04-01 10:33:45 -05:00
Paul R. Tagliamonte
82c4ac1b8f Moving to 0.9.3 2013-03-29 20:38:02 -04:00
Paul R. Tagliamonte
684c0e928b License bits. 2013-03-28 22:42:53 -04:00
Paul R. Tagliamonte
c447a5dc7e style cleanup 2013-03-28 22:33:32 -04:00
Paul R. Tagliamonte
32574e140e adding space 2013-03-28 22:32:24 -04:00
Paul R. Tagliamonte
de7a450d92 Adding in a completer. 2013-03-28 21:42:40 -04:00
Paul R. Tagliamonte
1f1676c354 Adding in meth 2013-03-27 22:19:27 -04:00
Paul R. Tagliamonte
7eed26f0c3 Adding in tuples. Close #30. Ugly as hell. 2013-03-27 20:09:11 -04:00