Commit Graph

1745 Commits

Author SHA1 Message Date
Gergely Nagy
9569537f8c Merge pull request #929 from gilch/itertools
Itertools
2015-10-01 10:03:16 +02:00
Gergely Nagy
8ce9c0c313 Merge pull request #882 from algernon/glc/apply-mangle
Teach apply about symbol mangling
2015-10-01 10:02:38 +02:00
Gergely Nagy
6d808bfda9 Merge pull request #881 from algernon/f/defclass-init-auto-nil
defclass should add an implicit nil return to --init--
2015-10-01 10:00:47 +02:00
Berker Peksag
a8c8afd679 Merge pull request #948 from jwilk/spelling
Fix typos
2015-09-30 00:05:24 +03:00
Jakub Wilk
3a1af0c219 Fix typos 2015-09-29 22:57:36 +02:00
Gergely Nagy
66aa14c88f Merge pull request #946 from gilch/patch-1
Add link to stable docs
2015-09-25 10:10:02 +02:00
Berker Peksag
7fbd5a791e Merge pull request #944 from michel-slm/patch-1
Update style-guide.rst
2015-09-25 09:19:50 +03:00
Matthew Egan Odendahl
a026a6a960 further clarification 2015-09-24 23:04:17 -06:00
Matthew Egan Odendahl
0213865525 Add link to stable docs
The language cleanup is confusing the new people. This is at least the third time.
2015-09-24 22:47:16 -06:00
Gergely Nagy
26f342d580 Teach apply about symbol mangling
apply now mangles strings and keywords according to the Hy mangling
rules (by using the same function, now imported from
hy.lex.parser). With this change, if the dict passed to apply has
keywords, strings or quoted symbols, they'll get mangled, to turn them
into proper keys.

This only works for the cases where the keys are directly in the apply
params. A previously deffed dict, or key through a variable will not be
mangled.

This closes #219.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-09-24 09:47:12 +02:00
Gergely Nagy
c89865aaf0 defclass should add an implicit nil to --init-- functions
To make it easier to write --init-- functions, defclass will now check
any (setv) expressions (and its property list), to find any --init--
declarations, and append a nil to the end.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-09-24 09:46:59 +02:00
Zack M. Davis
b1f497ae72 fix CI by moving exclude_lines .coveragerc setting to a new [report] §
On 21 September, all the continuous integration checks on a revision of
pull-request #920 were observed to fail with a "CoverageException:
Unrecognized option '[run] exclude_lines=' in config file
.coveragerc". One can only imagine that this was due to it trying to use
the new version 4.0 of Ned Batchelder's ever-popular coverage.py (just
released on 20 September), with which our existing .coveragerc would
seem to have not been compatible.
2015-09-23 22:44:19 -07:00
Michel Alexandre Salim
49a294e98d Update style-guide.rst
Re-indent `fib` examples to match that in original blog post - "Indentation shall be two spaces, except where matching the indentation of the previous line"
2015-09-23 00:39:08 +07:00
Berker Peksag
456f33eb7c Merge pull request #938 from paultag/paultag/feature/hex-and-octel
Add hex and octel support to Hy integers
2015-09-16 20:55:05 +03:00
Paul Tagliamonte
fc5d74ba85 Add in documentation for non-base 10 numbers 2015-09-15 12:18:56 -04:00
Paul Tagliamonte
e05514bb4e Add hex and octel support to Hy integers
This allows us to parse things like 0xDEADBEEF or 0o080.

