Tokenize ruleset keys. Remove MotionName.

This commit is contained in:
2022-11-09 14:01:27 +08:00
parent 55efc7a428
commit c33186086c
13 changed files with 153 additions and 112 deletions

View File

@@ -45,6 +45,13 @@ namespace Cryville.Crtr {
_cb(GetOperand(0).AsString());
}
}
public class Identifier : PropOp {
readonly Action<int> _cb;
public Identifier(Action<int> cb) { _cb = cb; }
protected override void Execute() {
_cb(GetOperand(0).AsIdentifier());
}
}
public class Enum<T> : PropOp {
readonly static Dictionary<int, int> _cache = new Dictionary<int, int>();
readonly Action<T> _cb;