diff options
author | Adrian Thurston <thurston@colm.net> | 2018-03-09 22:00:13 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2018-03-09 22:05:02 -0500 |
commit | 2efdd395cd3b1cee4ee6cb00ec31c4d3e06df64c (patch) | |
tree | 0f7f826cf910daceb607e617fb0164d359ea14d9 /src/exports.cc | |
parent | 45c895e7cf7c1bde0aa5b4d863c3c6c088604c70 (diff) | |
download | colm-2efdd395cd3b1cee4ee6cb00ec31c4d3e06df64c.tar.gz |
allow switching on production numbers
Added a form to case statements that accepts a production name instead of a
pattern.
Diffstat (limited to 'src/exports.cc')
-rw-r--r-- | src/exports.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/exports.cc b/src/exports.cc index fa4946a6..6b9e2858 100644 --- a/src/exports.cc +++ b/src/exports.cc @@ -132,15 +132,15 @@ void Compiler::generateExports() bool prodNames = false; for ( LelDefList::Iter prod = lel->defList; prod.lte(); prod++ ) { - if ( prod->name.length() > 0 ) + if ( prod->_name.length() > 0 ) prodNames = true; } if ( prodNames ) { out << " enum prod_name {\n"; for ( LelDefList::Iter prod = lel->defList; prod.lte(); prod++ ) { - if ( prod->name.length() > 0 ) - out << "\t\t" << prod->name << " = " << prod->prodNum << ",\n"; + if ( prod->_name.length() > 0 ) + out << "\t\t" << prod->_name << " = " << prod->prodNum << ",\n"; } out << " };\n"; out << " enum prod_name prodName() " << |