summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2004/i/nono/src/config/config.cc7
-rw-r--r--2004/i/nono/src/config/config.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/2004/i/nono/src/config/config.cc b/2004/i/nono/src/config/config.cc
index ea726c6..01e3960 100644
--- a/2004/i/nono/src/config/config.cc
+++ b/2004/i/nono/src/config/config.cc
@@ -156,6 +156,13 @@ Config::isId (const char *s)
return strcmp (config_yylval.id, s) == 0;
}
+bool
+Config::isId (void)
+{
+ if (m_type == -1) m_type = config_yylex ();
+ return m_type == ID;
+}
+
// Lance une erreur, on a pas trouvé ce qu'on voulais.
void
Config::noId (void)
diff --git a/2004/i/nono/src/config/config.h b/2004/i/nono/src/config/config.h
index 4187223..6064a87 100644
--- a/2004/i/nono/src/config/config.h
+++ b/2004/i/nono/src/config/config.h
@@ -66,6 +66,7 @@ class Config
void getEof (void);
// Vérifie si le prochain token est...
bool isId (const char *s);
+ bool isId (void);
/// Récupère la valeur associée à un identificateur \a id. Retourne \c
/// false si l'identificateur ne correspond pas, lance une exception si il
/// n'y a pas d'identificateur.