Filed as issue #937
2015-09-15 11:27:38 -04:00
Abhishek L
8be0e40c7a Merge pull request #936 from ALSchwalm/master
Remove hard-coded references to 'fn' and 'setv' in errors
2015-09-15 14:56:02 +05:30
Adam Schwalm
f9c3966e65 Remove hard-coded references to 'fn' and 'setv' in errors 2015-09-14 18:37:24 -05:00
Gregor Best
2e1b2ff591 Merge pull request #928 from gilch/partition
Enhanced partition
2015-09-06 16:54:23 +02:00
Morten Linderud
2a2ef883c0 Merge pull request #930 from timmartin/master
Add @timmartin to the AUTHORS file
2015-09-03 22:59:14 +02:00
Tim Martin
2670f92731 Add @timmartin to the AUTHORS file 2015-09-03 21:43:13 +01:00
gilch
b73bc4c5f9 remove redundant filterfalse
removed `filterfalse` in favor of the shorter `remove`
2015-09-03 11:56:17 -06:00
gilch
6f93de68d7 added remaining itertools
Some names have been changed.
Removed redundant zipwith.
Made `first` and `last` more efficient.
2015-09-03 11:45:55 -06:00
gilch
4896980373 enhance partition 2015-09-02 22:54:24 -06:00
gilch
7a839aee5d Merge branch 'master' into partition 2015-09-02 17:34:29 -06:00
Morten Linderud
cdd60ce77d Merge pull request #925 from timmartin/bug730
Added documentation for the (keyword?) function
2015-09-01 00:20:32 +02:00
Tim Martin
818ed5da72 Added documentation for the (keyword?) function 2015-08-31 20:35:37 +01:00
Morten Linderud
87ee69e967 Merge pull request #924 from ALSchwalm/master
Better error messages on invalid macro arguments
2015-08-31 11:28:57 +02:00
Adam Schwalm
f18007955d Better error messages on invalid macro arguments 2015-08-30 17:14:22 -05:00
Zack M. Davis
920b35f129 merge branch 'fix_string_nl' 2015-08-28 01:24:58 -07:00
Ryan Gonzalez
f88f6e597b Reformat string literals in test_lex_strings 2015-08-25 11:04:39 -05:00
Ryan Gonzalez
a2f95366fe Add tests for #831 2015-08-25 11:04:11 -05:00
Ryan Gonzalez
73ace37678 Fix #831
Blame dot not matching newlines
2015-08-22 15:13:46 -05:00
Zack M. Davis
2c2d679daf merge branch 'gcl/defclass-allow-builtins' 2015-08-18 23:43:18 -07:00
Zack M. Davis
6916eea604 merge branch 'f/empty-cond' 2015-08-18 23:23:00 -07:00
Zack M. Davis
1187353661 merge branch 'f/empty-del' 2015-08-18 23:16:14 -07:00
Gregor Best
c29737d421 Merge pull request #897 from farhaven/eval-args-typecheck
Eval args typecheck
2015-08-18 11:01:36 +02:00
Gergely Nagy
ab7d1be001
Allow an empty (cond)
For easier macro writing purposes, allow an empty (cond), that simply
returns nil. Closes #904.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-08-18 08:57:42 +02:00
Gergely Nagy
e0f5d54a2f
Allow (del) without arguments
To mirror the behaviour of (setv), allow an empty (del) too: one that
shall return nil. Closes #905.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-08-18 08:51:09 +02:00
Zack M. Davis
649dd38040 merge branch 'setv-nil' 2015-08-17 22:53:03 -07:00
Ryan Gonzalez
7e611947a4 Allow setv to take no arguments (closes #901) 2015-08-17 17:29:06 -05:00
Gregor Best
856212c9d7 Tidier string type check for eval 2015-08-13 09:59:58 +02:00
Gregor Best
503b4e1f81 Tidier checks for eval failure modes 2015-08-12 22:01:20 +02:00
Gregor Best
44416fc276 Typecheck eval arguments during execution instead of compilation
When checking types during compilation, things like

    (eval '(print 1) (. foo mod))

fail, even if `(. foo mod)` is a dictionary.
2015-08-12 22:01:19 +02:00
Gregor Best
ead65b646b Merge pull request #893 from gilch/xi-forms
xi parameter may appear in function position
2015-08-12 17:00:44 +02:00
gilch
a06c8a9af9 xi parameter may appear in function position 2015-08-12 08:50:18 -06:00
Gregor Best
6d19128c3c Merge pull request #890 from gilch/xi-forms
added xi-forms
2015-08-12 11:30:33 +02:00
Gergely Nagy
b92049d119 Allow defclass to have properties/method with built-in names
To allow classes to have methods that match built-in names, yet, still
disallow them outside of defclass, keep an internal state whether
builtins are allowed in the current context.

By default, this is false. But defclass will set it to True when it
compiles its body, and set it back to the previous value when it's done
with that. We need to set back to the previous value to allow nested
defclasses to work properly.

This closes #783.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-08-12 08:49:24 +02:00
Gergely Nagy
9bff606ee9 Test that assigning to a builtin fails
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-08-12 08:49:24 +02:00
Tuukka Turto
1599f29dff Merge branch 'master' into pr/886
Conflicts:
	tests/compilers/test_ast.py
2015-08-12 08:05:19 +03:00