Crate makefile_lossless
source ·Expand description
A lossless parser for Makefiles
Example:
use std::io::Read;
let contents = r#"PYTHON = python3
.PHONY: all
all: build
build:
$(PYTHON) setup.py build
"#;
let makefile: makefile_lossless::Makefile = contents.parse().unwrap();
assert_eq!(makefile.rules().count(), 3);
Structs
Enums
- Let’s start with defining all kinds of tokens and composite nodes.