Commit Graph

702 Commits

Author SHA1 Message Date
James King
c200b4e3d1 Added HyLambdaListKeyword tokens to the lexer
The name "lambda list keyword" is a historical artifact from the CLHS
and not optimal (http://clhs.lisp.se/Body/26_glo_l.htm).

The name may change at some point.
2013-04-03 10:19:18 -04:00
Paul Tagliamonte
0eeb5321e1 Merge branch 'jd/if-parsing' of git://github.com/jd/hy 2013-04-03 09:00:53 -04:00
Julien Danjou
1c8d21e3de Raises TypeError on bad if statements
This relates to issue #6.

Signed-off-by: Julien Danjou <julien@danjou.info>
2013-04-03 11:25:17 +02:00
Paul R. Tagliamonte
d316a8fde8 covering the new bits 2013-04-02 20:49:42 -04:00
Paul R. Tagliamonte
b1c605cc6a Updating the tests to not break Python 3.x 2013-04-01 23:06:59 -04:00
Paul R. Tagliamonte
fb6ec426e6 Adding in list comprehensions.
Thanks to paroneayea for the syntax brotip.
2013-04-01 22:47:11 -04:00
Paul R. Tagliamonte
b077af9620 more tests 2013-04-01 22:13:45 -04:00
Paul R. Tagliamonte
c4b270a727 test coverage bits 2013-04-01 22:07:05 -04:00
Paul Tagliamonte
025e501b13 cleaning up the tests a bit 2013-04-01 20:00:37 -04:00
Paul Tagliamonte
678ef441e5 Adding in tuple checkingish. 2013-04-01 19:53:04 -04:00
Paul Tagliamonte
6831841699 Adding in some tests for print 2013-04-01 19:51:21 -04:00
Paul Tagliamonte
426c7cd829 Test bad decoration 2013-04-01 19:38:58 -04:00
Christopher Allan Webber
1b60bee8a3 Change all instances of (def foo bar) to (setv foo bar)!
I'm in ur base polluting your language with all my opinions!
2013-04-01 16:51:28 -05:00
Christopher Allan Webber
9416422330 Changing cond to be more common lisp / emacs lisp like
Instead of:
  (cond (condition-1) (body-1)
        (condition-2) (body-2))

We now work like:

  (cond ((condition-1) (body-1)
         (condition-2) (body-2)))
2013-04-01 10:33:45 -05:00
Paul Tagliamonte
0809ef206c undoing that 2013-03-26 19:14:50 -04:00
Paul Tagliamonte
fee6263b85 Trying to double-import to trigger importer bugs 2013-03-26 19:09:42 -04:00
Paul R. Tagliamonte
ccd26205d7 unbreak py3.3? need to re-add with 2013-03-24 10:00:07 -04:00
Paul R. Tagliamonte
dd6a883060 implmenting with 2013-03-24 02:04:44 -04:00
Amrut Joshi
29f8cecf65 Added test for "import as" 2013-03-19 05:46:00 +00:00
Paul R. Tagliamonte
a94831beac add mod operator 2013-03-18 21:46:58 -04:00
Paul R. Tagliamonte
83a9bdc87d adding in rest macros 2013-03-18 19:49:36 -04:00
Paul R. Tagliamonte
a58c813dda adding in a slice operator 2013-03-18 19:47:48 -04:00
Paul R. Tagliamonte
8f6c77831b Adding first' / car' 2013-03-18 16:11:29 -04:00
Paul R. Tagliamonte
4cb4e7384e holy shit it's 2013 2013-03-18 10:27:14 -04:00
Paul R. Tagliamonte
0c1bdde6e3 doh, my bad 2013-03-17 17:51:09 -04:00
Paul R. Tagliamonte
5321703287 testing the double loop 2013-03-17 17:50:18 -04:00
Paul R. Tagliamonte
3c288519ac adding in yielding 2013-03-14 20:55:11 -04:00
Paul R. Tagliamonte
9b32506854 Fixing catch a bit to now force a param. 2013-03-14 09:21:03 -04:00
Paul R. Tagliamonte
b5214fb427 Inline comments. 2013-03-13 21:31:23 -04:00
Paul Tagliamonte
57775a95a6 Fiddling with the threading macro 2013-03-13 10:11:14 -04:00
Paul R. Tagliamonte
7f02210ad1 Testing assoc 2013-03-12 22:07:32 -04:00
Paul R. Tagliamonte
daa6443e7c Adding in a Threading macro (->) 2013-03-12 22:04:51 -04:00
Thomas Mashek
b6eca8dfc0 Earmuff stuff. 2013-03-12 12:46:20 -07:00
Paul R. Tagliamonte
9f057e8c8f Fixing 3.x AST 2013-03-11 20:17:27 -04:00
Paul Tagliamonte
b12e14b96b Adding in CodeMirror stuff. Makin' moves. 2013-03-11 19:14:20 -04:00
Paul R. Tagliamonte
4f856c35d4 adding in dotted notation 2013-03-09 22:04:38 -05:00
Paul R. Tagliamonte
44f5035919 reflowing; docstrings 2013-03-09 21:16:28 -05:00
Paul R. Tagliamonte
4ce12c93a5 adding in kwapply things. 2013-03-09 21:14:30 -05:00
Paul R. Tagliamonte
b1c3a758f9 adding in decorators 2013-03-09 21:01:59 -05:00
Paul R. Tagliamonte
3dba5f7aff futz with name things. 2013-03-09 19:46:32 -05:00
Paul R. Tagliamonte
821ca442aa allowing foo-bar 2013-03-09 18:58:47 -05:00
Paul R. Tagliamonte
0424446d56 adding in noteq 2013-03-09 17:15:56 -05:00
Paul R. Tagliamonte
8a2ba20407 Adding in lambdas. 2013-03-09 15:57:13 -05:00
Paul R. Tagliamonte
aa89c3c98e adding list checks, too 2013-03-09 00:56:13 -05:00
Paul R. Tagliamonte
f97cb5e4cb adding in array access 2013-03-09 00:55:27 -05:00
Paul R. Tagliamonte
5bdebdf5fc adding in a cond macro test. 2013-03-09 00:18:32 -05:00
Paul R. Tagliamonte
ce3e7a2d37 adding in more tests. 2013-03-09 00:01:43 -05:00
Paul R. Tagliamonte
7c7a613c9c adding a bit more coverage 2013-03-08 20:45:19 -05:00
Paul Tagliamonte
abf63fca12 fixing up the tests 2013-03-08 18:46:51 -05:00
Paul Tagliamonte
67b803b99a Breaking things to start again. 2013-03-08 18:18:43 -05:00
Paul R. Tagliamonte
dbd9f0bbf8 Q'plah! 2013-03-07 23:04:20 -05:00
Paul R. Tagliamonte
0b3628bcc3 Adding more compiler coverage. 2013-03-07 23:01:17 -05:00
Paul R. Tagliamonte
3166fec53e Thinking some ideas out. 2013-03-07 22:52:47 -05:00
Paul R. Tagliamonte
b520d3148b Revert "Adding in Quoting bits."
This reverts commit db122f2ec9.

I'm an idjiot.
2013-03-07 21:37:43 -05:00
Paul R. Tagliamonte
db122f2ec9 Adding in Quoting bits. 2013-03-07 21:29:18 -05:00
Paul Tagliamonte
173598d055 add spaceless things 2013-03-07 19:23:11 -05:00
Paul R. Tagliamonte
935ef5424e Add in dicts. 2013-03-06 20:59:45 -05:00
Paul Tagliamonte
863d619e4a cleaning up lexing code 2013-03-06 18:57:21 -05:00
Paul R. Tagliamonte
81d6a6515b adding better native testing 2013-03-05 22:15:45 -05:00
Paul R. Tagliamonte
da234b1d8f adding in thingers. 2013-03-05 22:08:53 -05:00
Paul R. Tagliamonte
de50e9d7a8 shutting up the test file 2013-03-05 21:44:26 -05:00
Paul R. Tagliamonte
37a11247c7 Tweaking the AST. 2013-03-05 21:42:54 -05:00
Paul R. Tagliamonte
7a925b5ee4 futzing with ideas 2013-03-05 20:28:09 -05:00
Paul Tagliamonte
0638cfa187 ideas, ideas. 2013-03-05 18:39:34 -05:00
Paul Tagliamonte
fecf17960d unstaged changes 2013-03-05 09:08:13 -05:00
Paul R. Tagliamonte
4d32dac9ad Moving the compiler stuff around. 2013-03-04 20:40:23 -05:00
Paul Tagliamonte
20805fc7b2 tweaking the ast. 2013-03-04 19:12:57 -05:00
Paul R. Tagliamonte
9e16fb4ca0 Very broken. 2013-03-03 19:40:46 -05:00
Paul R. Tagliamonte
ef9007c229 Futzing about. 2013-03-03 16:26:17 -05:00
Paul R. Tagliamonte
b37d92fe28 better line bits. 2013-03-03 14:03:59 -05:00
Paul R. Tagliamonte
9b58f893cb adding more testing 2013-03-03 13:12:23 -05:00
Paul R. Tagliamonte
a9b5d851b2 Fiddling with more AST testing 2013-03-03 13:10:50 -05:00
Paul R. Tagliamonte
6661d85323 Add some failing tests in. 2013-03-03 11:18:13 -05:00
Paul R. Tagliamonte
f776f5411a docstring update 2013-03-03 00:00:55 -05:00
Paul R. Tagliamonte
b42fdc0bb7 Adding more testing. 2013-03-02 23:47:16 -05:00
Paul R. Tagliamonte
f7ff953f7e Updating states / tests for more stuff. 2013-03-02 21:08:23 -05:00
Paul R. Tagliamonte
1c238d1f4c Adding better testing. 2013-03-02 20:41:57 -05:00
Paul R. Tagliamonte
159151f847 thingthings. like licensing. 2013-03-02 20:24:32 -05:00
Paul R. Tagliamonte
627ae0ffa5 Naming the tests, etc. 2013-03-02 19:48:29 -05:00
Paul R. Tagliamonte
3a630303dc cleanup 2013-03-02 19:45:54 -05:00
Paul R. Tagliamonte
797656b1fd Add some line bits. 2013-03-02 19:41:55 -05:00
Paul R. Tagliamonte
f14ccb6d22 Adding in the Integer bits. 2013-03-02 19:28:10 -05:00
Paul R. Tagliamonte
ea326ee29b Fiddling with the lexing. 2013-03-02 18:40:00 -05:00
Paul R. Tagliamonte
a405b8ef52 Thinking. 2013-03-02 18:03:59 -05:00
Paul R. Tagliamonte
5c6d98a24a Rebuilding. 2013-02-28 22:37:23 -05:00
Paul R. Tagliamonte
84453e75d2 Thinking about a refacotr. 2013-02-28 22:27:20 -05:00
Paul Tagliamonte
f5836da2a5 Kill everything 2013-02-27 19:00:52 -05:00
Matt Fenwick
a264b81e57 test case for lexing a lone string 2013-01-25 14:53:23 +01:00
Gergely Nagy
a7cd70c84a compiler: Make maps and lists able to look up their params
As a neat syntactic sugar, it's very neat if maps and lists are able
to work as if they were functions, and look up their arguments.

This implements just that, by translating (map key) to (index map key)
internally, and (list idx) to (index list idx).

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2013-01-12 00:50:08 +01:00
Paul Tagliamonte
f956b75e4e tests, again 2012-12-23 14:02:47 -05:00
Paul Tagliamonte
472da09f51 fixing the tests 2012-12-22 23:09:08 -05:00
Paul Tagliamonte
4f5bc16508 hacking on stuff. 2012-12-18 09:11:42 -05:00
Paul Tagliamonte
0081d4fdfc Updating for numbers 2012-12-16 21:44:14 -05:00
Paul Tagliamonte
0ec30fd75b Hash-maps from the ballroom 2012-12-16 21:09:11 -05:00
Paul Tagliamonte
03f25f0cbe updating tests 2012-12-15 18:38:34 -05:00
Paul Tagliamonte
a8c17db048 more list tests 2012-12-15 18:24:40 -05:00
Paul Tagliamonte
11fe591d38 testing thinger 2012-12-15 18:24:06 -05:00
Paul Tagliamonte
5975f2c8d6 Adding lists to the lexable things 2012-12-15 18:20:15 -05:00
Paul Tagliamonte
ec06d6af88 cleanup 2012-12-15 17:47:05 -05:00
Paul Tagliamonte
8f20829b08 adding in test for more stuff. 2012-12-15 17:39:10 -05:00
Paul Tagliamonte
457d84e3f7 Adding in better tests & a fix. 2012-12-15 17:31:23 -05:00
Paul Tagliamonte
d9b6fe7d79 Adding in some lexer testing. 2012-12-15 17:22:14 -05:00