private void TestKeyword(int readed, string text) { if (readed == 0) { handler.Fail(FMSG.F1); return; } else if (typeMap.Contains(text)) { // ParseType(text); current = new Token(text, TokenType.type, line, row); goto ex2; } IEnumeratorPair <string, TokenType> e1 = ids; while (e1.MoveNext()) { if (e1.Item1 == text) { current = new Token(text, e1.Item2, line, row); goto exit; } } current = new Token(text, TokenType.id, line, row); exit: e1.Reset(); ex2: row += readed; }
private static void InitDefault(ITypeMap inst) { Type[] v1 = primitive; string[] v2 = names; int x = v1.Length; while (--x >= 0) { if (inst.Contains(v2[x]) == false) { inst.Add(v2[x], v1[x]); } } }
public static bool Contains(string name) => Instance.Contains(name);