1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

New declaration "%define initializer-suffix".

This commit is contained in:
Bruno Haible
2003-04-30 10:36:10 +00:00
parent 5fbcad1840
commit ff0be60810
6 changed files with 39 additions and 4 deletions

View File

@@ -486,6 +486,11 @@ Input::read_input ()
option.set_slot_name (arg);
else
if (is_define_declaration (line, line_end, lineno,
"initializer-suffix", &arg))
option.set_initializer_suffix (arg);
else
if (is_define_declaration (line, line_end, lineno,
"hash-function-name", &arg))
option.set_hash_name (arg);

View File

@@ -593,7 +593,7 @@ Options::set_function_name (const char *name)
_function_name = name;
}
/* Set the keyword key name, if not already set. */
/* Sets the keyword key name, if not already set. */
void
Options::set_slot_name (const char *name)
{
@@ -601,6 +601,14 @@ Options::set_slot_name (const char *name)
_slot_name = name;
}
/* Sets the struct initializer suffix, if not already set. */
void
Options::set_initializer_suffix (const char *initializers)
{
if (_initializer_suffix == DEFAULT_INITIALIZER_SUFFIX)
_initializer_suffix = initializers;
}
/* Sets the generated class name, if not already set. */
void
Options::set_class_name (const char *name)

View File

@@ -171,11 +171,13 @@ public:
/* Returns the keyword key name. */
const char * get_slot_name () const;
/* Set the keyword key name, if not already set. */
/* Sets the keyword key name, if not already set. */
void set_slot_name (const char *name);
/* Returns the struct initializer suffix. */
const char * get_initializer_suffix () const;
/* Sets the struct initializer suffix, if not already set. */
void set_initializer_suffix (const char *initializers);
/* Returns the generated class name. */
const char * get_class_name () const;