mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-01 02:42:17 +00:00
Allow dots in import module names
We found some issues with the private submodules part of the proposal [1], and we decided to keep module directories for now. [1] https://docs.google.com/document/d/1E_77fO-44BtoBtXoVeWyGh1xN2KRTWTu8q6i25RNNx0/edit#heading=h.x84bh32l37em
This commit is contained in:
parent
b56f029a09
commit
3217e5a3f0
18 changed files with 109 additions and 52 deletions
|
@ -12,6 +12,7 @@ use crate::ident::{
|
|||
integer_ident, lowercase_ident, parse_ident, unqualified_ident, uppercase_ident, Accessor,
|
||||
Ident,
|
||||
};
|
||||
use crate::module::module_name_help;
|
||||
use crate::parser::{
|
||||
self, backtrackable, byte, byte_indent, increment_min_indent, line_min_indent, optional,
|
||||
reset_min_indent, sep_by1, sep_by1_e, set_min_indent, specialize_err, specialize_err_ref, then,
|
||||
|
@ -957,7 +958,7 @@ fn imported_module_name<'a>() -> impl Parser<'a, ImportedModuleName<'a>, EImport
|
|||
specialize_err(|_, pos| EImport::PackageShorthand(pos), lowercase_ident()),
|
||||
byte(b'.', EImport::PackageShorthandDot)
|
||||
)),
|
||||
name: specialize_err(|_, pos| EImport::ModuleName(pos), uppercase_ident()),
|
||||
name: module_name_help(EImport::ModuleName)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue