Add CONSTANT block support for modcc (#825)
Addresses #824. * Add modcc support for `CONSTANT` blocks in NMODL, subject to the following constraints: - Any identifier declared in the `CONSTANT` block may only be used after that declaration (including within the `CONSTANT` block itself). - Units in the `CONSTANT` block are parsed but not processed. - Values assigned to identifiers inside the `CONSTANT` block may only be signed numeric literals, or an already declared constant, possibly preceded by unary minus.
Showing
- modcc/parser.cpp 83 additions, 3 deletionsmodcc/parser.cpp
- modcc/parser.hpp 3 additions, 0 deletionsmodcc/parser.hpp
- modcc/token.cpp 2 additions, 0 deletionsmodcc/token.cpp
- modcc/token.hpp 1 addition, 1 deletionmodcc/token.hpp
- test/unit-modcc/test_parser.cpp 51 additions, 0 deletionstest/unit-modcc/test_parser.cpp
- test/unit-modcc/test_printers.cpp 38 additions, 0 deletionstest/unit-modcc/test_printers.cpp
Please register or sign in to comment