mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Provide support for retaining the version number found in a config file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15995 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c0e9bec9fc
commit
59a745a26f
@ -89,6 +89,7 @@ namespace llvm {
|
|||||||
|
|
||||||
struct ConfigData {
|
struct ConfigData {
|
||||||
ConfigData();
|
ConfigData();
|
||||||
|
std::string version; ///< The version number.
|
||||||
std::string langName; ///< The name of the source language
|
std::string langName; ///< The name of the source language
|
||||||
StringTable opts; ///< The o10n options for each level
|
StringTable opts; ///< The o10n options for each level
|
||||||
Action PreProcessor; ///< PreProcessor command line
|
Action PreProcessor; ///< PreProcessor command line
|
||||||
|
@ -181,6 +181,18 @@ namespace {
|
|||||||
error("Expecting '='");
|
error("Expecting '='");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void parseVersion() {
|
||||||
|
if (next() == EQUALS) {
|
||||||
|
while (next_is_real()) {
|
||||||
|
if (token == STRING || token == OPTION)
|
||||||
|
confDat->version = ConfigLexerState.StringVal;
|
||||||
|
else
|
||||||
|
error("Expecting a version string");
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
error("Expecting '='");
|
||||||
|
}
|
||||||
|
|
||||||
void parseLang() {
|
void parseLang() {
|
||||||
switch (next() ) {
|
switch (next() ) {
|
||||||
case NAME:
|
case NAME:
|
||||||
@ -357,6 +369,7 @@ namespace {
|
|||||||
|
|
||||||
void parseAssignment() {
|
void parseAssignment() {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
|
case VERSION: parseVersion(); break;
|
||||||
case LANG: parseLang(); break;
|
case LANG: parseLang(); break;
|
||||||
case PREPROCESSOR: parsePreprocessor(); break;
|
case PREPROCESSOR: parsePreprocessor(); break;
|
||||||
case TRANSLATOR: parseTranslator(); break;
|
case TRANSLATOR: parseTranslator(); break;
|
||||||
|
Loading…
Reference in New Issue
Block a user