Skip to content

syntax error is returned when object spread is used #70

@iambumblehead

Description

@iambumblehead

when node-detective is passed the content of this file,
https://github.com/facebook/react-vr/blob/master/Libraries/Pano/Pano.js#L41

the following error message returns here

{ SyntaxError: Unexpected token (41:4)
    at Parser.pp$4.raise (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:2488:13)
    at Parser.pp.unexpected (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:623:8)
    at Parser.pp$3.parseIdent (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:2445:10)
    at Parser.pp$3.parsePropertyName (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:2265:99)
    at Parser.pp$3.parseObj (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:2188:12)
    at Parser.pp$3.parseExprAtom (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:1994:17)
    at Parser.pp$3.parseExprSubscripts (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:1872:19)
    at Parser.pp$3.parseMaybeUnary (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:1849:17)
    at Parser.pp$3.parseExprOps (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:1791:19)
    at Parser.pp$3.parseMaybeConditional (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:1774:19)
    at Parser.pp$3.parseMaybeAssign (/pathtomyproject/node_modules/depgraph/node_modules/acorn/dist/acorn.js:1750:19)
  pos: 1722,
  loc: Position { line: 41, column: 4 },
  raisedAt: 1725 }

I updated acorn locally to acorn@5.0.3 and see the same error

related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions