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

Conditional compilation #28

Open
Open

Description

@vincentdchan

Add conditional compilation to the compiler, using the platform flag to support conditional compilation:

Example

@platform("js")  // indicating that this function will only be generated in JS
function main() {
    C(true);
}

Syntax

@platform(<platform>)

The variable platform is indicating the targeting platform.

Stage

The implementation will be divided into several levels:

  • Declaration level
  • Statement level

Declaration level

  • function
  • class
  • enum
  • import

Statement level

Every statements.

Activity

  1. added
    enhancement
    on Feb 27, 2022
  2. self-assigned this
    on Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions