public static bool AcceptAssignment(Dictionary<string, Expression> Variables, string Text, ref int Index, ref string Name, ref Expression Value, out int ErrorIndex)
{
ErrorIndex = Index;
int cur = Index;
if (AcceptWord(Text, ref cur, ref Name))
{
AcceptExtendedWhitespace(Text, ref cur);
if (AcceptString("=", Text, ref cur))
{
AcceptExtendedWhitespace(Text, ref cur);
if (AcceptExpression(Variables, Text, ref cur, ref Value, out ErrorIndex))
{
AcceptExtendedWhitespace(Text, ref cur);
if (AcceptString(";", Text, ref cur))
{
Index = cur;
return true;
}
}
}
}
return false;
}