mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Dub make_TOKEN as a public type interface.
* data/c++.m4 (b4_symbol_constructor_declare) (b4_symbol_constructor_define): New empty stubs. (b4_public_types_declare, b4_public_types_define): Use them. * data/lalr1.cc (b4_symbol_constructor_declare) (b4_symbol_constructor_declare_) (b4_symbol_constructor_define_, b4_symbol_constructor_define): Move to... * data/variant.hh: here. Remove the "b4_variant_if" parts, as variant.hh is loaded only if needed. * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and b4_symbol_constructor_declare, as it is now done by b4_public_types_define and b4_public_types_declare.
This commit is contained in:
15
data/c++.m4
15
data/c++.m4
@@ -186,7 +186,7 @@ m4_define([b4_public_types_declare],
|
||||
/// Its token.
|
||||
inline token_type token () const;
|
||||
};
|
||||
]])
|
||||
]b4_symbol_constructor_declare])
|
||||
|
||||
|
||||
# b4_public_types_define
|
||||
@@ -281,7 +281,18 @@ m4_define([b4_public_types_define],
|
||||
};
|
||||
return static_cast<token_type> (yytoken_number_[type]);
|
||||
}
|
||||
]])])
|
||||
]])[]dnl
|
||||
b4_symbol_constructor_define])
|
||||
|
||||
|
||||
# b4_symbol_constructor_declare
|
||||
# b4_symbol_constructor_define
|
||||
# -----------------------------
|
||||
# Declare/define symbol constructors for all the value types.
|
||||
# Use at class-level. Redefined in variant.hh.
|
||||
m4_define([b4_symbol_constructor_declare], [])
|
||||
m4_define([b4_symbol_constructor_define], [])
|
||||
|
||||
|
||||
|
||||
# b4_lhs_value([TYPE])
|
||||
|
||||
Reference in New Issue
Block a user