1
0
Fork 0
Commit Graph

30 Commits

Author SHA1 Message Date
Ishan Jain ae69fa9bb7 Add LICENSE 2020-01-21 15:33:22 +00:00
Ishan Jain b0cbe5d4f7 Fixed all warnings reported by clippy 2020-01-20 19:46:51 +05:30
Ishan Jain f3f50eed47 Updated REPL loop to print back string-ified AST. Parser Complete! 2020-01-20 18:12:08 +05:30
Ishan Jain 0833ba3448 Completed Let/Return Statement parser
1. Completed Expression parsing in Let/Return Statement Parsers
2. Removed most of the TODOs
3. Added more tests
2020-01-20 17:38:58 +05:30
Ishan Jain a1c316a43e Added more tests for call expression parser 2020-01-20 16:57:19 +05:30
Ishan Jain 8ec7ec1ba1 Added Call Expressions
1. Added Call Expressions
2. Refactored Boolean/Prefix/Infix parse functions
3. Added tests to support Call Expressions parser
2020-01-20 16:14:26 +05:30
Ishan Jain 8536d0defa Added Function Literal parser
1. Added function literal parser.
2. Replaced all ToString impls with fmt::Display Impls.
3. Fixed few issues in existing fmt::Display impls.
4. Refactored Expression parsers
5. Added more tests to support new changes
2020-01-20 14:45:21 +05:30
Ishan Jain 44506cf591 Added If and IfElse parser
1. Added If and IfElse expression parsers.
2. Also, Added asserts to ensure there are 0 errors in parser object
2020-01-19 23:20:17 +05:30
Ishan Jain 9763c5ca2e Added Boolean Expression parser along with tests 2020-01-19 21:45:11 +05:30
Ishan Jain 2293c442eb Bug fixes and completed prefix and infix expression parser
1. Changed names of some variants of TokenType.
2. Implemented std::fmt::Display and std::string::ToString for some
   types
3. Added Infix and Prefix expressions parser
4. Added tests to ensure correctness of added parsers
2020-01-19 19:57:53 +05:30
Ishan Jain 203ebb169b Working on parser
1. Added Identifier Expression parser
2. Added Prefix IntegerLiteral Parser
2020-01-12 00:03:18 +05:30
Ishan Jain 2fd6c9ca6d Working on parser
1. Implemented ToString on AST nodes that'll allow convert
AST back to source code in tests and help with ensuring correctness
2. Locked Rust toolchain to a specific version
2020-01-11 23:26:52 +05:30
Ishan Jain e6e1be2e00 Working on parser. It can parse return statements and log errors now 2019-12-25 23:07:39 +05:30
Ishan Jain 5ac3b5e29a Fixed Parser, Can parse Let statements now 2019-12-25 17:55:15 +05:30
Ishan Jain 631c2d8b1a Added Integer Literal Parser
1. Added Integer Literal Parser
2. Removed Unused imports.
3. Fixed issues reported by Clippy
2019-09-13 01:08:09 +05:30
Ishan Jain 2863ad8aa4 Refactor and added identifier expression parser
1. Refactor Lexer::Token to Lexer::Token + Lexer::TokenType.
2. Added From/TryFrom on Lexer::Literal.
3. Added ExpressionStatement Parser
4. Added From<String> for ParseError.
5. Added prefix_parse_fn and infix_parse_fn table.
6. Added parse_expression
7. Added tests
8. Fixed lint issues reported by Clippy
2019-09-12 22:49:57 +05:30
Ishan Jain 77ecd6e3dd Back to using enum in AST 2019-09-09 15:04:59 +05:30
Ishan Jain 68330a8156 Refactored parser back to using traits rather than enum, Added gitignore, Added return statement 2019-09-09 00:44:27 +05:30
Ishan Jain 98023fe219 Refactored again, Fixed most warnings, Removed unused code 2019-09-08 00:17:08 +05:30
Ishan Jain 5bd49acb67 Refactored again, let statement parser, Except for the expression parser is complete 2019-09-07 20:30:31 +05:30
Ishan Jain 20a4907153 Added let statement parser 2019-09-07 19:32:44 +05:30
Ishan Jain 142b34edc4 Refactored again, Compiles now. 2019-09-07 01:16:52 +05:30
Ishan Jain f202d0dacd Resuming project. Refactored project 2019-08-31 01:28:20 +05:30
Ishan Jain 7409606f3d Committing and saving work done on the parser 2019-04-14 16:45:40 +05:30
Ishan Jain 9c018d2fe2 Added REPL 2019-02-05 14:27:20 +05:30
Ishan Jain 420db45c76 Added == and != along with tests 2019-02-04 23:38:22 +05:30
Ishan Jain c0efc2c316 Refactored lexer
1. Changed input from Vec<u8> to Peekable<Chars>
2. Refactored methods implemented on lexer
2019-02-04 19:57:41 +05:30
Ishan Jain f31e4bfee1 Added true,false,return,if,else keywords, Single character tokens, tests
and change Vec<char> to Vec<u8>
2019-02-04 17:16:17 +05:30
Ishan Jain 561c4c6089 Added NULL, RBrace, LBrace tokens 2019-02-04 11:10:36 +05:30
Ishan Jain c84e73756f Initial commit. Working on lexer 2019-01-14 00:39:27 +05:30