rokucommunity / rokucommunity/brighterscript

Conditional compilation should allow operators

Open
#59 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
208
Forks
68
Avg merge
8h 39m
Merged PRs (30d)
39

Description

Preprocessor statements such as this:

#if not production
   ? "Debug Version"
#else
   ? "Production Version"
#end if

Give a 1091 error ("#if conditionals can only be 'true', 'false', or other #const names"). This doesn't seem to be the case for vanilla BrightScript as can be seen in the example in the Roku documentation:

Conditional Compilation - Roku Documentation

Unfortunately the Roku docs don't expand on which operators are permitted. It's probably relatively safe to assume that the logical operators (AND, OR, NOT) are OK, but what about others? The code shown above works fine on a Roku device.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the conditional-compilation example in the issue and compare its behavior with the linked Roku documentation. Determine which operators Roku permits and identify the conditional-compilation entry point and relevant tests. Done means supported operators compile consistently with Roku behavior, while unsupported operators remain clearly defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.