Commit Graph

1714 Commits

Author SHA1 Message Date
greg
4fccff5e27 Working on improved proc_macro handling 2018-09-27 04:07:42 -07:00
greg
e934d7bdc5 Update syn, quote libs 2018-09-26 01:41:58 -07:00
greg
de199e785a Update versions 2018-09-26 01:33:19 -07:00
greg
81ac918a59 Add some type annos to make this easier 2018-09-25 13:44:06 -07:00
greg
5d4505241a get rid of completed todo 2018-09-22 00:26:38 -07:00
greg
f67793308e Part of the work for a doc handler 2018-09-22 00:24:27 -07:00
greg
693766fa59 Proc macros are stable now 2018-09-21 19:46:31 -07:00
greg
f9f29dd0dd Move repl stuff to separate file 2018-09-21 19:43:50 -07:00
greg
3c1823510f use get_cur_language() 2018-09-21 19:32:39 -07:00
greg
92078ef7d8 Add :doc interpreter directive 2018-09-21 19:25:58 -07:00
greg
1abbe2e448 Add guard to Alternative
The semantics are:
    -if tag is Some(_), assume the condition is a constructor,
    and compare tags
    - if guard is Some(_), evaluate true/false *after* having
    applied any bound variables

With this, I can technically get rid of bare conditionals now, since
they are the same as an Alternative with a None tag
2018-08-27 12:45:08 -07:00
greg
065bdd6bda Starting custom operators
Can now parse custom operators. Maybe I want to make it so that you
have to put explicit backticks if you define a custom operator,
currently you can just do: fn +() { .. }
2018-08-24 16:49:59 -07:00
greg
e125e8b440 Add spaceship operator for getting an ord 2018-08-24 16:29:28 -07:00
greg
8565c7dfb3 Some work on reduced ast pattern 2018-08-24 16:04:18 -07:00
greg
f885d5dfb6 Remove type alias 2018-08-22 23:22:08 -07:00
greg
b85725125c Start using HalfExp 2018-08-22 16:41:31 -07:00
greg
2d961d6402 Fix other pattern parsing bugs 2018-08-21 20:02:10 -07:00
greg
fa7b6ce96b Handle negatives in patterns correctly 2018-08-21 19:57:45 -07:00
greg
5c9180efc2 Some updates to Schala source files 2018-08-20 19:03:55 -07:00
greg
1d5e5aa735 Some type renaming in builtins
Builtins will remain entirely separate from the actual type
representation, whatever that ends up being
2018-08-19 22:00:20 -07:00
greg
2c298c7247 Add warning for undefined operator
In practice this will probably always not typecheck, but it's a valid
parse
2018-08-19 21:40:30 -07:00
greg
f00fee0e37 Rename StateStack -> ScopeStack 2018-08-19 21:31:45 -07:00
greg
0d13b5e3bc Preliminary support for binops in if-discriminators
The BNF grammar is a bit more liberal than any successfully-compiled
schala program should be, in that it allows things like `if x < is
pattern`. It's okay if that parses successfully and then is an error at
typechecking.
2018-08-19 21:25:07 -07:00
greg
98f597f00a Implement comparison operators correctly 2018-08-19 21:11:43 -07:00
greg
fb71881409 Refactor binop parsing 2018-08-19 20:33:50 -07:00
greg
d1c3b4a81b Starting on halfexprs / binops 2018-08-19 18:44:54 -07:00
greg
f9181b5786 use expr_or_block where appropriate 2018-08-19 15:58:31 -07:00
greg
0e914cf057 Error message for parsing guards 2018-08-19 15:12:34 -07:00
greg
04ea8c5ebc More unused code removal 2018-08-19 15:06:01 -07:00
greg
492ef4ae19 Clear up some unused code to reduce compile noise
And add some notes to the README
2018-08-19 15:03:41 -07:00
greg
75a7a4499d Added some more cases to the match handling 2018-08-19 10:53:43 -07:00
greg
99e6668c9a Add rusty-tags to .gitignore 2018-08-18 23:28:06 -07:00
greg
1d38a07cf8 Add timing debugging print 2018-08-16 01:47:21 -07:00
greg
0fa844bcf9 Print timing in debug info 2018-08-16 01:43:42 -07:00
greg
97bee58fbe More work with guards 2018-08-15 22:34:04 -07:00
greg
34c2b43371 More work on if matching 2018-08-15 18:32:44 -07:00
greg
88b617de52 More atlernatives work 2018-08-15 11:44:55 -07:00
greg
482674b19a Start on expr_or_block
WIP doesn't work yet
2018-08-15 09:34:00 -07:00
greg
a72b387ceb Remove some more dead code warnings 2018-08-14 23:19:27 -07:00
greg
864e932e9f Getting rid of more unused items 2018-08-14 23:09:11 -07:00
greg
d7e73be44c Getting rid of some unused warnings 2018-08-14 23:07:00 -07:00
greg
6a548c9086 Keep track of durations of each pipeline stage 2018-08-14 22:56:22 -07:00
greg
0c0690e86e Provide error message here 2018-08-14 21:53:57 -07:00
greg
6d18f80185 Use Result in test 2018-08-14 21:46:48 -07:00
greg
6825de3916 new_frame -> new_scope 2018-08-14 21:45:45 -07:00
greg
1b78fbff82 Tests for basic pattern matching 2018-08-14 21:39:33 -07:00
greg
897c1181a9 Basic pattern matching working 2018-08-14 21:17:43 -07:00
greg
6833bc4f00 Start on CaseMatch eval 2018-08-14 12:43:06 -07:00
greg
f2ded78776 ReducedAST: Match -> CaseMatch
makes it easier to grep for
2018-08-14 12:37:18 -07:00
greg
9debdd8d66 Primitive tuple 2018-08-14 02:03:05 -07:00