Ejemplo n.º 1
0
        /// <summary>
        ///   Validates the syntax of the script.
        /// </summary>
        /// <returns><lang langref="true" /> if the script syntax is valid; <lang langref="false" /> otherwise.</returns>
        public bool ValidateSyntax()
        {
            string stdout;
            var    errors = ScriptCompiler.CheckSyntax(cedEditor.Text, out stdout);

            return(errors == null);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///   Checks the syntax of the script.
        /// </summary>
        protected void CheckSyntax()
        {
            string stdout;
            var    errors = ScriptCompiler.CheckSyntax(cedEditor.Text, out stdout);

            if (errors != null)
            {
                MessageBox.Show(errors);
            }
            else
            {
                MessageBox.Show("No errors found");
            }
        }