-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 (#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 (#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 (#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 (#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 (#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 (#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 (#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 * added ignore vscode local settings * added forc commands and restructured files * format code * ignore node modules * added syntax highlighting in vscode-forc * rename to snippets * change to fume * added fume-server as a member * updated .gitignore with ts files * added vscode client * update package.json * added initial fume-server * add line_col method for errors and warnings * adding capabilities * installed ropey * update to new structure * perform diagnostic * added text_document * remove unused * cargo fmt * clean up * introduce better document state managment * added hover and completion * fixed ranges * added semantic tokens, go to defnition * remove other go_tos * clean up * update merging with master * added clear names * move to token references * rename to get_diagnostics * fix master conflicts * make public fields * use core_lang instead of parser * adjust to new parse result * update plugin start instructions * fix typo * clear both lines and values hashmaps * remove unused enum fields * move settings.json ignore to git/info/exclude * re-added appache license * added MANIFEST_FILE_NAME * formatted toml files * fromatted launch.json * add static values for token types * format * fix typo Co-authored-by: Alex <[email protected]> Co-authored-by: Alex Hansen <[email protected]>
- Loading branch information
1 parent
605a426
commit 66bac57
Showing
75 changed files
with
4,193 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[workspace] | ||
|
||
members = ["core_lang", "forc", "test_suite"] | ||
members = ["core_lang", "forc", "test_suite", "fume-server"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
[package] | ||
name = "forc" | ||
version = "0.1.0" | ||
authors = ["Alex Hansen <[email protected]>"] | ||
edition = "2018" | ||
name = "forc" | ||
rust = "1.50" | ||
|
||
version = "0.1.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
core_lang = { path = "../core_lang" } | ||
structopt = "0.3" | ||
core_lang = {path = "../core_lang"} | ||
line-col = "0.2" | ||
pest = "2.1" | ||
serde = {version = "1.0", features = ["derive"]} | ||
source-span = "2.4" | ||
termcolor = "1.1" | ||
line-col = "0.2" | ||
toml = "0.5" | ||
serde = { version = "1.0", features = ["derive"] } | ||
whoami = "1.1" | ||
pest = "2.1" | ||
structopt = "0.3" | ||
termcolor = "1.1" | ||
toml = "0.5" | ||
whoami = "1.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use structopt::{self, StructOpt}; | ||
|
||
#[derive(Debug, StructOpt)] | ||
pub(crate) struct Command {} | ||
|
||
pub(crate) fn exec(command: Command) -> Result<(), String> { | ||
todo!() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use structopt::{self, StructOpt}; | ||
|
||
#[derive(Debug, StructOpt)] | ||
pub(crate) struct Command {} | ||
|
||
pub(crate) fn exec(command: Command) -> Result<(), String> { | ||
todo!() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use structopt::{self, StructOpt}; | ||
|
||
use crate::ops::forc_build; | ||
#[derive(Debug, StructOpt)] | ||
pub(crate) struct Command { | ||
#[structopt(short = "p")] | ||
pub path: Option<String>, | ||
} | ||
|
||
pub(crate) fn exec(command: Command) -> Result<(), String> { | ||
forc_build::build(command.path) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use structopt::{self, StructOpt}; | ||
|
||
#[derive(Debug, StructOpt)] | ||
pub(crate) struct Command {} | ||
|
||
pub(crate) fn exec(command: Command) -> Result<(), String> { | ||
todo!() | ||
} |
Oops, something went wrong.