Пример #1
0
        public static AssignmentNode Parse(AstTreeNode lastNode, ScriptToken scriptToken, List <ScriptToken> tokens)
        {
            if (!(lastNode is IScopeMemberNode))
            {
                Console.WriteLine("Invalid assignment syntax.");
                return(null);
            }
            tokens.RemoveAt(0); // consume =
            List <ScriptToken> assignmentTokens = ScriptTree.GetStatementTokens(tokens, false);

            return(new AssignmentNode(
                       (IScopeMemberNode)lastNode,
                       ScriptTree.ProcessTokens(assignmentTokens)
                       ));
        }