internal: start isolating ssr-related parsing APIs to SSR

This commit is contained in:
Aleksey Kladov 2021-12-27 19:44:45 +03:00
parent 634c7682c9
commit b468bd6645
10 changed files with 44 additions and 45 deletions

View file

@ -201,13 +201,6 @@ impl ast::Item {
}
}
impl ast::Type {
/// Returns `text`, parsed as an type reference, but only if it has no errors.
pub fn parse(text: &str) -> Result<Self, ()> {
parsing::parse_text_as(text, parser::ParserEntryPoint::Type)
}
}
impl ast::Attr {
/// Returns `text`, parsed as an attribute, but only if it has no errors.
pub fn parse(text: &str) -> Result<Self, ()> {

View file

@ -95,15 +95,6 @@ fn item_parser_tests() {
);
}
#[test]
fn type_parser_tests() {
fragment_parser_dir_test(
&["parser/fragments/type/ok"],
&["parser/fragments/type/err"],
crate::ast::Type::parse,
);
}
#[test]
fn stmt_parser_tests() {
fragment_parser_dir_test(