Commit Graph

1303 Commits

Author SHA1 Message Date
Nicolas Dandrimont
d3fa1fd1a8 Add disassemble function to hy.core.language
This function dumps the AST or the python code generated by evaluating a quoted expression to stdout.

Fixes #58
2014-01-04 03:47:04 +01:00
Paul Tagliamonte
de31aea5d2 Cleanup use of PY3* in the compiler. 2014-01-03 20:02:36 -05:00
Paul Tagliamonte
c5c36e1022 Merge branch 'master' into paultag/bugfix/python3.4
Conflicts:
	bin/hy2py
2014-01-03 19:57:05 -05:00
Paul Tagliamonte
a5b37b7b51 Merge branch 'master' into pr/414 2014-01-03 19:47:27 -05:00
Nicolas Dandrimont
2f7d40b409 Factor the calling-module-name function 2014-01-03 21:41:14 +01:00
Nicolas Dandrimont
a1895f635c reword the four steps a bit 2014-01-03 17:19:06 +01:00
Nicolas Dandrimont
1d5847823b more precise disclaimer 2014-01-03 17:19:06 +01:00
Nicolas Dandrimont
72a300c6e3 Add some documentation about models 2014-01-03 17:19:06 +01:00
Nicolas Dandrimont
9e02eaca26 Whitespace fix 2014-01-03 17:19:06 +01:00
Nicolas Dandrimont
9a128edcb2 Pretty print the AST in hy2py 2014-01-03 17:18:33 +01:00
Bob Tolbert
715158c7db Add a "clean" target to make and make.bat 2014-01-02 11:28:31 +02:00
Paul Tagliamonte
590d3bf1df Clean up compare to use the tuple. Thanks @olasd 2014-01-01 22:33:44 -05:00
Nicolas Dandrimont
f452558f5e Force output encoding of hy2py as utf-8
Fixes hy2py in py34
2014-01-01 22:12:50 -05:00
Bob Tolbert
c213a4e122 Merge pull request #411 from olasd/bugfix/382
Fix handling of comments at end of input
2014-01-01 18:56:04 -08:00
Nicolas Dandrimont
c1d5948d73 Add regression test for #382 2014-01-02 03:13:49 +01:00
Nicolas Dandrimont
a44e53f4de Comments end when the input ends or a newline occurs
This fixes #382, which occured because the REPL doesn't use trailing newlines.
2014-01-02 03:09:18 +01:00
Paul Tagliamonte
1d58e52584 Flake8 style fix. 2014-01-01 19:12:17 -05:00
Paul Tagliamonte
f28bf41f8d Merge branch 'master' of github.com:hylang/hy into paultag/bugfix/python3.4 2014-01-01 18:59:23 -05:00
Paul Tagliamonte
d22a152134 Merge branch 'master' of github.com:hylang/hy into paultag/bugfix/python3.4 2014-01-01 18:58:39 -05:00
Paul Tagliamonte
26e2fb3606 Give a whack at Python 3.4 support
This adds ast.arg for Python 3.4+, for FunctionDef args and other
 args (starargs, kwargs)
2014-01-01 18:56:09 -05:00
Nicolas Dandrimont
77baf3b9f3 Merge branch 'meth-fix' of https://github.com/Willyfrog/hy into Willyfrog-meth-fix
Conflicts:
	tests/__init__.py
2014-01-02 00:53:40 +01:00
Nicolas Dandrimont
74739bc43e Whitespace fix 2014-01-02 00:52:29 +01:00
Nicolas Dandrimont
88451bbeaa Merge branch 'better-macroexpand' of https://github.com/sbp/hy into sbp-better-macroexpand
Conflicts:
	hy/core/language.hy
	tests/native_tests/language.hy
2014-01-02 00:49:40 +01:00
Paul Tagliamonte
575388fc13 Merge branch 'master' into pr/397
Conflicts:
	hy/importer.py
2014-01-01 16:40:16 -05:00
Paul Tagliamonte
8adae9a01f No fox for you. 2014-01-01 12:41:22 -05:00
Paul Tagliamonte
553337080a Adding missing AUTHORs from the git log. Sorry, folks. 2014-01-01 12:39:06 -05:00
Bob Tolbert
032200bcb4 Some small doc fixes
This cleans up a number of doc warnings, including a bad
underline for zero?

