mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-26 03:33:44 +03:00
commit
c85a8e1595
@ -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),
|
||||
|
@ -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
|
||||
|
@ -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)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user