예제 #1
0
        private void SetContext(BooScript script)
        {
            errors = null;
            if (script.Errors != null)
            {
                errors = new ScriptError[script.Errors.Count];
                for (int i = 0; i < errors.Length; i++)
                {
                    errors[i] = new ScriptError(script.Errors[i].LexicalInfo, script.Errors[i].Message);
                    editor.MarkerAdd(errors[i].Line, 0);
                }
            }
            warnings = null;
            if (script.Warnings != null)
            {
                warnings = new ScriptError[script.Warnings.Count];
                for (int i = 0; i < warnings.Length; i++)
                {
                    warnings[i] = new ScriptError(script.Warnings[i].LexicalInfo, script.Warnings[i].Message);
                }
            }

            editor.Update();
        }