Skip to content

Commit

Permalink
fix format before merge
Browse files Browse the repository at this point in the history
  • Loading branch information
NTTVy03 committed Dec 13, 2024
1 parent fbdc5b9 commit 07c4171
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/parser/src/grammar/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::*;

pub fn block(p: &mut Parser) {
p.inc_rcurly();

if !p.at(LCurly) {
p.advance_with_error("Miss {");
} else {
Expand Down
2 changes: 1 addition & 1 deletion crates/parser/src/grammar/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::grammar::*;
// fucntion name()
pub fn function_parse(p: &mut Parser) {
let m = p.open();

p.expect(FunctionKw);

let fn_name_marker = p.open();
Expand Down
2 changes: 1 addition & 1 deletion crates/parser/src/grammar/include.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::*;

pub(super) fn include(p: &mut Parser) {
// assert!(p.at(IncludeKw));

let m = p.open();
p.expect(IncludeKw);
p.expect(CircomString);
Expand Down
2 changes: 1 addition & 1 deletion crates/parser/src/grammar/main_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ component main {public [signal_list]} = tempid(v1,...,vn);
pub fn main_component(p: &mut Parser) {
p.expect(ComponentKw);
p.expect(MainKw);

if p.at(LCurly) {
p.expect(LCurly);
p.expect(PublicKw);
Expand Down
2 changes: 1 addition & 1 deletion crates/parser/src/grammar/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub fn template(p: &mut Parser) {
let m = p.open();

p.expect(TemplateKw);

let name_marker = p.open();
p.expect(Identifier);
p.close(name_marker, TemplateName);
Expand Down
5 changes: 2 additions & 3 deletions crates/syntax/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub mod abstract_syntax_tree;
pub mod syntax;
pub mod syntax_node;

pub mod abstract_syntax_tree;

mod test_programs;
mod test_programs;
3 changes: 1 addition & 2 deletions crates/syntax/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ mod tests {

let syntax = SyntaxTreeBuilder::syntax_tree(source);


if let Some(ast) = AstCircomProgram::cast(syntax) {
if let Some(ast) = AstCircomProgram::cast(syntax) {
check_ast_children(&ast, &expected_kinds, &expected_ranges);

// check pragma
Expand Down
1 change: 0 additions & 1 deletion crates/syntax/src/test_programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,3 @@ pub const PARSER_TEST_6: &str = r#"
/* T _ T */
template Multiplier2 () {}
"#;

0 comments on commit 07c4171

Please sign in to comment.