Move comma_terminates global to parser_state
[deliverable/binutils-gdb.git] / gdb / parser-defs.h
index 6fb0f8e5533503f292089ee5b080736d2c455d21..f2bb18fd9c74ab8a2bf9a87c2232d633721a72da 100644 (file)
@@ -88,10 +88,12 @@ struct parser_state : public expr_builder
   parser_state (const struct language_defn *lang,
                struct gdbarch *gdbarch,
                const struct block *context_block,
-               CORE_ADDR context_pc)
+               CORE_ADDR context_pc,
+               int comma)
     : expr_builder (lang, gdbarch),
       expression_context_block (context_block),
-      expression_context_pc (context_pc)
+      expression_context_pc (context_pc),
+      comma_terminates (comma)
   {
   }
 
@@ -108,6 +110,10 @@ struct parser_state : public expr_builder
      at, and then look up the macro definitions active at that
      point.  */
   const CORE_ADDR expression_context_pc;
+
+  /* Nonzero means stop parsing on first comma (if not within parentheses).  */
+
+  int comma_terminates;
 };
 
 /* When parsing expressions we track the innermost block that was
@@ -355,10 +361,6 @@ extern const char *lexptr;
 /* After a token has been recognized, this variable points to it.
    Currently used only for error reporting.  */
 extern const char *prev_lexptr;
-
-/* Nonzero means stop parsing on first comma (if not within parentheses).  */
-
-extern int comma_terminates;
 \f
 /* These codes indicate operator precedences for expression printing,
    least tightly binding first.  */
This page took 0.029 seconds and 4 git commands to generate.