aboutsummaryrefslogtreecommitdiffstats
path: root/parser.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-02-24 08:50:28 -0500
committerClyne Sullivan <clyne@bitgloo.com>2023-02-24 08:50:28 -0500
commitdac0553eb5a4bd7b8b6ce408c18bd4d2779e094f (patch)
tree724997dd683bfa6adef88e47ca4446f869374dcd /parser.hpp
parent81b2fa5d3c270a377504eb5002f0168fc02fd2ff (diff)
remove ParseStatus; reduce stack usage
Diffstat (limited to 'parser.hpp')
-rw-r--r--parser.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/parser.hpp b/parser.hpp
index ccd5647..8a322e2 100644
--- a/parser.hpp
+++ b/parser.hpp
@@ -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