Crate makefile_lossless

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§

ArchiveMember
An AST node for $ast
ArchiveMembers
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.
ParseError
An error that occurred while parsing a makefile
Rule
An AST node for $ast
VariableDefinition
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.
MakefileItem
Represents different types of items that can appear in a Makefile
MakefileVariant
The variant of makefile being parsed
RuleItem
Represents different types of items that can appear in a Rule’s body
SyntaxKind