flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshtynj...@apache.org
Subject [3/5] git commit: [flex-falcon] [refs/heads/develop] - compiler: public, private, protected and internal can be used as identifiers with var/function/etc
Date Fri, 06 May 2016 19:53:13 GMT
compiler: public, private, protected and internal can be used as identifiers with var/function/etc


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/e05f463d
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/e05f463d
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/e05f463d

Branch: refs/heads/develop
Commit: e05f463d9cca471f5d6d657e052d5881061553a9
Parents: b7e67f2
Author: Josh Tynjala <joshtynjala@gmail.com>
Authored: Fri May 6 12:41:23 2016 -0700
Committer: Josh Tynjala <joshtynjala@gmail.com>
Committed: Fri May 6 12:41:23 2016 -0700

----------------------------------------------------------------------
 .../internal/parsing/as/StreamingASTokenizer.java   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/e05f463d/compiler/src/main/java/org/apache/flex/compiler/internal/parsing/as/StreamingASTokenizer.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/parsing/as/StreamingASTokenizer.java
b/compiler/src/main/java/org/apache/flex/compiler/internal/parsing/as/StreamingASTokenizer.java
index 1c90e94..d38030b 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/parsing/as/StreamingASTokenizer.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/parsing/as/StreamingASTokenizer.java
@@ -893,6 +893,22 @@ public class StreamingASTokenizer implements ASTokenTypes, IASTokenizer,
Closeab
                         retVal.setType(TOKEN_NAMESPACE_NAME);
                         return retVal;
                     }
+                    if (lastToken != null)
+                    {
+                        int lastTokenType = lastToken.getType();
+                        switch (lastTokenType)
+                        {
+                            case TOKEN_KEYWORD_VAR:
+                            case TOKEN_KEYWORD_FUNCTION:
+                            case TOKEN_RESERVED_WORD_GET:
+                            case TOKEN_RESERVED_WORD_SET:
+                            case TOKEN_OPERATOR_MEMBER_ACCESS:
+                            {
+                                retVal.setType(TOKEN_IDENTIFIER);
+                                return retVal;
+                            }
+                        }
+                    }
                     retVal.setType(TOKEN_NAMESPACE_ANNOTATION);
                     return retVal;
                 case TOKEN_MODIFIER_DYNAMIC:


Mime
View raw message