apache / apache/royale-compiler

AS3Parser - proposed new syntax

Open
#237 1 comment 0 reactions 0 assignees View on GitHub
language feature
Dominant language
Java
Stars
113
Forks
54
PR merge metrics
No merged PRs in 30d

Description

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](https://hydroper.github.io/as3parser/demo/)

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

[New Syntax](https://github.com/hydroper/as3parser/blob/master/docs/new-syntax.md)

[Processing Deviations](https://github.com/hydroper/as3parser/blob/master/docs/processing-deviations.md)

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.

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.