Commit Graph

1239 Commits

Author SHA1 Message Date
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
7fed29dad8 Forgot to add @jd to AUTHORS. Thanks! 2013-04-03 09:22:37 -04:00
Paul Tagliamonte
f1ed021219 Merge branch 'jd/print-compile-error-in-repl' of git://github.com/jd/hy 2013-04-03 09:01:57 -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
bcdf31e287 Do not quit hy if compile error occurs
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-03 11:44:28 +02: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 Tagliamonte
41f0a69862 Add in a Python 3 hello world 2013-04-02 21:33:08 -04:00
Paul R. Tagliamonte
9c3142f752 tigten that code up a skitch 2013-04-02 21:00:50 -04:00
Paul R. Tagliamonte
4e7362848a adding in a bit about the double rainbow 2013-04-02 20:56:10 -04:00
Paul R. Tagliamonte
d316a8fde8 covering the new bits 2013-04-02 20:49:42 -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
Christopher Allan Webber
a878a7f7d5 List comprehensions example 2013-04-02 19:12:33 -05:00
Christopher Allan Webber
65b162cda2 Hy is lisp-stick on a python! 2013-04-02 18:55:59 -05: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 Tagliamonte
3826a05612 removing list-comps from the TODO 2013-04-02 09:00:51 -04:00
Paul Tagliamonte
6e3ec0b669 Adding a bit about comrehensions to the changelog
.. entry from last night.
2013-04-02 08:59:52 -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
a79df88f37 noting more changes 2013-04-01 22:15:38 -04:00
Paul R. Tagliamonte
b077af9620 more tests 2013-04-01 22:13:45 -04:00
Paul R. Tagliamonte
c4b270a727 test coverage bits 2013-04-01 22:07:05 -04:00
Paul R. Tagliamonte
397db464a5 Add a bit about the threading macro 2013-04-01 21:20:44 -04:00
Paul R. Tagliamonte
e8d7a01752 Bwaha, paroneayea typo 2013-04-01 21:09:30 -04:00
Paul R. Tagliamonte
bb14b7a7f6 Add progn in :) 2013-04-01 21:08:32 -04:00
Paul R. Tagliamonte
f60daaa40d Really square braces! 2013-04-01 21:08:19 -04:00
Paul Tagliamonte
73316d89e7 Adding in some bits to the changelog 2013-04-01 20:03:06 -04:00
Paul Tagliamonte
025e501b13 cleaning up the tests a bit 2013-04-01 20:00:37 -04:00
Paul Tagliamonte
678ef441e5 Adding in tuple checkingish. 2013-04-01 19:53:04 -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
Paul Tagliamonte
426c7cd829 Test bad decoration 2013-04-01 19:38:58 -04:00
Christopher Allan Webber
c098db9b51 We should call simple-conversation after defining it, just like we did in python! 2013-04-01 17:59:26 -05:00
Christopher Allan Webber
731f1afd57 One more conversion of (def) -> (setv)... ho ho ho!
This time in the flask app!
2013-04-01 16:52:57 -05:00
Christopher Allan Webber
1b60bee8a3 Change all instances of (def foo bar) to (setv foo bar)!
I'm in ur base polluting your language with all my opinions!
2013-04-01 16:51:28 -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
0c4ae39bc0 Even more lisp sections marked as lispy highlighted code blocks 2013-04-01 15:06:19 -05:00
Will Kahn-Greene
ccb75e62aa Merge pull request #48 from willkg/docs-fixes
Syntax highlight blocks as cl
2013-04-01 09:56:09 -07:00
Will Kahn-Greene
e7cae36ff0 Syntax highlight blocks as clj
* hy is close enough to clojure , we can (ab)use that for syntax
  highlighting code blocks
* fix "sphynx" spelling in requirements file
2013-04-01 12:55:16 -04:00
Christopher Allan Webber
6deb8e303c Adding Will to the AUTHORS 2013-04-01 11:21:00 -05:00
Christopher Allan Webber
df6ef654d7 Switch over to a more lisp'y syntax for the "for" statment docs 2013-04-01 11:01:36 -05:00
Christopher Allan Webber
93583b56a4 TODO: explain more about hy's for 2013-04-01 10:59:13 -05:00
Christopher Allan Webber
d10d9e79f9 Move the comment section, explain for loops 2013-04-01 10:58:13 -05:00
Christopher Allan Webber
5296e6ab55 Explain how to wrap multiple statments of execution in "do" 2013-04-01 10:49:04 -05:00
Christopher Allan Webber
edf33a08b4 Updating documentation for the new cond order 2013-04-01 10:34:36 -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
Christopher Allan Webber
a0acbd7948 Clarifying that we won't be executing the comment, but will exec the code! 2013-04-01 10:12:15 -05:00