diff libinterp/parse-tree/pt-classdef.h @ 26718:9b0335f4bc74

revise naming of the parts of a superclass reference * token.h, pt-classdef.h: Use m_method_name instead of m_method_or_object_name. Change accessors and all uses to match.
author John W. Eaton <jwe@octave.org>
date Mon, 11 Feb 2019 20:49:48 +0000
parents 581d01526b34
children 946c6f117091
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-classdef.h	Sun Feb 10 08:41:15 2019 -0800
+++ b/libinterp/parse-tree/pt-classdef.h	Mon Feb 11 20:49:48 2019 +0000
@@ -47,10 +47,9 @@
 
     tree_superclass_ref (void) = delete;
 
-    tree_superclass_ref (const std::string& meth_or_obj,
-                         const std::string& cls, int l = -1, int c = -1)
-      : tree_expression (l, c), m_method_or_object_name (meth_or_obj),
-        m_class_name (cls)
+    tree_superclass_ref (const std::string& meth, const std::string& cls,
+                         int l = -1, int c = -1)
+      : tree_expression (l, c), m_method_name (meth), m_class_name (cls)
     { }
 
     // No copying!
@@ -59,9 +58,9 @@
 
     tree_superclass_ref& operator = (const tree_superclass_ref&) = delete;
 
-    std::string method_or_object_name (void) const
+    std::string method_name (void) const
     {
-      return m_method_or_object_name;
+      return m_method_name;
     }
 
     std::string class_name (void) const { return m_class_name; }
@@ -77,7 +76,12 @@
 
   private:
 
-    std::string m_method_or_object_name;
+    // The name of the method to call.  This is the text before the
+    // "@" and may be of the form "object.method".
+    std::string m_method_name;
+
+    // The name of the superclass.  This is the text after the "@"
+    // and may be of the form "object.method".
     std::string m_class_name;
   };