AbeEstrada / atom-format-sql

https://atom.io/packages/format-sql
MIT License
5 stars 4 forks source link

Does not format #13

Open eddy147 opened 8 years ago

eddy147 commented 8 years ago

Open t.sql Put some SQL in there SQL is valid, just run the query, get results Ctrl+Shift+P select format:sql Nothing happens, also no error. Also tried to select the query and do the same.

eddy147 commented 8 years ago

While debugging, I do see an error:

Error: Parse error on line 3: Unexpected 'LITERAL'
    at Object.parseError (C:\Users\eddy.de.boer\.atom\packages\format-sql\node_modules\sql-parser\lib\compiled_parser.js:182:11)
    at Object.parse (C:\Users\eddy.de.boer\.atom\packages\format-sql\node_modules\sql-parser\lib\compiled_parser.js:258:22)
    at Object.exports.parse (C:\Users\eddy.de.boer\.atom\packages\format-sql\node_modules\sql-parser\lib\parser.js:28:26)
    at formatSql (file:///C:/Users/eddy.de.boer/.atom/packages/format-sql/lib/format-sql.coffee:40:33)
    at atom-workspace.atom.commands.add.format:sql (file:///C:/Users/eddy.de.boer/.atom/packages/format-sql/lib/format-sql.coffee:7:9)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\src\command-registry.js:260:29)
    at C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\src\command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\command-palette\lib\command-palette-view.js:183:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\src\command-registry.js:260:29)
    at C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\src\command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:570:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:378:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\src\window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (C:\Users\eddy.de.boer\AppData\Local\atom\app-1.5.4\resources\app.asar\src\window-event-handler.js:3:61)