mallardwriter: Rearrange definitions to match scanner order
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 9 Jan 2013 07:20:55 +0000 (02:20 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 9 Jan 2013 08:16:13 +0000 (03:16 -0500)
giscanner/mallardwriter.py

index fe4307a..8c228ce 100644 (file)
@@ -236,6 +236,9 @@ class MallardFormatter(object):
 
         return self.format_xref(type_)
 
+    def _process_fundamental(self, node, match, props):
+        return self.fundamentals.get(props['fundamental'], match)
+
     def _process_function_call(self, node, match, props):
         func = self._resolve_symbol(props['symbol_name'])
         if func is None:
@@ -243,9 +246,6 @@ class MallardFormatter(object):
 
         return self.format_xref(func)
 
-    def _process_fundamental(self, node, match, props):
-        return self.fundamentals.get(props['fundamental'], match)
-
     def _process_token(self, node, tok):
         kind, match, props = tok
 
@@ -254,8 +254,8 @@ class MallardFormatter(object):
             'property': self._process_property,
             'signal': self._process_signal,
             'type_name': self._process_type_name,
-            'function_call': self._process_function_call,
             'fundamental': self._process_fundamental,
+            'function_call': self._process_function_call,
         }
 
         return dispatch[kind](node, match, props)