public bool GetTokenType(out EnumTokenTypes val) { val = EnumTokenTypes.Unkown; if (Properties.ContainsKey(EnumTokenProperties.TokenType)) { val = (EnumTokenTypes)Properties[EnumTokenProperties.TokenType]; return(true); } throw new TokenAccessException(this, "Failed on accessing TokenType property."); return(false); }
private bool CheckMov(Token[] tkns, EnumTokenTypes type1, EnumTokenTypes type2) { if (tkns.Length == 3) { EnumTokenTypes token1Type; EnumTokenTypes token2Type; if (tkns[1].GetTokenType(out token1Type) && tkns[2].GetTokenType(out token2Type)) { if (token1Type == type1 && token2Type == type2) { return(true); } } } return(false); }