Remove uses of 'short' and 'long'

This commit is contained in:
Max Brunsfeld 2014-03-09 22:58:17 -07:00
parent 632a88c8ef
commit 39cb420df2
3 changed files with 4 additions and 4 deletions

View file

@ -51,7 +51,7 @@ namespace tree_sitter {
std::set<rules::CharacterSet> expected_inputs() const;
};
typedef long int LexStateId;
typedef int64_t LexStateId;
class LexTable {
public:

View file

@ -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<ParseState> states;

View file

@ -21,7 +21,7 @@ namespace tree_sitter {
}
size_t Symbol::hash_code() const {
return hash<string>()(name) ^ hash<short int>()(type);
return hash<string>()(name) ^ hash<int16_t>()(type);
}
rule_ptr Symbol::copy() const {