For reference, here are my commits where I tried to allow "internal" as a member name in Falcon:
https://github.com/apache/flex-falcon/commit/e05f463d9cca471f5d6d657e052d5881061553a9 https://github.com/apache/flex-falcon/commit/1be8600e86339b99b6fc8c81d5f6cf3c9a5d8800 https://github.com/apache/flex-falcon/commit/2fd8b486cae610a0211c147254848fade27e0557 And here's where I rolled it back after I found issues: https://github.com/apache/flex-falcon/commit/09e9333b05c9ab2bae615b791e9f6e779753b21f - Josh On Wed, Mar 15, 2017 at 11:39 AM, Josh Tynjala <joshtynj...@gmail.com> wrote: > We support certain names that the Flex MXMLC compiler does not. In > particular, members of an object can use reserved words as names because > JavaScript allows that (historical note: JavaScript also didn't allow > reserved words as member names at the time that ES4/AS3 was being created). > However, if I remember correctly, JavaScript still does not allow reserved > words as local variable names, so naming a local variable "interface" > should indeed result in a compile-time error. > > Just like other reserved words, "internal" should be allowed as a member > name, so that's technically a bug. I believe I tried to modify the compiler > to allow "internal" a while back (along with public/protected/private), but > it turns out that the parser handles these a bit differently than other > reserved words that we've allowed (like "delete" or "is"), and I couldn't > figure out what extra steps were needed for "internal" that weren't needed > for the others. > > - Josh > > > On Wed, Mar 15, 2017 at 10:23 AM, Harbs <harbs.li...@gmail.com> wrote: > >> I think this is a bug: >> >> If have some code like this: >> >> public function findInterfaces():Vector.<NetworkInterface> >> { >> var retVal:Vector.<NetworkInterface> = new >> Vector.<NetworkInterface>(); >> var interfaces:Object = someCodeWhichReturnsAnObject(); >> var x:String; >> for(x in interfaces){ >> var interface:NetworkInterface = new NetworkInterface(); >> interface.displayName = x; >> interface.name = x; >> interface.active = true; >> var addresses = interfaces[x]; >> for(var i:int=0;i<addresses.length;i++){ >> var address:InterfaceAddress = new InterfaceAddress(); >> address.address = addresses[i].address; >> address.broadcast = addresses[i].netmask; >> address.ipVersion = addresses[i].family; >> if(addresses[i].mac){ >> interface.hardwareAddress = addresses[i].mac; >> } >> if(addresses[i].internal){ >> interface.active = false; >> } >> >> } >> retVal.push(interface); >> } >> >> return retVal; >> } >> >> And I’m getting errors like this: >> >> >> Interface definitions must not be nested within class or other >> interface definitions. >> interface.active = true; >> Expected IDENTIFIER but got '.' >> interface.active = true; >> '=' is not allowed here >> interface.active = true; >> if' is not allowed here >> if(addresses[i].internal){ >> 'internal' is not allowed here >> if(addresses[i].internal){ >> Expected PAREN_CLOSE but got 'internal' >> if(addresses[i].internal){ >> ')' is not allowed here >> if(addresses[i].internal){ >> >> Harbs > > >