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§
- Archive
Member - An AST node for $ast
- Archive
Members - An AST node for $ast
- Conditional
- An AST node for $ast
- Identifier
- An AST node for $ast
- Include
- An AST node for $ast
- Makefile
- An AST node for $ast
- Parse
- The result of parsing: a syntax tree and a collection of errors.
- Parse
Error - An error that occurred while parsing a makefile
- Rule
- An AST node for $ast
- Variable
Definition - An AST node for $ast
Enums§
- Error
- An error that can occur when parsing a makefile
- Lang
- these two SyntaxKind types, allowing for a nicer SyntaxNode API where
“kinds” are values from our
enum SyntaxKind, instead of plain u16 values. - Makefile
Item - Represents different types of items that can appear in a Makefile
- Makefile
Variant - The variant of makefile being parsed
- Rule
Item - Represents different types of items that can appear in a Rule’s body
- Syntax
Kind