Add "at" operator.

This commit is contained in:
2022-11-05 17:41:54 +08:00
parent 8e3bd87667
commit a422f06221
3 changed files with 35 additions and 13 deletions

View File

@@ -90,6 +90,7 @@ namespace Cryville.Common.Pdt {
}
public partial class PdtInterpreter<T> {
readonly static Dictionary<char, int> OP_PRIORITY = new Dictionary<char, int> {
{ '@', 7 },
{ '*', 6 }, { '/', 6 }, { '%', 6 },
{ '+', 5 }, { '-', 5 },
{ '=', 4 }, { '<', 4 }, { '>', 4 },
@@ -100,6 +101,7 @@ namespace Cryville.Common.Pdt {
{ '$', -1 },
};
readonly static Dictionary<char, int> OP_TYPE = new Dictionary<char, int> {
{ '@', 0 },
{ '*', 0 }, { '/', 0 }, { '%', 0 },
{ '+', 0 }, { '-', 0 },
{ '=', 0 }, { '<', 0 }, { '>', 0 },