Commit Graph

647 Commits

Author SHA1 Message Date
Paul R. Tagliamonte
d3a019b3dd Don't quote things in (quote) - Closes #129 2013-04-17 23:20:56 -04:00
Paul R. Tagliamonte
3f362bc318 Merge branch 'unary_minus' of github.com:khinsen/hy 2013-04-16 23:07:32 -04:00
Konrad Hinsen
270a619cf7 Simplify the decorator hy.compiler.builds
Not so much for the efficiency gain, but to save keystrokes in the
debugger when looking at methods with lots of builds decorators.
2013-04-16 17:53:02 +02:00
Konrad Hinsen
41a9ce28f0 Implement unary minus 2013-04-16 17:43:40 +02:00
Paul R. Tagliamonte
1bcce13e1d Merge branch 'master' of github.com:paultag/hy 2013-04-15 23:00:18 -04:00
Paul R. Tagliamonte
4888589f59 Callin' this 0.9.6 2013-04-15 22:36:50 -04:00
Julien Danjou
475c2b6b63 Use HyTypeError to raise else' errors in foreach'
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-15 11:47:11 -07:00
Paul Tagliamonte
1295369ed8 Adding in the mant thinger. 2013-04-15 08:37:25 -04:00
Paul R. Tagliamonte
d50551ca71 fixing the bits 2013-04-14 22:19:33 -04:00
Paul R. Tagliamonte
09d20cf904 Adding in some new items 2013-04-14 22:17:15 -04:00
Paul R. Tagliamonte
9d913e92af removing the pass 2013-04-14 21:58:44 -04:00
Paul R. Tagliamonte
7b4d4fb371 Merge branch 'jd/finally' of git://github.com/jd/hy into pr-94 2013-04-14 21:57:11 -04:00
Paul R. Tagliamonte
da33f41753 some style fixes for @algernon 2013-04-14 21:54:15 -04:00
Paul R. Tagliamonte
a5a54fc7eb Merge branch 'f/smart-import' of git://github.com/algernon/hy into pr-113 2013-04-14 21:32:22 -04:00
Paul R. Tagliamonte
3b3768853a Merge branch 'jd/remove-pass' of git://github.com/jd/hy into pr-122 2013-04-14 21:09:47 -04:00
Paul R. Tagliamonte
5d0b1a5e1e Merge branch 'jd/for-else' of git://github.com/jd/hy into pr-121 2013-04-14 21:05:55 -04:00
Julien Danjou
bbaab58a4c Implements else' for foreach' statements
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-15 02:50:26 +02:00
Julien Danjou
c05ae5fcbc Add AugAssign handling
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-15 02:49:34 +02:00
Julien Danjou
60a9003b0c Add missing bits operator and power
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-15 02:49:34 +02:00
Julien Danjou
6a09179809 Enhance error handling
We now have a full backtrace if the compiler bugs, and if it's a user
problem we indicate him where he failed.

Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-15 02:48:58 +02:00
Julien Danjou
fdb6bf944c try: add support for `finally'
This fixes #75

Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-15 02:48:58 +02:00
Paul R. Tagliamonte
403be35aa3 use hy 2013-04-14 18:24:37 -04:00
Julien Danjou
cb20910d93 Remove `pass' from the language.
This also fixes a bug in the pass optimize missing branch where the code is
something like: [stmt, [], stmt]; in such case we want to filter out [], so
if we end up with [] we can optimize it. This fix is needed otherwise (do)
inside (do) are not properly optimized.

Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-14 13:56:44 +02:00
Nicolas Dandrimont
1756e534ad The b prefix works since python2.6 2013-04-13 21:46:17 +02:00
Vladimir Gorbunov
0b03733c65 Add tests for pyc compilation 2013-04-13 20:57:54 +04:00
Paul R. Tagliamonte
3e0ff4a9b2 Adding @vladimir-g to AUTHORS 2013-04-13 10:50:55 -04:00
Gergely Nagy
5d895c2005 Making (import) a lot smarter
With these changes, the import function will become a lot smarter, and
will combine all of import, import-from and import-as in a hyly lispy
syntax:

 (import sys os whatever_else)
 (import [sys [exit argv]] [os :as real_os]
         [whatever_else [some_function :as sf]])

