mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
remove Attempting and more
This commit is contained in:
parent
98024b2a21
commit
5e4db62c46
6 changed files with 46 additions and 136 deletions
|
@ -7,8 +7,8 @@ use crate::header::{
|
|||
use crate::ident::{lowercase_ident, unqualified_ident, uppercase_ident};
|
||||
use crate::parser::Progress::{self, *};
|
||||
use crate::parser::{
|
||||
backtrackable, end_of_file, specialize, word1, Col, EEffects, EExposes, EHeader, EImports,
|
||||
EPackages, EProvides, ERequires, ETypedIdent, Parser, Row, State, SyntaxError,
|
||||
backtrackable, specialize, word1, Col, EEffects, EExposes, EHeader, EImports, EPackages,
|
||||
EProvides, ERequires, ETypedIdent, Parser, Row, State, SyntaxError,
|
||||
};
|
||||
use crate::string_literal;
|
||||
use crate::type_annotation;
|
||||
|
@ -249,6 +249,16 @@ fn platform_header<'a>() -> impl Parser<'a, PlatformHeader<'a>, EHeader<'a>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn end_of_file<'a>() -> impl Parser<'a, (), SyntaxError<'a>> {
|
||||
|_arena, state: State<'a>| {
|
||||
if state.has_reached_end() {
|
||||
Ok((NoProgress, (), state))
|
||||
} else {
|
||||
Err((NoProgress, SyntaxError::ConditionFailed, state))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn module_defs<'a>() -> impl Parser<'a, Vec<'a, Located<Def<'a>>>, SyntaxError<'a>> {
|
||||
use crate::parser::EExpr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue