Commit Graph

738 Commits

Author SHA1 Message Date
Kodi Arfer
7ed31a18f3 Forbid arguments to break and continue 2017-08-26 11:37:15 -07:00
Kodi Arfer
8b677bb20c Un-xfail a passing test of macroexpand
It seems that #1374 (1faee7ac39) fixed this bug.
2017-08-25 15:25:06 -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
Ryan Gonzalez
dea99c8b76 Merge pull request #1354 from gilch/comment-discard
add #_ discard syntax
2017-08-19 11:29:57 -05:00
Kodi Arfer
8d40a68232 Initialize the return variable of with 2017-08-19 07:35:41 -07:00
Kodi Arfer
f5ee5f4ee5 Whitespace fix 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
David Schaefer
969fa8d533 Fixes #1350: try form in defmacro 2017-08-11 01:21:01 +02:00
David Schaefer
274f5e9002 Fix copy behaviour of HyComplex 2017-08-09 23:30:16 +02:00
Jordan Danford
c67b8bccb9 Expose read, read_str, and eval in Python
- Expose `read`, `read_str`, and `eval` in Python
- Add string evaluation example to interop section of docs
- Add test for `eval`
- Explain `eof` keyword argument in `read` docstring
2017-08-05 17:29:15 -07:00
gilch
0f81369deb tests for #_ and (comment ...) 2017-08-04 14:35:11 -06:00
David Schaefer
432d560310 No TypeError from multi-arity defn returning None 2017-08-04 17:08:41 +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
67a4815024 Shadow get (#1344) 2017-07-26 21:10:54 -05:00
Kodi Arfer
28ce83524b Don't try to lex tag-macro calls as shebangs 2017-07-23 11:43:19 -07:00
Kodi Arfer
0bbb5f8e34 hy-repr: Support #* and #** 2017-07-19 10:25:24 -07:00
Kodi Arfer
97ecb0b553 Remove apply from tests 2017-07-17 13:34:42 -07:00
Kodi Arfer
2d863abc85 Implement #* and #** unpacking 2017-07-17 13:34:39 -07:00
Kodi Arfer
801836f6c2 Remove the Python 2 yield-from macro
I moved the yield-from tests from native_macros to py3_only_tests.
2017-07-13 08:46:41 -07:00
gilch
7d8ffc0181 Merge pull request #1322 from kirbyfan64/new-rply
Update rply to 0.7.5
2017-07-12 17:51:44 -06:00
Kodi Arfer
33052f4180 Test compiling a lot of comment lines 2017-07-12 14:07:42 -07:00
Kodi Arfer
b7657e8fa3 Require HySymbols instead of HyStrings more often 2017-07-12 10:57:35 -07:00
Kodi Arfer
5a1e6a7c6a hy-repr: Support NaN and Inf 2017-07-10 08:50:49 -07:00
Kodi Arfer
bb91b57dca Require capitalizing NaN and Inf like so 2017-07-10 08:50:49 -07:00
Kodi Arfer
a746ccb42c Refactor test_lex_expression_complex 2017-07-10 08:50:45 -07:00
Kodi Arfer
55986b2033 Auto-promote values to HyObjects in the compiler 2017-07-03 17:01:12 -07:00
Kodi Arfer
4be37b358b Make lists no longer magical for the compiler 2017-07-03 17:01:12 -07:00
Kodi Arfer
ca95194240 Change eval from a special form to a function 2017-06-27 08:14:29 -06:00
Kodi Arfer
f2278cf2f0 Support PYTHONDONTWRITEBYTECODE 2017-06-26 19:00:08 -06:00
Kodi Arfer
399e7628b4 Parametrize test_bin_hy_byte_compile 2017-06-26 18:58:51 -06:00
gilch
672c8a1637 Merge pull request #1307 from hylang/windows-tests
Use universal newlines in test_bin.py
2017-06-26 14:27:16 -06:00
Kodi Arfer
26d1b3f72e Don't parse 5.attr or :foo.attr as symbols 2017-06-23 08:30:37 -07:00
Kodi Arfer
c8736ebd0c Use pytest.raises in test_lex 2017-06-23 08:29:55 -07:00
gilch
b7a0c2abf0 add tag macro tests 2017-06-22 22:49:00 -06:00
gilch
6cd3201421 rename sharp macros to tag macros 2017-06-22 22:48:46 -06:00
gilch
aa08149712 Use universal newlines in test_bin.py
Change run_cmd() implementation in test_bin.py to use universal newlines (text mode) for Windows compatibility.
2017-06-18 16:05:44 -06:00
neil-lindquist
d3df17d9d8 Modify cond to support single argument branches 2017-06-10 08:30:53 -07:00
Kodi Arfer
5bf9ecfc5a Forbid (try) and (try BODY) 2017-05-25 20:48:09 -05:00
Kodi Arfer
dffa2811e6 Return from the else clause of a try form
I overhauled the documentation of `try` while I was editing it.
2017-05-25 20:48:09 -05:00
Kodi Arfer
81d89c9d12 Enforce the standard order of try elements 2017-05-25 20:48:09 -05:00
Kodi Arfer
2eb81864df Make all files comply with license-header policy 2017-04-27 14:16:57 -07:00
Kodi Arfer
eeb0be8fb0 Add some xfail tests for known bugs 2017-04-26 14:00:39 -07:00
Kodi Arfer
d3fa375052 Migrate from Nose to pytest 2017-04-26 14:00:11 -07:00
Kodi Arfer
d085fba5fe Move a quoting test to get rid of a directory 2017-04-26 13:58:09 -07:00
Kodi Arfer
8afd13cb16 Use test functions instead of unittest.TestCase 2017-04-26 13:58:09 -07:00
Kodi Arfer
55c205f87e Test take and drop only in native_tests.core 2017-04-26 13:58:09 -07:00
Kodi Arfer
07e9284100 Correct import syntax in a test 2017-04-25 09:30:13 -07:00
Kodi Arfer
a27d737e1c Drop support for Pythons 3 older than 3.3 2017-04-24 14:22:13 -07:00