#![allow(clippy::tabs_in_doc_comments)] #![deny(missing_docs)]
mod ast;
mod incremental;
mod lex;
mod lossless;
mod parse;
mod pattern;
mod text;
pub use ast::makefile::MakefileItem;
pub use ast::rule::RuleItem;
pub use incremental::{apply_edit_to_text, TextEdit};
pub use lossless::{
ArchiveMember, ArchiveMembers, Conditional, Error, ErrorInfo, Identifier, Include, Lang,
Makefile, ParseError, PositionedParseError, Rule, VariableDefinition, VariableReference,
};
pub use parse::Parse;
pub use rowan::TextRange;
pub use text::{is_in_prerequisites, variable_at_offset, word_at_offset};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum MakefileVariant {
GNUMake,
BSDMake,
NMake,
POSIXMake,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[allow(non_camel_case_types)]
#[repr(u16)]
#[allow(missing_docs)]
pub enum SyntaxKind {
IDENTIFIER = 0,
INDENT,
TEXT,
WHITESPACE,
NEWLINE,
DOLLAR,
LPAREN,
RPAREN,
LBRACE,
RBRACE,
QUOTE,
BACKSLASH,
COMMA,
OPERATOR,
COMMENT,
ERROR,
ROOT, RULE, RECIPE, VARIABLE, EXPR, TARGETS, PREREQUISITES, PREREQUISITE,
CONDITIONAL, CONDITIONAL_IF, CONDITIONAL_ELSE, CONDITIONAL_ENDIF, INCLUDE,
ARCHIVE_MEMBERS, ARCHIVE_MEMBER,
BLANK_LINE, }
impl From<SyntaxKind> for rowan::SyntaxKind {
fn from(kind: SyntaxKind) -> Self {
Self(kind as u16)
}
}