sjbarag / brs

An interpreter for the BrightScript language that runs on non-Roku platforms.
MIT License
113 stars 43 forks source link

fix(parse,interp): Support unary + operator for numbers #615

Closed sjbarag closed 3 years ago

sjbarag commented 3 years ago

BrightScript, like JavaScript and several other languages, supports a leading + sign before numeric literals (and variables, incidentally). Check for + tokens when parsing unary expressions, and evaluate them at runtime (no-op).

fixes #227