Commit Graph

434 Commits

Author SHA1 Message Date
Kodi Arfer
7fcc7ac4b6 Make unary comparison ops evaluate their argument 2018-03-13 14:38:36 -04:00
Simon Gomizelj
ef2f435647 Add a hy.introspect module to deal with getargspec deprecation 2018-02-14 16:05:31 -05:00
Simon Gomizelj
316220b742 Fix AST generation of a naked return 2018-02-14 16:05:31 -05:00
Simon Gomizelj
5c40f793a1 Support PEP 328
Add support for proper relative imports
2018-02-06 23:41:12 -05:00
Tuukka Turto
5c720c0110
Merge pull request #1473 from Kodiologist/new-year-2018
Update copyright years
2018-02-05 15:11:59 +02:00
Tuukka Turto
cf87de5cc2
Merge pull request #1483 from vodik/remove-def
Just remove `def`
2018-01-31 08:54:59 +02:00
Simon Gomizelj
0cd4df3898 Remove def and standardize on setv 2018-01-21 00:25:33 -05:00
Tuukka Turto
a9621817f9
Merge pull request #1433 from Kodiologist/while-multistatement
Handle statements in the condition of `while`
2018-01-11 07:45:27 +02:00
Kodi Arfer
6de7ddfee5 Update copyright years 2018-01-01 10:38:33 -05:00
Simon Gomizelj
f69ccd2421 Allow coroutines to be decorated 2017-12-31 09:03:39 -05:00
Simon Gomizelj
1e4ad3167b Introduce for/a* and for/a expressions 2017-12-30 19:02:15 -05:00
Simon Gomizelj
783d53ecb7 Introduce with/a* and with/a expressions 2017-12-30 19:02:15 -05:00
Simon Gomizelj
2ffaa8e5be Fix yield-from to prevent it from accepting no arguments
Closes #1472
2017-12-30 19:02:15 -05:00
Simon Gomizelj
e3e01d4405 Introduce fn/a and defn/a
Closes #1054
2017-12-30 19:02:15 -05:00
Jakub Wilk
8b986e87e3 Add missing space between words 2017-12-24 20:02:23 +01:00
Rob Day
eda78eb81c Allow multiple expressions in a try 2017-12-03 09:47:41 +00:00
Kodi Arfer
52a0c8a870 Unify implementations of eval-X-compile 2017-11-02 08:43:43 -07:00
Kodi Arfer
fd64575799 Handle statements in the condition of while 2017-11-02 07:31:58 -07:00
Ryan Gonzalez
e0e664c030
Merge branch 'master' into letmacro 2017-11-01 09:39:18 -05:00
Kodi Arfer
a074bb9a5c Work around an astor regression for NaN 2017-10-31 17:50:44 -07:00
gilch
82b4518fa6 error check defclass name 2017-10-30 20:24:09 -06:00
gilch
3707681056 make deftag/defmacro macros, not special forms 2017-10-29 17:52:40 -06:00
gilch
a54f6aa38b add hidden &name parameter to macros
The module name allows macros to preexpand their body in the proper
context.
2017-09-23 14:59:43 -06:00
Kodi Arfer
1e456c6ced Don't treat [else…] or ("else"…) as else clauses 2017-09-20 16:34:56 -07:00
Rob Day
907e72681f Let argument destructuring work with docstrings 2017-09-17 21:06:45 +01:00
gilch
e43d6f5e2f Merge pull request #1419 from rkday/else_multiple_statements
Allow multiple statements in the else branch of for
2017-09-16 14:10:28 -06:00
Rob Day
be35b09e5d Allow multiple statements in the else branch of a for loop 2017-09-16 20:41:22 +01:00
Ryan Gonzalez
3f69ed8e8e Merge pull request #1399 from Kodiologist/compiler-refactor 2017-09-15 14:44:32 -05:00
Ryan Gonzalez
44e5ded522 Merge pull request #1379 from Kodiologist/lua-str-literal
Add #[DELIM[ … ]DELIM] syntax for string literals
2017-09-15 14:36:08 -05:00
Rob Day
567fa14f1d Allow else after a while loop 2017-09-14 20:55:29 +01:00
Kodi Arfer
957a721cd4 Remove _hy_anon_fn_N in favor of _hy_anon_var_N 2017-09-13 13:30:59 -07:00
Kodi Arfer
cf7ff802c9 Make hy.compiler.builds more flexible
I removed the "Hypster" error message and the test for it because it can only catch compiler bugs that should themselves be caught by Hy's tests.
2017-09-13 13:30:59 -07:00
Kodi Arfer
e30abcd20f Combine some literal compilation methods 2017-09-13 13:30:59 -07:00
Kodi Arfer
5f36a53577 General compiler refactoring pass
Most of the changes are to use the new `asty` shorthand, but I also combined methods and statements when I saw obvious duplication.
2017-09-13 13:30:59 -07:00
Kodi Arfer
ddded5e8bd PEP8 fixes in compiler 2017-09-13 13:30:59 -07:00
Kodi Arfer
deb801edab Preserve .brackets in quoted HyStrings 2017-09-08 11:27:34 -07:00
Kodi Arfer
0fc96306bc Drop support for Python 3.3 2017-08-26 13:36:51 -07:00
Kodi Arfer
7ed31a18f3 Forbid arguments to break and continue 2017-08-26 11:37:15 -07:00
Kodi Arfer
2bbf886ceb Make assoc a macro instead of a special form
The new macro evaluates its lvalue only once.
2017-08-25 11:41:28 -07:00
Kodi Arfer
8d40a68232 Initialize the return variable of with 2017-08-19 07:35:41 -07:00
Kodi Arfer
2ef9bc75d4 Clean up with 2017-08-19 07:25:00 -07:00
Kodi Arfer
21ea36f277 Add return as a special form 2017-08-11 13:56:44 -07:00
Kodi Arfer
cca8beea44 Fix the grammar of an error message 2017-08-11 10:49:32 -07:00
David Schaefer
969fa8d533 Fixes #1350: try form in defmacro 2017-08-11 01:21:01 +02:00
Kodi Arfer
e8ffd41202 Merge pull request #1349 from woodrush/fix-unquote-splice-none
Allow `unquote-splice` to accept any false value as empty
2017-08-02 19:50:47 -04:00
Kodi Arfer
ecc974de1e Implement Python 2 exec
The implementation of `hy.core.language.exec` draws code from the `exec_` function in commit f574c7be6ebc80041ef58ca29588f310248ebed4 of the library Six, which is copyright 2010–2017 Benjamin Peterson and licensed under the Expat license.
2017-08-02 13:33:59 -04:00
Hikaru Ikuta
a0224ef8bd Allow unquote-splice to accept any false value as empty 2017-08-02 00:50:37 +09:00
Kodi Arfer
784a44601b Remove the implementation of apply 2017-07-19 10:18:55 -07:00
Kodi Arfer
2d863abc85 Implement #* and #** unpacking 2017-07-17 13:34:39 -07:00
Kodi Arfer
a979dd85f7 Don't make yield-from a special form on Python 2 2017-07-13 08:46:41 -07:00