(editor)
| 21 | var Pos = CodeMirror.Pos; |
| 22 | |
| 23 | function getKeywords(editor) { |
| 24 | var mode = editor.doc.modeOption; |
| 25 | if (mode === "sql") mode = "text/x-sql"; |
| 26 | return CodeMirror.resolveMode(mode).keywords; |
| 27 | } |
| 28 | |
| 29 | function getText(item) { |
| 30 | return typeof item == "string" ? item : item.text; |