Julien Danjou
2ff3da032c
Merge pull request #81 from paultag/paultag/bugfix/with-syntax-fix
...
Fixing (with)'s syntax to be more hyish.
2013-04-07 15:41:53 -07:00
Paul R. Tagliamonte
e22a0ff73c
Mangle a macro until it stops moving
...
this helps if we use a macro in something that got tree-mangled
back out.
2013-04-07 18:41:41 -04:00
Julien Danjou
0d3500f6e5
try: accept a simpler form
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-08 00:36:08 +02:00
Paul R. Tagliamonte
4db9446197
Fixing (with)'s syntax to be more hyish.
2013-04-07 18:35:36 -04:00
Julien Danjou
48ae1b1e26
Merge pull request #80 from olasd/bugfix/unbalanced-expressions
...
Correctly handle unbalanced expressions
2013-04-07 15:27:45 -07:00
Nicolas Dandrimont
806f0d900c
Throw an error on unbalanced expressions
2013-04-08 00:25:47 +02:00
Paul R. Tagliamonte
47ec1d264c
style fixes
2013-04-07 18:16:45 -04:00
Paul R. Tagliamonte
3f84da8771
Merge branch 'f/and-and-or' of git://github.com/algernon/hy into pr-79
2013-04-07 18:15:54 -04:00
Julien Danjou
a73d460beb
try: allow empty body
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-08 00:14:42 +02:00
Gergely Nagy
1b7d145c65
Implement the (or) function too
...
The (or) function is to be constructed similarly to (and), so refactor
the compile_and_operator function to handle or aswell.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2013-04-08 00:02:08 +02:00
Gergely Nagy
f03b538787
Implement the (and) function
...
The function takes at least two arguments, and turns it into a pythonic
and statement, which returns the last True-ish value, or False.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2013-04-07 23:54:56 +02:00
Julien Danjou
f5dc569de4
compiler: remove old TODO entry
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-07 23:14:42 +02:00
Paul R. Tagliamonte
bfc71e4a60
Add tail threading (->>)
2013-04-07 15:05:30 -04:00
Julien Danjou
bdd07e1251
Alias except' to
catch' and raise' to
throw'
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-07 18:24:01 +02:00
Julien Danjou
6dec894a0c
Better catch syntax
...
The syntax is now changed to:
(catch [] BODY)
(catch [Exception] BODY)
(catch [e Exception] BODY)
(catch [e [Exception1 Exception2]] BODY)
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-07 18:03:43 +02:00
Paul R. Tagliamonte
3c735d18bd
Revert "Revert "Remove useless code""
...
This reverts commit 262da59c7790cdadd60ea9612bc9e3c1616863fd.
Conflicts:
hy/models/string.py
2013-04-07 10:06:44 -04:00
Paul R. Tagliamonte
c657def253
namespaceing to __hy in case anyone tries this 4real
2013-04-06 23:31:26 -04:00
Paul R. Tagliamonte
03dfbde1b8
style voodoo
2013-04-06 23:11:43 -04:00
Paul R. Tagliamonte
0429cbea12
Using punycode where we can.
2013-04-06 22:49:48 -04:00
Paul R. Tagliamonte
5a96089266
Using backslashes for now; punycode soon.
2013-04-06 21:33:52 -04:00
Paul R. Tagliamonte
e0ed7cac40
Revert "Make HySymbol bytes free!"
...
This reverts commit 8b144a4f3dd815abbc29b2bdb18eb619ecd25ec7.
2013-04-06 20:02:08 -04:00
Paul R. Tagliamonte
262da59c77
Revert "Remove useless code"
...
This reverts commit 801c4e0099035bc44a70375b02017e935461daef.
2013-04-06 20:01:55 -04:00
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