Gergely Nagy
8ef02a54b5
hy/lex/parser.py: Add support for sub-object mangling
...
With this patch, every identifier is split up along dots, each part gets
separately mangled, and then it is all joined back together. This allows
for fun stuff like (.foo? (Foo)), and even more contrived examples.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-01-16 16:23:35 +01:00
Gergely Nagy
e49ad3b3d5
tests/lex/test_lex.py: Add a few tests to cover identifier mangling
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-01-16 16:23:35 +01:00
Gergely Nagy
ceb615d010
hy/lex/parser.py: Move most of the identifier mangling into a def
...
As a refactoring step, move the identifier mangling done in t_identifier
into a separate def.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-01-16 16:20:51 +01:00
Morten Linderud
d34c22eeac
Merge pull request #448 from olasd/feature/genexpr
...
Add set comprehensions, dict comprehensions and generator expressions
2014-01-16 06:06:12 -08:00
Gergely Nagy
8de61c65e7
Merge pull request #447 from rubberduckdev/patch-2
...
Missing comma
2014-01-16 05:14:58 -08:00
Gergely Nagy
b7a13fa88d
Merge pull request #452 from berkerpeksag/silence-title-too-short
...
Silence a "Title underline too short" warning.
2014-01-16 05:12:26 -08:00
Berker Peksag
685a1b80fa
Silence a "Title underline too short" warning.
2014-01-16 14:08:18 +02:00
Berker Peksag
60e66476f5
Merge pull request #449 from rubberduckdev/patch-3
...
Correcting a typo
2014-01-15 18:01:50 -08:00
Berker Peksag
e919f75aaf
Merge pull request #446 from rubberduckdev/patch-1
...
Missing "of"
2014-01-15 17:59:01 -08:00
Yuval Langer
e50ca4fc07
Correcting typos.
2014-01-16 03:54:44 +02:00
rubberduckdev
cd66f18e2e
Rewording
...
Not sure if the rewording is much better.
2014-01-16 02:40:46 +02:00
rubberduckdev
6c15f14ff7
Correcting a typo
2014-01-16 02:13:05 +02:00
Nicolas Dandrimont
8bfa4f33fc
Add set comprehensions, dict comprehensions and generator expressions
...
Closes : #14 (woo, two-digit tickets)
2014-01-16 00:49:48 +01:00
rubberduckdev
7d5399570c
Missing comma
2014-01-16 01:45:34 +02:00
rubberduckdev
65e9d5ae7e
Missing "of"
2014-01-16 01:25:43 +02:00
Gergely Nagy
a619295dd7
bin/hy2py: Add a bunch of command-line options
...
The hy2py tool has been very useful for me, but most of the time, it's
only a part of its output that one is interested in. The whole output,
with source code, AST and python code together is one big monstrosity.
So instead of printing all that, lets have a few handy command-line
options to control which part gets printed.
By default, only the generated python source is, as that's what the name
of the tool implies.
Also, don't run it. That's what hy is for.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-01-14 09:17:56 +01:00
Morten Linderud
da59b20471
Merge pull request #442 from berkerpeksag/sphinx-markup-fix
...
Fix a markup error in the apply doc.
2014-01-13 22:12:38 -08:00
Berker Peksag
94e1fc40f7
Fix a markup error in the apply doc.
...
See http://docs.hylang.org/en/latest/language/api.html#apply
for the example.
2014-01-14 06:08:54 +02:00
Berker Peksag
25459177eb
Move "hy on meth" example to eg/.
2014-01-14 06:03:57 +02:00
Paul Tagliamonte
5a64f18726
Refactor (loop) in terms of fnr; change to use decorator.
2014-01-13 20:37:25 -05:00
Paul Tagliamonte
8ababcb905
add clinton
2014-01-13 20:24:12 -05:00
Gergely Nagy
5b78735011
hy/cmdline.py: Add support for running with --spy -i
...
There's no reason why one would need to choose between --spy and -i, so
pass down options.spy to run_icommand, and then to HyREPL, so we can
have both.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2014-01-13 22:12:32 +01:00
Paul Tagliamonte
0afbbeb68c
Add (recur) for functions and stuff.
2014-01-12 18:53:08 -05:00
Clinton N. Dreisbach
47d67b0062
Added loop/recur macro for tail-call optimization
2014-01-12 14:02:27 -05:00
Paul Tagliamonte
5fc047e77c
Merge branch 'master' into pr/425
...
Conflicts:
hy/core/language.hy
2014-01-12 12:48:26 -05:00
Nicolas Dandrimont
1e793e696a
Fix indentation of *exports*
2014-01-12 17:34:05 +01:00
Nicolas Dandrimont
14a791f37b
Merge branch 'f/is-coll' of https://github.com/theanalyst/hy into theanalyst-f/is-coll
2014-01-12 17:33:17 +01:00
Abhishek L
ec8220c2b7
Merge master onto pr/428
2014-01-12 20:33:25 +05:30
Abhishek L
bd53416a72
docs: update docs with coll? functionality
2014-01-12 15:52:14 +05:30
Abhishek L
f159f1499b
Adding a simple coll?
function to the core
...
* hy/core/language.hy:
-Added a simple coll? function that checks whether the given argument
is an iterable and not a string,
- Also replaced the check in `flatten` by coll?
* tests/native_tests/core.hy: Tests updated for checking coll?
2014-01-12 15:49:09 +05:30
Paul Tagliamonte
48be005fa3
Merge branch 'master' into pr/430
2014-01-11 23:32:50 -05:00
Clinton N. Dreisbach
3907c5bc53
Added docs for unquote and unquote-splice
2014-01-11 23:29:48 -05:00
Clinton N. Dreisbach
18c19043c7
Add note about underscore/dash shadowing
2014-01-11 09:58:47 -05:00
Abhishek L
64772addce
Merge master onto pr/429
2014-01-11 09:42:26 +05:30
Paul Tagliamonte
cc2f45be69
slice is amazing, @olasd is amazing, I love everything.
2014-01-10 22:50:20 -05:00
Paul Tagliamonte
110476901c
Fix a few typos in the tests. Thanks again, @olasd
2014-01-10 22:31:00 -05:00
Paul Tagliamonte
0f74b1ddf3
Add handling for (for []). Nice catch, @olasd.
2014-01-10 22:29:20 -05:00
Paul Tagliamonte
abd0669911
add test for new for logic.
2014-01-10 22:16:35 -05:00
Paul Tagliamonte
2167c21120
Adjust (for) to just use itertools.product
...
This is to avoid nesting in for loops, helping make clear
what (break) and (else) do.
This commit is hereby dedicated to @nedbat
2014-01-10 22:00:30 -05:00
Paul Tagliamonte
c0a654e6cb
Add callgraph stuff. Slick look.
2014-01-10 21:03:19 -05:00
Clinton N. Dreisbach
977b47d3b4
Noted that args are optional with apply
2014-01-10 16:14:20 -05:00
Clinton N. Dreisbach
c03e798356
Added docs for apply
2014-01-10 16:09:56 -05:00
Clinton N. Dreisbach
849244f3b4
Make first and rest fns instead of macros
...
car and cdr are still macros, but I'd recommend either making them
fns or removing them.
2014-01-10 13:46:31 -05:00
Nicolas Dandrimont
5017e3c211
Add documentation for the attribute access DSL
2014-01-09 18:36:24 +02:00
Nicolas Dandrimont
78f6301e27
Add tests for the attribute access DSL
2014-01-09 03:35:32 +01:00
Nicolas Dandrimont
d18e752d33
Implement the . attribute access DSL
...
This fixes #399
2014-01-09 03:34:53 +01:00
Paul Tagliamonte
d4357fe35c
Add @kenanb's logo to the docs. It's so amazing.
...
Thanks so much! Read more at:
http://www.kenanb.com/posts/Hy-Programming-Language-Logo.html
2014-01-08 20:51:17 -05:00
Berker Peksag
3736b25c2d
Merge pull request #420 from Foxboron/readme-fix
...
Fixed readthedocs links and updated the quickstart URL
2014-01-07 19:04:24 -08:00
Foxboron
3279cd9719
fixed readthedocs links and updated the quickstart URL
2014-01-08 03:53:02 +01:00
Will Kahn-Greene
0999886d35
Update quickstart.rst
...
Nixing the float: left inducing thing so that it looks better
on RTD.
2014-01-06 17:13:04 -05:00