While there, added a nil? function to match up with the
new nil is None.

Also un-hid myself from coreteam.
2013-12-31 16:14:05 -07:00
Paul Tagliamonte
dfbdbdfb73 We're 0.9.12 2013-12-31 14:24:50 -05:00
Bob Tolbert
978ededf23 Merge pull request #406 from paultag/paultag/bugfix/im-an-idiot
Paultag/bugfix/im an idiot
2013-12-31 11:12:15 -08:00
Paul Tagliamonte
eeef65b505 Change the signature of (for) and (with).
(for) is restored to clojure-like flatness.
 (with) can be used without the nested list if you don't care about the
        name.

   Tests and examples updated.
2013-12-31 13:35:31 -05:00
Berker Peksag
3774a05d87 Add Kevin Zita to NEWS for 0.9.12. 2013-12-31 19:39:37 +02:00
Paul Tagliamonte
8cabf22749 add news for 0.9.12 2013-12-31 12:04:43 -05:00
Bob Tolbert
faf782560c Fixing tests for new 'for' syntax 2013-12-31 09:56:03 -07:00
Bob Tolbert
05899423df Changing --show_tracebacks to --show-tracebacks 2013-12-31 09:56:03 -07:00
Bob Tolbert
5040c29946 Cleaning up some comments from berker 2013-12-31 09:56:03 -07:00
Bob Tolbert
765dba3e56 More updates, including from Foxboron, for errors like (for) 2013-12-31 09:56:03 -07:00
Foxboron
f064d3f121 Errors into errors.py, added HyMacroExpansionError, fixed macro arg fail 2013-12-31 09:56:03 -07:00
Bob Tolbert
f6160c755a Much better version of new error messages.
This version is much simpler.

At the point that the exception is raised, we don't have access to
the actual source, just the current expression. but as the
exception percolates up, we can intercept it, add the source and
the re-raise it.

Then at the final point, in the cmdline handler, we can choose to
let the entire traceback print, or just the simpler, direct error
message.

And even with the full traceback, the last bit is nicely formatted
just like the shorter, simpler message.

The error message is colored if clint is installed, but to avoid
yet another dependency, you get monochrome without clint.

I'm sure there is a better way to do the markup, the current method
is kludgy but works.

I wish there was more shared code between HyTypeError and LexException
but they are kind of different in some fundamental ways.

This doesn't work (yet) with runtime errors generated from Python,
like NameError, but I have a method that can catch NameError and turn it
into a more pleasing output.

Finally, there is no obvious way to raise HyTypeError from pure Hy code,
so methods in core/language.hy throw ugly TypeError/ValueError.
2013-12-31 09:56:03 -07:00
Paul Tagliamonte
defbe22349 Merge branch 'master' of github.com:hylang/hy 2013-12-31 11:45:19 -05:00
Paul Tagliamonte
e754a58237 Merge branch 'master' into pr/363 2013-12-31 11:41:30 -05:00
Abhishek L
48f916b34f Add myself to authors 2013-12-31 21:58:40 +05:30
Paul Tagliamonte
931ce889f9 s/rply/rpython/ 2013-12-31 11:26:31 -05:00
Bob Tolbert
a5e46fdc04 Merge pull request #402 from paultag/paultag/docs/compiler
Paultag/docs/compiler
2013-12-31 08:25:37 -08:00
Berker Peksag
9b1990901c Fix |Unknown directive type "todo"| error. 2013-12-31 15:51:58 +02:00
Foxboron
426d34288f Added docs and one small bug fix in defreader 2013-12-31 15:46:21 +02:00
Paul Tagliamonte
b011048b41 allow one-shot merge 2013-12-30 18:02:03 -05:00
Paul Tagliamonte
a5b56be83e Merge branch 'master' of github.com:hylang/hy 2013-12-30 17:33:07 -05:00
Paul Tagliamonte
67fd0ddbbe Document the compiler a little. 2013-12-30 17:32:57 -05:00
Bob Tolbert
d7956d03c3 Adding documentation for flatten 2013-12-31 03:49:37 +05:30
Abhishek L
0a80b87b7f Merge branch 'master' onto pr/395 2013-12-31 03:37:26 +05:30