Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Issue using operators on plain old JS method invocations #159

@dbousamra

Description

@dbousamra

My apologies on the tittle - I struggled to come up with a useful description.

Take this code:

roy> let a = 10
roy> let c = 9

If one tries to perform the following:

roy> a - Math.sqrt(c)

the compiler errors with:

Error: Parse error on line 1: Unexpected '('
    at Object.parseError (/Users/domlebo70/Documents/workspace/Roy/roy/lib/parser.js:335:11)
    at Object.parse (/Users/domlebo70/Documents/workspace/Roy/roy/lib/parser.js:411:22)
    at Interface.nodeRepl (/Users/domlebo70/Documents/workspace/Roy/roy/src/compile.js:619:30)
    at Interface.EventEmitter.emit (events.js:96:17)
    at Interface._onLine (readline.js:200:10)
    at Interface._line (readline.js:518:8)
    at Interface._ttyWrite (readline.js:736:14)
    at ReadStream.onkeypress (readline.js:97:10)
    at ReadStream.EventEmitter.emit (events.js:126:20)
    at emitKey (readline.js:1058:12)

No combination of bracket placement seems to get around it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions