Rename Full -> FullAst

This commit is contained in:
Joshua Warner 2024-08-10 13:20:54 -07:00
parent 3f7f1891f3
commit 0abea91796
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
9 changed files with 17 additions and 17 deletions

View file

@ -7,7 +7,7 @@ use roc_error_macros::{internal_error, user_error};
use roc_fmt::def::fmt_defs;
use roc_fmt::header::fmt_header;
use roc_fmt::Buf;
use roc_parse::ast::{Full, SpacesBefore};
use roc_parse::ast::{FullAst, SpacesBefore};
use roc_parse::header::parse_module_defs;
use roc_parse::remove_spaces::RemoveSpaces;
use roc_parse::{header, parser::SyntaxError, state::State};
@ -231,7 +231,7 @@ pub fn format_src(arena: &Bump, src: &str) -> Result<String, FormatProblem> {
Ok(buf.as_str().to_string())
}
fn parse_all<'a>(arena: &'a Bump, src: &'a str) -> Result<Full<'a>, SyntaxError<'a>> {
fn parse_all<'a>(arena: &'a Bump, src: &'a str) -> Result<FullAst<'a>, SyntaxError<'a>> {
let (header, state) = header::parse_header(arena, State::new(src.as_bytes()))
.map_err(|e| SyntaxError::Header(e.problem))?;
@ -239,7 +239,7 @@ fn parse_all<'a>(arena: &'a Bump, src: &'a str) -> Result<Full<'a>, SyntaxError<
let defs = parse_module_defs(arena, state, defs)?;
Ok(Full {
Ok(FullAst {
header: SpacesBefore {
before: header.before,
item: h,
@ -248,7 +248,7 @@ fn parse_all<'a>(arena: &'a Bump, src: &'a str) -> Result<Full<'a>, SyntaxError<
})
}
fn fmt_all<'a>(buf: &mut Buf<'a>, ast: &'a Full) {
fn fmt_all<'a>(buf: &mut Buf<'a>, ast: &'a FullAst) {
fmt_header(buf, &ast.header);
fmt_defs(buf, &ast.defs, 0);