Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial parsing work * parse trait declarations * import statements * clean lexer tree; support method calls * basic ast skeleton beginnings * begin ast work * checkpoint while i swap computers * more ast parsing * more ast parsing * ast: function appl, func decl, var exp * ast: literals * add compiler binary with nice error messages * ast: return statements, use statements * fix error message * ast: traits * more friendly parse error messages * old email * semicolons! * byte literals; fix tests * parse binary and hex literals for byte and bytes32 * refactor expression parsing * parse array exprs * parse operator expressions * type ascriptions * parser: polymorphism and trait bounds * default to u64 instead of u32 * begin work on match statements * parse structs * refactor * a few program examples; parse match statements * lex struct expressions * parse to AST struct expressions * compile warnings! * assert_or_warn macro * generic struct parameters * parse contract/script/predicate * improve top level failure error message * s/ast/parse_tree * enums * begin semantic analysis * begin work on type checking, inferencing, and semantics checking (FuelLabs#11) * begin work on type checking, inferencing, and semantics checking * fmt * WIP; laptop dying * match branch types * wip type code blocks * build failure * operator parsing; no precedence * compile fn * run compile instead of parse from hllc * begin trait declarations in ast * return statements in AST * allow code blocks * handle implicit returns in code blocks * type checking is taking shape * generic type checking * return multiple errors * proper operator precedence * add fn params to namespace when typechecking * contextual error messages * remove todo panics * toml update * small error msg tweak * Refactor error and warning handling (FuelLabs#12) * begin refactor of error/warnings * finish refactor * type check predicates * limit number of script main functions * parse generic types for traits * grammar for reassignments and while loops * variable reassignments; while loops * check generic type params in function declarations * fix tests * grammar for inline asm * Asm expressions (FuelLabs#13) * begin implementing asm expressions * WIP asm parsing * fix up spans; unused value warning * progress on trait impl * impl traits * big refactor * fix asm op parsing error * parsing for method applications * struct expressions and declarations: type inference * WIP subfield exprs * subfield expressions * baaasic method invocations * impl self; better struct declarations * begin package manager work * begin work on package manager * WIP checkpoint * forc build MVP implemenation * dependency resolution v1 * Namespace refactor (FuelLabs#22) * begin namespace refactor * move all hashmaps to namespace type * compiles imported dependencies * method not found error * resolve some warnings * fix Self type in trait implementations * fix all warnings * fix todo error messages * introduce differentiation between generic and struct types * refactor struct expression typing to use declarations * fix lack of self type in trait implementation * refactor typed expressions * fix impl self namespace bug * fix implicit return typechecking bug * re-introduce function applications * type check function return statements * remove hllc * fix only last expr having type annotation; if branch enforcement of having an else * Control flow analysis + more (FuelLabs#28) * begin documentation of control flow analysis algorithm * begin graph construction * begin graph construction * generate graphs; further control flow work * some improvements in control flow; still need to wire up imports into the control flow graph * control flow graph improvements * fix up implicit return printing in control flow graph * organize graph code * find dead code * unreachable code warnings * parse unit type as type info * start enum expressions * fix enum lookup bug * type check all enum instantiations * Resolved types (FuelLabs#29) * begin swappnig over to resolved types * progress in refactore * progress on converting types * progress in switching to resolved types * progress in switching to resolved types * finalize refactor to resolved types * remove unused type variants * fix tests * enum variant construction code analysis * resolve warnings * missing enum instantiator error * trait declarations control flow * fix trait type mismatch error message * individual method dead code warnings * fix method call bug * respect public visibility modifiers; control flow analysis on libraries * add public traits * move ident file * begin analysis on return paths * refactor of files * begin work on analyzing return paths * basic return path graph construction done * documentation * Return path analysis (FuelLabs#30) * begin analysis on return paths * refactor of files * begin work on analyzing return paths * basic return path graph construction done * documentation * fix code block type parsing * control flow analysis on if and code blocks * struct fields in graph * individual struct field warnings * add line_col method for errors and warnings * Generate Assembly (FuelLabs#31) * begin generating assembly * add unique registers counter to asm expressions * sketch out asm generation with todo! macros everywhere * begin while loop assembly * rework compile fn for asm * have to commit to save my progress as i boot into windows for fortnite * make progress in expression generation * WIP: return statements * asm expressions and asm refactor * very basic bytecode compilation * first asm! * ASM: While loops and reassignments * remove subsequent jumps * reuse data section values for duplicate literals * struct expressions * fix SW order * stashing checkpoint * forgotten add * asm for enum instantiations * if expression assembly generation * code block asm generation * remove TODO in code analysis * remove some panics * remove a bunch of todo panics Co-authored-by: Alexander Hansen <[email protected]> * move license; clean warnings * Update forc/src/cli/build.rs Co-authored-by: John Adler <[email protected]> * Update forc/src/cli/build.rs Co-authored-by: John Adler <[email protected]> * code review feedback * Update forc/src/manifest.rs Co-authored-by: John Adler <[email protected]> * Update parser/src/control_flow_analysis/analyze_return_paths.rs Co-authored-by: John Adler <[email protected]> * more PR feedback * rename parser to core_lang * add minimum supported version * Update README.md Co-authored-by: John Adler <[email protected]> * check that struct size in words fits in a u32 gracefully * forgotten import Co-authored-by: Alexander Hansen <[email protected]> Co-authored-by: John Adler <[email protected]>
- Loading branch information