Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError: Unexpected token (4:6) #32

Closed
nukr opened this issue Jul 16, 2016 · 4 comments
Closed

Uncaught SyntaxError: Unexpected token (4:6) #32

nukr opened this issue Jul 16, 2016 · 4 comments

Comments

@nukr
Copy link

nukr commented Jul 16, 2016

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: atom-easy-jsdoc package, v4.6.0

Stack Trace

Uncaught SyntaxError: Unexpected token (4:6)

At /Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/location.js:25

SyntaxError: Unexpected token (4:6)
    at Parser.pp.raise (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/location.js:22:13)
    at Parser.pp.unexpected (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/util.js:89:8)
    at Parser.pp.expect (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/util.js:83:33)
    at Parser.pp.parseBindingList (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/lval.js:188:12)
    at Parser.pp.parseFunctionParams (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/statement.js:656:22)
    at Parser.pp.parseFunction (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/statement.js:646:8)
    at Parser.pp.parseFunctionStatement (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/statement.js:308:15)
    at Parser.pp.parseStatement (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/statement.js:97:19)
    at Parser.pp.parseExportDeclaration (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/statement.js:910:15)
    at Parser.pp.parseExport (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/statement.js:898:29)
    at Parser.pp.parseStatement (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/statement.js:141:81)
    at Parser.pp.parseBlockBody (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/statement.js:529:21)
    at Parser.pp.parseTopLevel (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/statement.js:36:8)
    at Parser.parse (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/parser/index.js:129:19)
    at Object.parse (/Users/nukr/.atom/packages/atom-easy-jsdoc/node_modules/babylon/lib/index.js:47:47)
    at getAST (/Users/nukr/.atom/packages/atom-easy-jsdoc/lib/jsdoc/funcParser.js:25:22)
    at parse (/Users/nukr/.atom/packages/atom-easy-jsdoc/lib/jsdoc/funcParser.js:242:15)
    at comment (/Users/nukr/.atom/packages/atom-easy-jsdoc/lib/jsdocer.js:17:16)
    at createComment (/Users/nukr/.atom/packages/atom-easy-jsdoc/lib/index.js:23:29)
    at atom-text-editor.jsdocBlock (/Users/nukr/.atom/packages/atom-easy-jsdoc/lib/index.js:54:9)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -1:17 blur (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -1:15.9.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -1:15.9.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -1:15.9.0 blur (atom-text-editor.editor.mini.is-focused)
     -1:15.3.0 settings-view:open (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
  8x -1:15.2.0 blur (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -1:09.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:53.5.0 core:select-all (atom-text-editor.editor.mini.is-focused)
     -0:50.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  4x -0:42.7.0 blur (atom-text-editor.editor.mini.is-focused)
     -0:12.7.0 pane:show-item-1 (atom-workspace.workspace.scrollbars-visible-when-scrolling.seti-ui-no-icons.theme-dracula-theme.theme-dracula-ui)
  2x -0:05.4.0 tree-view:toggle-focus (atom-workspace.workspace.scrollbars-visible-when-scrolling.seti-ui-no-icons.theme-dracula-theme.theme-dracula-ui)
  2x -0:05.2.0 blur (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
  4x -0:04.8.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:03.9.0 vim-mode:move-down (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:01.2.0 jsdoc:block (atom-text-editor.editor.vim-mode.normal-mode.is-focused)

Config

{
  "core": {
    "themes": [
      "dracula-ui",
      "dracula-theme"
    ]
  },
  "atom-easy-jsdoc": {
    "beta": true,
    "useReturns": true
  }
}

Installed Packages

# User
atom-easy-jsdoc, v4.6.0
auto-run, v0.2.1
autocomplete-go, v1.1.0
autocomplete-paths, v1.0.2
builder-go, v1.0.0
dracula-theme, v1.2.8
dracula-ui, v0.3.0
env-from-shell, v0.3.0
ex-mode, v0.10.0
file-icons, v1.7.17
git-time-machine, v1.5.3
go-config, v1.2.1
go-get, v1.0.3
go-plus, v4.1.0
gofmt, v1.1.6
gometalinter-linter, v1.1.0
gorename, v1.0.2
language-docker, v1.1.6
linter, v1.11.14
linter-eslint, v7.2.4
linter-flow, v5.4.0
navigator-godef, v1.0.3
terminal-plus, v0.14.5
tester-go, v1.0.4
vim-mode, v0.65.1

# Dev
No dev packages
@tgandrews
Copy link
Owner

It sounds like your JS file isn't valid. Do you have any more details?

@nukr
Copy link
Author

nukr commented Jul 18, 2016

following source code can reproduce this issue on my laptop

async function test () {
  return true
}

@tgandrews
Copy link
Owner

Awesome! Thanks - I will look into this asap.

@tgandrews
Copy link
Owner

This is a duplicate of #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants