Commit graph

23 commits

Author SHA1 Message Date
237dca4b4b Add some character class methods to a Lexable trait for char 2017-05-13 15:37:01 -07:00
1dfdc001b3 Add an error class 2017-05-13 15:26:41 -07:00
b5f76deb98 Add some single token tests for the tokens we have 2017-05-02 21:45:10 -07:00
28e5814101 Check for EOF (aka input.next() -> None) and emit what we have before finishing forever 2017-05-02 21:44:57 -07:00
5fe10fe002 Simplify the resume check -- just use an if 2017-05-02 21:44:01 -07:00
c5b769ff45 A peekable lexer
Use the chars() iterator on &str, with the Peekable wrapper on Iterators, to iterate the input, rather than needing to hold the whole input and do iteration by indexes.
2017-04-30 17:46:42 -07:00
a4282e7760 Blow away the lexer code =o 2017-04-30 16:32:31 -07:00
31c68034a8 Fix a good portion of the build errors in sibillexer (but not all...) 2017-04-30 16:00:51 -07:00
027daf692b lexer::number uses sibiltypes::Object 2017-04-30 15:57:16 -07:00
21263fb2ed Lexer doesn't have a named_char module anymore 2017-04-30 15:57:02 -07:00
a88bf20a23 Derive Eq on lexer::number::Sign 2017-04-30 15:56:49 -07:00
28ba98582a More compact formatting 2017-04-30 15:56:32 -07:00
9183e05891 Add FromChar trait to lexer::char 2017-04-30 15:56:21 -07:00
3ffb694ce1 Move Exact to types::number 2017-04-30 15:55:50 -07:00
fd5df91e27 [lexer,types] Move named_char to types as types/char/names.rs
Move char.rs to be char/mod.rs
2017-04-23 10:41:47 -07:00
5cb66d932f [lexer] Clean up named_char module 2017-04-23 10:02:39 -07:00
a5f88c221d Use Objects for Token values 2017-04-22 15:21:13 -07:00
9f1500c1b6 Improve logging ever so slightly 2017-04-15 18:12:24 -07:00
ddf13f9bae Make Lex less mutable 2017-04-15 18:12:24 -07:00
f9d9a08455 Add a failing test that the lexer finds rational numbers 2017-04-15 10:35:13 -07:00
4f11be1316 Remove a println! 2017-04-15 10:17:50 -07:00
50baf2c118 Make all the lexer tests pass again
Try to make exact numbers if possible...
2017-04-15 09:46:21 -07:00
fc947280ae Move the lexer to its own sibillexer module
Lots of failing tests right now, unfortunately. :(
2017-04-15 09:37:12 -07:00