From 1bbd1a861eddc51456c0c9524a86f13c4b627595 Mon Sep 17 00:00:00 2001
From: Per Hedbor <ph@opera.com>
Date: Thu, 14 Aug 2014 19:32:06 +0200
Subject: [PATCH] For ease of debugging: Have the "token" field in node_s be
 enum Pike_codes

This helps a lot when developing in the compiler.

Currently only happens when PIKE_DEBUG is enabled.
---
 src/las.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/las.h b/src/las.h
index 63e09cddad..3166091c39 100644
--- a/src/las.h
+++ b/src/las.h
@@ -106,6 +106,10 @@ union node_data
   } integer;
 };
 
+#ifdef PIKE_DEBUG
+#include "opcodes.h"
+#endif
+
 struct node_s
 {
   unsigned INT32 refs;
@@ -118,7 +122,11 @@ struct node_s
   unsigned INT16 tree_info;
   unsigned INT16 pad;
   /* The stuff from this point on is hashed. */
+#ifdef PIKE_DEBUG
+  enum Pike_opcodes token : 16;
+#else
   unsigned INT16 token;
+#endif
   union node_data u;
 };
 
-- 
GitLab