public void Reformat() { if (EditPropertiesForm.Run(ReformatProps, true)) { string sql = m_editor.Text; ISqlParser parser = m_dialect.CreateParser(sql); try { var code = parser.ParseCommand(); if (!parser.Tokernizer.IsEof) { throw new ParseError("DAE-00294 EOF expected"); } string res = m_dialect.GenerateScript(code.GenerateSql, ReformatProps); m_editor.SetCodeText(res, true); } catch (Exception err) { Errors.Report(err); } } }
public static ISqlParser CreateParser(this ISqlDialect dialect, string data) { return(dialect.CreateParser(dialect.CreateTokenizer(data))); }
public virtual ISqlParser CreateParser(ISqlTokenizer tokenizer) { return(m_dialect.CreateParser(tokenizer)); }