Merge branch 'master' into interpreter

This commit is contained in:
Svyatoslav Nikolsky
2017-05-10 13:09:37 +03:00
14 changed files with 282 additions and 15 deletions

View File

@ -55,19 +55,23 @@ pub struct ExportEntry {
}
impl ExportEntry {
/// Create new export entry
/// New export entry
pub fn new(field: String, internal: Internal) -> Self {
Self {
ExportEntry {
field_str: field,
internal: internal,
internal: internal
}
}
/// Public name
pub fn field(&self) -> &str { &self.field_str }
/// Public name (mutable)
pub fn field_mut(&mut self) -> &mut str { &mut self.field_str }
/// Internal reference of the export entry.
pub fn internal(&self) -> &Internal { &self.internal }
/// Internal reference of the export entry (mutable).
pub fn internal_mut(&mut self) -> &mut Internal { &mut self.internal }
}