greg
1b60bd38ff
Add codegen crate for schala-lang
2018-10-17 15:29:32 -07:00
greg
3b20b9e209
Put schala-lang crates into a subdirectory
2018-10-17 14:51:48 -07:00
greg
de0e150536
Fix if-block parsing to handle newlines
2018-10-17 13:44:29 -07:00
greg
baf51fb147
Boolean patterns
2018-10-17 12:43:09 -07:00
greg
dc9e493fa1
Handle more patterns at reduce_ast level
2018-10-16 17:18:03 -07:00
greg
d57a8045a9
Rename test helper
2018-10-16 04:11:18 -07:00
greg
50d5176b45
Fix bug add test
2018-10-16 04:10:28 -07:00
greg
501eaeee87
Implement numeric pattern matching
2018-10-16 03:54:08 -07:00
greg
8619c94217
Start handling numeric patterns
...
Still need to add eval support for this
2018-10-16 01:38:41 -07:00
greg
fc7c86be1a
nonterminal() constructor function
2018-10-15 21:46:27 -07:00
greg
77e0d639c2
Make repl mod structure more complex
2018-10-15 20:52:34 -07:00
greg
9927a6b1fd
Implement custom interpreter directives - and a wtf?
...
See the comment about &mut self vs &self
2018-10-15 20:29:23 -07:00
greg
e8dfc2be34
Refactor codegen some
2018-10-15 20:14:56 -07:00
greg
abe2db25b2
full if matching working with basic patterns
2018-10-15 19:54:17 -07:00
greg
a99a5f10a4
Indicate index explicitly in SymbolTable debug
2018-10-15 19:37:02 -07:00
greg
c52bc65bb9
Change NonTerminal format
2018-10-02 01:37:43 -07:00
greg
819c422cee
Start making CommandTree abstraction include implementation
2018-10-02 00:46:23 -07:00
greg
1c11fec803
Move hardcoded string file names into vars
2018-10-01 20:53:41 -07:00
greg
a5c3c383dc
Reduce some String clones
2018-10-01 20:46:58 -07:00
greg
76046b134a
Make timing toggle-able
2018-10-01 02:05:07 -07:00
greg
c24223f28e
Got rid of some old code
2018-09-29 12:46:52 -07:00
greg
79e02b0999
Tightened code some in codegen
2018-09-29 03:23:48 -07:00
greg
80eb703f5e
Finally got get_doc hookup in codegen macro working
2018-09-29 01:20:31 -07:00
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