I agree. non required semicolons that should end statements don't help in the AS3 grammar either (for solving ambiguities like this).

Mike

Quoting Gordon Smith <gosm...@adobe.com>:

There has always been an ambiguity in AS3 about [Foo] being interpretable as either metadata or as property access. (This is one reason we're changing the metadata syntax in AS4!) I don't remember the rule in the old compiler, but I think Falcon's rule is that if the [Foo] is the first nonwhitespace on a line then it is metadata, and this seems reasonable to me so I don't particularly want to change it.

- Gordon


-----Original Message-----
From: Michael Schmalle (JIRA) [mailto:j...@apache.org]
Sent: Thursday, December 20, 2012 8:05 AM
To: flex-dev@incubator.apache.org
Subject: [jira] [Commented] (FLEX-33320) Falcon doesn't allow multiline member access


[ https://issues.apache.org/jira/browse/FLEX-33320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13537104#comment-13537104 ]

Michael Schmalle commented on FLEX-33320:
-----------------------------------------

Have to check ECMA script or the AS3 docs. If this stuff is allowed, then this is a bug in the grammar of antlr or the BaseASParser. I could see this as being a not so hard fix since to get into the array access or member state there has to be a correct predicate which would be foo. or foo[a]

If Gordon doesn't chime in, I will look at the implementation. This is where it sucks we don't have unit tests for the ASParser!

Falcon doesn't allow multiline member access
--------------------------------------------

                Key: FLEX-33320
                URL: https://issues.apache.org/jira/browse/FLEX-33320
            Project: Apache Flex
         Issue Type: Bug
           Reporter: Chema Balsas
             Labels: Falcon
        Attachments: MultilineArrayAccess.as, MultilineObjectAccess.as


Falcon doesn't allow multiline member access.
Try to compile any of the attached examples. Both are supposed to render a textfield in the screen with the text "A test text" in it.
Falcon fails to compile both with errors like:
Internal error: Unable to generate code for 'MetaTags'
/Users/jbalsas/Documents/dev/apache/flex/falcon/trunk/compiler/tests/M
ultilineObjectAccess.as:12
Warning: Metadata was not bound to a definition
                                                        ["bar"];

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira


--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com

Reply via email to