Skip to content

Commit 1b57f07

Browse files
committed
Process lalrpop in cargo's target directory
1 parent cb0b6a8 commit 1b57f07

File tree

4 files changed

+3
-11
lines changed

4 files changed

+3
-11
lines changed

parser/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

parser/build.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
use lalrpop;
22

33
fn main() {
4-
lalrpop::Configuration::new()
5-
.generate_in_source_tree()
6-
.process()
7-
.unwrap();
4+
lalrpop::process_root().unwrap()
85
}

parser/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#[macro_use]
22
extern crate log;
3+
use lalrpop_util::lalrpop_mod;
34

45
pub mod ast;
56
pub mod error;
67
mod fstring;
78
pub mod lexer;
89
pub mod parser;
9-
#[cfg_attr(rustfmt, rustfmt_skip)]
10-
mod python;
10+
lalrpop_mod!(python);
1111
pub mod token;

parser/src/python.lalrpop

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// See also: https://github.com/antlr/grammars-v4/blob/master/python3/Python3.g4
33
// See also: file:///usr/share/doc/python/html/reference/compound_stmts.html#function-definitions
44
// See also: https://greentreesnakes.readthedocs.io/en/latest/nodes.html#keyword
5-
#![allow(unknown_lints,clippy)]
65

76
use std::iter::FromIterator;
87

0 commit comments

Comments
 (0)