Merge pull request #110 from AleoHQ/fix/doc-bugs

Fix/doc bugs
This commit is contained in:
Collin Chin 2020-07-16 01:09:33 -07:00 committed by GitHub
commit c85a8e1595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 8 deletions

View File

@ -45,8 +45,9 @@ fn precedence_climber() -> PrecClimber<Rule> {
PrecClimber::new(vec![
Operator::new(Rule::operation_or, Assoc::Left),
Operator::new(Rule::operation_and, Assoc::Left),
Operator::new(Rule::operation_eq, Assoc::Left) | Operator::new(Rule::operation_ne, Assoc::Left),
Operator::new(Rule::operation_ge, Assoc::Left)
Operator::new(Rule::operation_eq, Assoc::Left)
| Operator::new(Rule::operation_ne, Assoc::Left)
| Operator::new(Rule::operation_ge, Assoc::Left)
| Operator::new(Rule::operation_gt, Assoc::Left)
| Operator::new(Rule::operation_le, Assoc::Left)
| Operator::new(Rule::operation_lt, Assoc::Left),

View File

@ -9,10 +9,26 @@ file = { SOI ~ NEWLINE* ~ import* ~ NEWLINE* ~ circuit* ~ NEWLINE* ~ function_de
// Declared in common/identifier.rs
identifier = @{ ((!protected_name ~ ASCII_ALPHA) | (protected_name ~ (ASCII_ALPHANUMERIC | "_"))) ~ (ASCII_ALPHANUMERIC | "_")* }
protected_name = {
"for"| "if" | "else" | "as" | "return"
| declare | mutable | static_ | value_boolean
| type_array | type_data
| macro_name | macro_symbol
"address"
| "as"
| "circuit"
| "const"
| "else"
| "false"
| "field"
| "for"
| "function"
| "group"
| "if"
| "import"
| "in"
| "let"
| "mut"
| "return"
| "static"
| "string"
| "test"
| "true"
}
// Declared in common/line_end.rs

View File

@ -55,7 +55,10 @@ impl CLI for BuildCommand {
lib_file_path.push(LIB_FILE_NAME);
// Compile the library file but do not output
let _program = Compiler::<Fq, EdwardsGroupType>::new_from_path(package_name.clone(), lib_file_path)?;
let _program =
Compiler::<Fq, EdwardsGroupType>::new_from_path(package_name.clone(), lib_file_path.clone())?;
log::info!("Compiled library file {:?}", lib_file_path);
};
// Compile the main.leo file along with constraints
@ -109,7 +112,7 @@ impl CLI for BuildCommand {
log::debug!("Checksum saved ({:?})", path);
}
log::info!("Compiled program in {:?}", main_file_path);
log::info!("Compiled program file {:?}", main_file_path);
return Ok(Some((program, checksum_differs)));
}