Wrap FunctionName in a newtype struct.

Function names display differently than normal strings since they need
quotes and escaping.

Move the FunctionName type into its own module.
This commit is contained in:
Jakob Stoklund Olesen
2016-09-19 14:52:48 -07:00
parent 6fb566fa85
commit 388154e06b
7 changed files with 91 additions and 59 deletions

View File

@@ -52,7 +52,7 @@ impl Function {
/// Create a new empty, anomymous function.
pub fn new() -> Function {
Self::with_name_signature(FunctionName::new(), Signature::new())
Self::with_name_signature(FunctionName::default(), Signature::new())
}
/// Get the signature of this function.