summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/pattern.cpp2
-rw-r--r--src/parse/tokentree.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/parse/pattern.cpp b/src/parse/pattern.cpp
index cd73c378..53c0cfe8 100644
--- a/src/parse/pattern.cpp
+++ b/src/parse/pattern.cpp
@@ -224,7 +224,7 @@ AST::Pattern Parse_PatternReal1(TokenStream& lex, bool is_refutable)
{
auto dt = tok.datatype();
// TODO: Ensure that the type is ANY or a signed integer
- return AST::Pattern( AST::Pattern::TagValue(), lex.end_span(ps), AST::Pattern::Value::make_Integer({dt, -tok.intval()}) );
+ return AST::Pattern( AST::Pattern::TagValue(), lex.end_span(ps), AST::Pattern::Value::make_Integer({dt, ~tok.intval() + 1}) );
}
else if( tok.type() == TOK_FLOAT )
{
diff --git a/src/parse/tokentree.hpp b/src/parse/tokentree.hpp
index 3d6e63de..1a751225 100644
--- a/src/parse/tokentree.hpp
+++ b/src/parse/tokentree.hpp
@@ -46,7 +46,7 @@ public:
bool is_token() const {
return m_tok.type() != TOK_NULL;
}
- unsigned int size() const {
+ size_t size() const {
return m_subtrees.size();
}
const TokenTree& operator[](unsigned int idx) const { assert(idx < m_subtrees.size()); return m_subtrees[idx]; }