Add StateID; remove TransitionResult
This commit is contained in:
1 parent
0a7938038b
commit
ffd02c16d1
2 files changed
+33
-44
No files matched your search
@@ -220,6 +220,23 @@ class Propane
|
||||
[start_rule.ptypename, @grammar.ptypes[start_rule.ptypename]]
|
||||
end
|
||||
|
||||
# Get an unsigned integer type that can hold the given maximum value.
|
||||
#
|
||||
# @param max [Integer]
|
||||
# Maximum value to store.
|
||||
#
|
||||
# @return [String]
|
||||
# Type.
|
||||
def get_type_for(max)
|
||||
if max <= 0xFF
|
||||
"ubyte"
|
||||
elsif max <= 0xFFFF
|
||||
"ushort"
|
||||
else
|
||||
"uint"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user