diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-24 08:50:28 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-24 08:50:28 -0500 |
commit | dac0553eb5a4bd7b8b6ce408c18bd4d2779e094f (patch) | |
tree | 724997dd683bfa6adef88e47ca4446f869374dcd /parser.hpp | |
parent | 81b2fa5d3c270a377504eb5002f0168fc02fd2ff (diff) |
remove ParseStatus; reduce stack usage
Diffstat (limited to 'parser.hpp')
-rw-r--r-- | parser.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -26,12 +26,14 @@ class Parser { public: - ParseStatus parse(State&, std::string_view&); + constexpr static int UnknownWord = -1; + + int parse(State&, std::string_view&); private: - ParseStatus parseSource(State&); - ParseStatus parseWord(State&, Word); - ParseStatus parseNumber(State&, Word); + int parseSource(State&); + int parseWord(State&, Word); + int parseNumber(State&, Word); }; #endif // ALEEFORTH_PARSER_HPP |