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
- 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
- Second, implementing the
Languagetrait teaches rowan to convert between these two SyntaxKind types, allowing for a nicer SyntaxNode API where “kinds” are values from ourenum SyntaxKind, instead of plain u16 values. - Syntax
Kind