Skip to content

Commit c84c3f2

Browse files
committed
Rename YaccParser::finish() to build
1 parent 265b152 commit c84c3f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cfgrammar/src/lib/yacc/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl ASTWithValidityInfo {
2929
let (yacc_kind, ast) = {
3030
let mut yp = YaccParser::new(yacc_kind_resolver, s.to_string());
3131
yp.parse().map_err(|e| errs.extend(e)).ok();
32-
let (yacc_kind, mut ast) = yp.finish();
32+
let (yacc_kind, mut ast) = yp.build();
3333
if yacc_kind.is_some() {
3434
ast.complete_and_validate().map_err(|e| errs.push(e)).ok();
3535
}

cfgrammar/src/lib/yacc/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ impl YaccParser {
466466
Ok(i)
467467
}
468468

469-
pub(crate) fn finish(self) -> (Option<YaccKind>, GrammarAST) {
469+
pub(crate) fn build(self) -> (Option<YaccKind>, GrammarAST) {
470470
(self.yacc_kind, self.ast)
471471
}
472472

@@ -1139,7 +1139,7 @@ mod test {
11391139
fn parse(yacc_kind: YaccKind, s: &str) -> Result<GrammarAST, Vec<YaccGrammarError>> {
11401140
let mut yp = YaccParser::new(YaccKindResolver::Force(yacc_kind), s.to_string());
11411141
yp.parse()?;
1142-
Ok(yp.finish().1)
1142+
Ok(yp.build().1)
11431143
}
11441144

11451145
fn rule(n: &str) -> Symbol {

0 commit comments

Comments
 (0)