예제 #1
0
        public MainWindow(IInterpreter theInterpreter, IParserFunction theParserFunction)
        {
            InitializeComponent();

            m_interpreter = theInterpreter;
            m_parserFunction = theParserFunction;

            textSource.Focus();
            m_baseTitle = this.Title + " - ";
            OpenLastIfPossible();

            //textSource.Text = "; This is a comment\nprint(\"Hello World\")";
            //textSource.Text = "; This is a comment\nset(text,\"Hello World\")\nprint(text)";
            //textSource.Text = "; This is a comment\nset(text,\"Hello World\"\nprint(text)";
            //textSource.Text = "; This is a comment\nprint(\"text)";
            //textSource.Text = "; This is a comment\nset(sum,1+1)\nprint(sum)";

            textSource.Text = "; Thi`s is a comment\n:myVar=3+10/2-3\nprint(:myVar)";
            textSource.Text = "; Thi`s is a comment\n:myVar=3+10/2-3\nprint(:myVar)\nprint(3=3)\nprint(3=\"test\")\nprint(3=\"3\")";
            //textSource.Text = "; This is a comment\nprint(3+10/2-3)";

            // Temporary for now.  Long term this would be IoC.
            m_interpreter.Initialize();
        }