Hi Patrick,

My intention was to do 5 -- do keyword recognition *after* determining
in which context the identifier should be parsed. In module context,
nothing will be a keyword, so vec and str will be perfectly valid
module names.

In import statements, the parser will assume that there are never any
keywords. Thus 'import std::str' works, even though str is not
unambiguously a module. It is impossible to export str in a type
context (since it'd be recognized as a type keyword if you try to), so
this is safe -- either a suitable str module or value will be found
during resolution, or you'll get a resolve error.

Best,
Marijn
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to