Add StateID; remove TransitionResult

This commit is contained in:
josh committed 2023-07-08 16:46:38 -04:00
1 parent 0a7938038b
commit ffd02c16d1
2 files changed
+33 -44

No files matched your search

+17
View File
@@ -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