Commit Graph

75 Commits

Author SHA1 Message Date
Kodi Arfer 84fbf04f84 Fix AST representation of format strings 2019-08-13 16:07:46 -04:00
Kodi Arfer 6fb6eefd6b Make augmented assignment operators variadic 2019-08-08 15:12:03 -04:00
Kodi Arfer d32e460531 Remove some exceptions in keyword parsing 2019-07-24 11:21:11 -04:00
Ryan Gonzalez 289f172d56 Fix #1790: Rework statements in while condition
This avoids compiling them more than once while also applying some simplification.
2019-07-22 11:34:48 -04:00
Kodi Arfer d99cf80986 Run statements in the second argument of `assert`
I've edited the test to use a list instead of a set because the order of evaluation probably ought to be guaranteed.
2019-07-21 10:17:24 -04:00
Kodi Arfer c99360b294 Remove support for `defclass` attribute lists 2019-07-17 14:34:31 -04:00
Kodi Arfer 081c22d50b Update NEWS 2019-06-04 14:01:59 -04:00
Kodi Arfer 03eff1374c Update NEWS for release 2019-05-19 13:34:55 -04:00
Kodi Arfer e77ce92635 Simplify gensym format 2019-04-29 08:10:51 -04:00
Kodi Arfer 6c74cf1f07 Add `setx` for assignment expressions 2019-04-23 15:35:12 -04:00
Kodi Arfer 63ba27b36d Update trove classifiers and NEWS 2019-04-23 15:35:12 -04:00
Tristan Cacqueray d793cee90a add `tuple?` function `hy.core`
`tuple?` will test if the argument is an instance of tuple.
2019-04-23 15:25:49 -04:00
Tristan Cacqueray b0ed103931 add `list?` function to `hy.core`
`list?` will test if the argument is an instance of list.
2019-04-09 00:07:10 +00:00
Andrew R. M da823d2cad Fix a temporary-file crash 2019-04-06 15:43:10 -04:00
Kodi Arfer 30fc1425c1 Update docs and README 2019-03-17 18:40:37 -04:00
Kodi Arfer 5bfc140b4d Implement format strings 2019-02-26 14:04:24 -05:00
Kodi Arfer 6769dda4b5 Clean up NEWS 2019-02-07 14:06:58 -05:00
Kodi Arfer 96d1b9c3fa Update README 2019-02-07 13:50:30 -05:00
Kodi Arfer f1e693c96b Fix a Python 2 crash 2019-02-03 14:13:48 -05:00
Kodi Arfer b777972a0e Fix mangling of characters below 0xFF 2018-12-14 15:54:23 -05:00
Brandon T. Willard f040bbe96f Update NEWS 2018-11-29 14:37:52 -06:00
Brandon T. Willard 3d0659b723 Update NEWS 2018-11-28 16:35:42 -06:00
Jakub Wilk 28504ba85d Catch IndentationError in isidentifier()
Fixes:

    >>> from hy._compat import isidentifier
    >>> isidentifier(u"  0\n 0")
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "hy/_compat.py", line 47, in isidentifier
        tokens = list(T.generate_tokens(StringIO(x).readline))
      File "/usr/lib/python2.7/tokenize.py", line 374, in generate_tokens
        ("<tokenize>", lnum, pos, line))
      File "<tokenize>", line 2
        0
        ^
    IndentationError: unindent does not match any outer indentation level
2018-11-27 17:15:21 -05:00
Brandon T. Willard 3b01742818 Update NEWS 2018-11-08 22:57:17 -06:00
Brandon T. Willard f4e5f02b3e Updated NEWS 2018-09-11 16:26:21 -04:00
Brandon T. Willard b12fd33e6f Update NEWS 2018-08-26 00:27:36 -05:00
Kodi Arfer 7ba2105a2b Fix date and time hy-reprs on Windows 2018-08-08 09:26:20 -04:00
gilch 109c0b0f5b
Merge pull request #1664 from brandonwillard/require-in-macroexpand-all
Expand `require`d macros in `macroexpand-all`
2018-08-02 23:57:32 -06:00
Brandon T. Willard a46cc39d6b Include `macroexpand-all` changes in AUTHORS and NEWS 2018-07-25 17:22:40 -05:00
Kodi Arfer 081a710b0f Fix handling of unpacking in method calls and attribute lookups 2018-07-24 09:45:00 -07:00
Kodi Arfer 1d2c73165d Make HyKeyword callable
Co-authored-by: Simon Gomizelj <simon@vodik.xyz>
2018-07-24 09:19:37 -07:00
Kodi Arfer 03aafad657 Make empty expressions illegal at the top level 2018-07-24 08:59:52 -07:00
Kodi Arfer 4020f3dd56 Clean up NEWS 2018-07-21 11:20:13 -07:00
Kodi Arfer 9859b0085c Document the required order of &-parameters 2018-07-11 11:36:32 -07:00
Kodi Arfer 7abd8ffc2a Make importing a dotted name a syntax error, per Python 2018-06-27 10:24:22 -07:00
Oskar Kvist edbe8e3b7f Make defmacro! work with optional args 2018-06-25 11:45:23 -07:00
Kodi Arfer da754c0e5d Update NEWS and docs for the new comprehensions 2018-06-13 17:31:08 -07:00
Kodi Arfer 8296a36e12 Add tests and docs for model patterns 2018-05-28 16:15:47 -07:00
Kodi Arfer 38fdcc2114 Don't let HySymbol inherit from HyString 2018-05-20 14:11:35 -07:00
Kodi Arfer 9368e4bc4e Use model patterns for `import` and `require`
In the process, I've banned the syntax `(import [foo])` in favor of `(import foo)`.
2018-05-20 14:07:44 -07:00
Philip Xu 8a83d0c1ea Fixes #1605: remove macros ap-pipe and ap-compose
Anaphoric macros do not work well with point-free style programming, in
which case both threading macros and `comp` are more adequate.
2018-05-20 13:52:51 -07:00
Kodi Arfer a2aeca2338 Remove tuple unpacking in lambda lists 2018-05-04 10:40:22 -07:00
Simon Gomizelj 7c3477e738 Fix a bug where the compiler doesn't properly handle unquote-splice
Added test coverage as well
2018-04-30 09:38:57 -07:00
Kodi Arfer c7ac4c60c4 Fix a bug that caused `try` to drop expressions 2018-04-30 09:18:01 -07:00
Kodi Arfer ec1c92bf4e Allow `for` with an empty body 2018-04-29 19:51:00 -07:00
Kodi Arfer 87aced2370 Don't let HyExpression etc. inherit from HyList
This means the compiler no longer allows e.g. `(fn (x) ...)` in place of `(fn [x] ...)`.
2018-04-29 19:17:47 -07:00
Simon Gomizelj 032247e380
Merge pull request #1588 from Kodiologist/no-amp-key
Remove &key
2018-04-27 00:21:11 -04:00
Ryan Gonzalez fbeff8d25c
Merge pull request #1587 from Kodiologist/no-empty-catchers
Ban `(except)`
2018-04-23 21:50:56 -05:00
Kodi Arfer c1a487cdf7 Move logic from macroexpand_1 to macroexpand
By ending macro-expansion immediately when appropriate, this change fixes a bug arising from the fact that NaN != NaN.
2018-04-21 12:25:29 -07:00
Kodi Arfer a605936651 Remove &key
It's redundant with &optional.
2018-04-19 09:26:02 -07:00