|
c07e6aa99b
|
[types] Make math ops macros even more generic -- implement them for cross types too!
Still need to write tests for this though.
|
2018-09-13 18:08:17 -07:00 |
|
|
9d40cdd995
|
[lexer] Move number integration tests to their own module
|
2018-09-13 07:55:42 -07:00 |
|
|
e7273d6c98
|
[types] Document fields of Frac
|
2018-09-09 11:24:10 -07:00 |
|
|
1b26497d19
|
[types] Move arithmetic ops to a macro 🤯
Sketch out Irr type and implement arithmetic types on it.
|
2018-09-09 11:23:46 -07:00 |
|
|
ce50ab5101
|
[types] Add some tests for pairs
Working on defining a pattern for naming tests so it is easier to see what is testing what.
|
2018-09-09 08:58:14 -07:00 |
|
|
107bb394b7
|
[lexer] Link sibiltypes
|
2018-09-08 16:24:04 -07:00 |
|
|
2120417f76
|
[parser] Add test for longer dotted pair: (ab cd . ef)
|
2018-09-08 16:09:44 -07:00 |
|
|
125fb08f43
|
[types] Add (back) trailing commas
|
2018-09-08 16:06:47 -07:00 |
|
|
c6696c4f8b
|
[parser] Handle dotted pairs!
|
2018-09-08 16:06:23 -07:00 |
|
|
fe271dfd8b
|
[parser] We do not need the return value of pop()
|
2018-09-08 16:05:33 -07:00 |
|
|
9f5165f0aa
|
[lexer] Add expression tests; add explicit_sign to identifier_initials
|
2018-09-08 11:24:46 -07:00 |
|
|
061868d2c2
|
[lexer] Add Quote token
|
2018-09-08 11:16:53 -07:00 |
|
|
30a876a3f9
|
[types] Add test for multiplying Fracs
|
2018-09-07 17:54:24 -07:00 |
|
|
d5e6913197
|
[types] Fix up tests for Frac type
|
2018-09-07 17:50:02 -07:00 |
|
|
5aca4cfbe4
|
[types] Implement Add for Frac
|
2018-09-07 08:48:46 -07:00 |
|
|
a5ed11ea77
|
[types] More operations on Ints and some tests for Frac
Implement Div on Int
Make sure Fracs are reduced when they are produced, plus some error handling if you create a x/0 Frac
|
2018-09-07 08:30:13 -07:00 |
|
|
1aabce4f60
|
[types] Add GCD and LCM to Int; implement Rem on Int
|
2018-09-07 08:14:33 -07:00 |
|
|
45bc366a41
|
[types] Add Frac type
|
2018-09-07 06:59:13 -07:00 |
|
|
34d612a832
|
[lexer] Add state for finding Dots at the beginning of input
This happens to be a valid token by itself and the beginning of a decimal number.
|
2018-09-06 18:07:40 -07:00 |
|
|
15e275513d
|
[lexer] Pass Builders around by reference instead of implicitly Copying
|
2018-09-06 17:21:30 -07:00 |
|
|
9365e51893
|
[lexer] Correctly set line/offset for emitted Lexes
|
2018-09-05 22:18:27 -07:00 |
|
|
8b96eb190c
|
[lexer] Continue on to Digit state after lexing Prefix characters
|
2018-09-05 22:17:18 -07:00 |
|
|
c8de135d2f
|
[lexer] Update failing integer lexing test after fixing #12
|
2018-09-05 17:36:29 -07:00 |
|
|
e139cf0c6b
|
[lexer] Lex and discard whitespace
Closes #12.
|
2018-09-04 20:09:47 -07:00 |
|
|
0bdfc24abd
|
[lexer] Simply some Option logic
|
2018-09-03 19:24:06 -07:00 |
|
|
569fe82c1a
|
[lexer] Identify delimiters and emit numbers
|
2018-09-03 17:20:27 -07:00 |
|
|
853312ce67
|
[lexer] We can lex integers!
|
2018-09-03 17:17:49 -07:00 |
|
|
d272b211ae
|
[lexer] WIP number::Digit state
|
2018-09-03 17:08:07 -07:00 |
|
|
176686b3a7
|
[lexer] Let states handle their own creation in from_char
|
2018-09-03 16:06:52 -07:00 |
|
|
eabc8f98e8
|
[lexer] Add number::Sign state
|
2018-09-03 15:49:13 -07:00 |
|
|
663ae3a9f1
|
[lexer] move char::is_hash() to chars::Lexable
|
2018-09-03 15:48:48 -07:00 |
|
|
dc8f5a7686
|
[lexer] Replace String error messages with Error type
|
2018-09-03 15:30:48 -07:00 |
|
|
def35966eb
|
[lexer] Re-kajigger the states for numbers
|
2018-09-03 15:19:28 -07:00 |
|
|
b759ee4c57
|
[lexer] Add Error::invalid_char constructor
|
2018-09-03 15:18:15 -07:00 |
|
|
469929fb8f
|
[lexer] Make a states::number module
There will be several number-specific states.
|
2018-09-03 14:05:57 -07:00 |
|
|
14ea07e441
|
[lexer] Move Bool state to its own file
|
2018-09-03 12:27:09 -07:00 |
|
|
e339b519de
|
Abort trying to do complex numbers in the DOT graph for now
|
2018-09-03 12:26:01 -07:00 |
|
|
92df0d9cfd
|
[lexer] Attempt to add complex numbers to the DOT graph -- this is dumb
|
2018-09-03 11:46:45 -07:00 |
|
|
fb77e7e203
|
[lexer] Add fractionals and prefix fixes
- Add states to handle fractionals. Easy.
- Add states to properly handle the prefixes. You can have #i#x and #x#i. It
should now reflect that...
|
2018-09-03 11:10:29 -07:00 |
|
|
0b5fb57ba9
|
[lexer] Ignore lexer DOT .pdf output
|
2018-09-03 10:44:23 -07:00 |
|
|
4341268d0d
|
[lexer] DOT graph of lexer states: numbers, bools, and parens so far
|
2018-09-03 10:43:41 -07:00 |
|
|
ebee8c8646
|
[lexer] Add Num token type, which only takes ints for now...
|
2018-09-02 17:24:07 -07:00 |
|
|
0f18569292
|
[lexer] Add (failing) test for integers
|
2018-09-02 17:23:48 -07:00 |
|
|
04f2eb0937
|
[lexer] Remove empty Lexer impl
|
2018-09-02 17:23:32 -07:00 |
|
|
757f943fff
|
[lexer] Oops forgot a return type on Hash::new()
|
2018-09-02 14:05:56 -07:00 |
|
|
7a6c2b91d1
|
[lexer] Bit of code cleanup in Lexer
|
2018-09-02 14:05:35 -07:00 |
|
|
f35fe5fd08
|
[lexer] Implement Hash::new()
|
2018-09-02 13:50:33 -07:00 |
|
|
aa4de7d4bd
|
[lexer] Laying groundwork for lexing numbers...
|
2018-09-01 22:25:40 -07:00 |
|
|
7b6259977f
|
[lexer] Add fail() constructor to StateResult
|
2018-09-01 22:21:21 -07:00 |
|
|
d69c3dbc31
|
[lexer] Obey Rust book recommendation about order of leading lines
|
2018-09-01 22:21:05 -07:00 |
|