mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Allow newlines in package entries
This commit is contained in:
parent
cba16b6c3f
commit
6fcdc46c03
1 changed files with 5 additions and 4 deletions
|
@ -23,13 +23,14 @@ use roc_mono::ir::{
|
|||
UpdateModeIds,
|
||||
};
|
||||
use roc_mono::layout::{Layout, LayoutCache, LayoutProblem};
|
||||
use roc_parse::ast::{self, StrLiteral, TypeAnnotation};
|
||||
use roc_parse::ast::{self, ExtractSpaces, StrLiteral, TypeAnnotation};
|
||||
use roc_parse::header::{
|
||||
ExposesEntry, ImportsEntry, PackageEntry, PackageOrPath, PlatformHeader, To, TypedIdent,
|
||||
};
|
||||
use roc_parse::module::module_defs;
|
||||
use roc_parse::parser::{self, ParseProblem, Parser, SyntaxError};
|
||||
use roc_region::all::{Located, Region};
|
||||
use roc_reporting::internal_error;
|
||||
use roc_solve::module::SolvedModule;
|
||||
use roc_solve::solve;
|
||||
use roc_types::solved_types::Solved;
|
||||
|
@ -2605,9 +2606,9 @@ fn parse_header<'a>(
|
|||
let opt_base_package = packages.iter().find(|loc_package_entry| {
|
||||
let Located { value, .. } = loc_package_entry;
|
||||
|
||||
match value {
|
||||
PackageEntry::Entry { shorthand, .. } => shorthand == &existing_package,
|
||||
_ => false,
|
||||
match value.extract_spaces().item {
|
||||
PackageEntry::Entry { shorthand, .. } => shorthand == existing_package,
|
||||
_ => internal_error!(),
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue