diff --git a/src/compiler/lex_table.h b/src/compiler/lex_table.h index 4c7a2d18..c58c21f1 100644 --- a/src/compiler/lex_table.h +++ b/src/compiler/lex_table.h @@ -51,7 +51,7 @@ namespace tree_sitter { std::set expected_inputs() const; }; - typedef long int LexStateId; + typedef int64_t LexStateId; class LexTable { public: diff --git a/src/compiler/parse_table.h b/src/compiler/parse_table.h index 2b73eebf..2c5f6911 100644 --- a/src/compiler/parse_table.h +++ b/src/compiler/parse_table.h @@ -57,13 +57,13 @@ namespace tree_sitter { LexStateId lex_state_id; }; - typedef unsigned long int ParseStateId; + typedef uint64_t ParseStateId; std::ostream& operator<<(std::ostream &stream, const ParseState &state); class ParseTable { public: - size_t add_state(); + uint64_t add_state(); void add_action(ParseStateId state_id, rules::Symbol symbol, ParseAction action); std::vector states; diff --git a/src/compiler/rules/symbol.cc b/src/compiler/rules/symbol.cc index d601396f..d3373dd0 100644 --- a/src/compiler/rules/symbol.cc +++ b/src/compiler/rules/symbol.cc @@ -21,7 +21,7 @@ namespace tree_sitter { } size_t Symbol::hash_code() const { - return hash()(name) ^ hash()(type); + return hash()(name) ^ hash()(type); } rule_ptr Symbol::copy() const {