mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Rename Full -> FullAst
This commit is contained in:
parent
3f7f1891f3
commit
0abea91796
9 changed files with 17 additions and 17 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue