AS3Parser - proposed new syntax

Open
#237 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Domain
compilers

Research direction

Start with docs/new-syntax.md and docs/processing-deviations.md in the linked AS3Parser project, then review the demo cases for CONFIG::X and configuration branching. Compare those documented syntax and include-processing deviations with the compiler's current parser behavior. Done would require an agreed scope for adopting the proposed syntax, since this issue does not name a Royale file or test.

Written by the indexing model from the issue text.

Description

language feature

I've really covered a lot of cases in AS3Parser, fixed a lot of bugs as I could see in demo (mostly related to error recovery), and introduced both CONFIG::X { ... } (parses inner with same parent directive context) and a multiple branching configuration { ... } directive (if-else).

configuration {
    if (FOO::EXAMPLE=bar) {
        /* Action */
    } else if (ANOTHER_CONST) {
        /* Action */
    } else {
        /* Action */
    }
}

Demo

It would be nice if Apache Royale takes into consideration the syntactic features introduced in AS3Parser.

New Syntax

Processing Deviations

In short, I try to introduce solely syntactic features that conform to ECMAScript 4 and Java dialects. The only processing deviation is the include directive which does not concatenate text, but contributes syntactic nodes instead, maintaining lines and columns.

Dominant language
Java
Stars
113
Forks
54
PR merge metrics
No merged PRs in 30d

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.

More from apache/royale-compiler

All issues in apache/royale-compiler

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.