That is, each argument of import can be:

 - A plain symbol, which will be imported
 - A list, which will be handled specially

If the argument is a list, the first element will always be the module
name to import, the second member can be either of these:

 - A list of symbols to import
 - The ':as' keyword
 - Nothing

If it is the ':as' keyword, the third argument must be an alias. If it
is a list of symbols to import, we'll iterate through that list too. If
any symbol is followed by an ':as' keyword, we'll pick all three, and
treat the third member as an alias. If there is nothing else in the
list, we'll import the module as-is.

All this combined fixes #113.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2013-04-13 15:06:31 +02:00
Vladimir Gorbunov
f30e7cd99b Fix hyc 2013-04-13 16:28:37 +04:00
Paul R. Tagliamonte
1e98889604 removing site reqs file 2013-04-12 23:49:08 -04:00
Paul R. Tagliamonte
f295b10f52 Updating yield. 2013-04-12 23:48:58 -04:00
Paul R. Tagliamonte
454323ae04 removing site target 2013-04-12 23:46:28 -04:00
Paul R. Tagliamonte
eb30c5857e Removing the website updater. 2013-04-12 23:16:20 -04:00
Paul R. Tagliamonte
49937cf66a update eww-arrr-el 2013-04-12 23:11:53 -04:00
Paul R. Tagliamonte
a3c6f12b86 Screw it; buyer beware. 2013-04-12 23:08:22 -04:00
Paul R. Tagliamonte
a71f166610 Merge branch 'future_division' of github.com:khinsen/hy into pr-106 2013-04-12 23:07:40 -04:00
Paul R. Tagliamonte
0071733019 I've moved site to https://github.com/hylang/shyte 2013-04-12 23:00:54 -04:00
Nicolas Dandrimont
30c0b25512 Add a unicode string handling test 2013-04-12 20:58:56 +02:00
Nicolas Dandrimont
d5db2840ad Don't punycode pure unicode strings. 2013-04-12 20:42:40 +02:00
Nicolas Dandrimont
65c08c8c7d Factor str_type into hy.util 2013-04-12 20:42:39 +02:00
Nicolas Dandrimont
8bc8a4a170 Merge remote-tracking branch 'khinsen/float_and_complex_2' into paultag/master
Conflicts:
	hy/lex/states.py
	tests/lex/test_lex.py
2013-04-12 18:16:43 +02:00
Paul Tagliamonte
e4e61a463e Adding in the new models. 2013-04-12 09:18:25 -04:00
Paul Tagliamonte
1f4ed473d3 Style fixes; function declashing. 2013-04-12 09:11:56 -04:00
Paul Tagliamonte
3ec828e660 Merge branch 'float_and_complex' of git://github.com/khinsen/hy into pr-109 2013-04-12 09:09:38 -04:00
Paul Tagliamonte
c15d8750e8 Merge branch 'f/hy.models.keyword' of git://github.com/algernon/hy into pr-101 2013-04-12 08:58:38 -04:00
Paul Tagliamonte
94d2c381a5 Merge branch 'lexer_extensions' of git://github.com/khinsen/hy into pr-98 2013-04-12 08:55:13 -04:00
Konrad Hinsen
c30a116416 Add "from __future__ import division" to Python code generated by hy2py
This is mainly to make we don't forget this. The current state of hy2py
is more a proof-of-concept than a usable tool anyway.
2013-04-12 08:00:08 +02:00
Konrad Hinsen
0c56885d42 Use __future__.division for all Hy code
Fixes #106
Note: This is implemented by replacing all calls to Python's
builtin "compile" function by calls to hy.importer.compile_,
which adds the "future division" flag. Anyone using "compile"
in future work will have to remember this.
2013-04-12 05:23:25 +02:00
Paul R. Tagliamonte
db3e2bd346 updating the nested mangles 2013-04-11 22:25:23 -04:00
Gergely Nagy
2ea2cd1a8d tests: Test that keywords do not clash with normal strings
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2013-04-11 15:13:40 +02:00
Gergely Nagy
702811c69a Implement :keyword support
This implements keywords, ":" prefixed symbols that are able to look
themselves up in a collection. They're internally stored as strings that
start with "\ufdd0".

This fixes #22.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2013-04-11 15:13:26 +02:00