Define functions anywhere during parsing.

This commit is contained in:
Stephen Chung
2020-07-06 22:57:50 +08:00
parent a2c0554f3c
commit 2b3f10f2c5
2 changed files with 156 additions and 109 deletions

View File

@@ -54,7 +54,7 @@ pub struct FnPtr(ImmutableString);
impl FnPtr {
/// Create a new function pointer.
pub(crate) fn new<S: Into<ImmutableString>>(name: S) -> Self {
pub(crate) fn new_unchecked<S: Into<ImmutableString>>(name: S) -> Self {
Self(name.into())
}
/// Get the name of the function.