Author: mschmalle
Date: Thu Feb 14 10:16:48 2013
New Revision: 1446097

URL: http://svn.apache.org/r1446097
Log:
Flex:FalconJx
- added emitMetaTag() in walker and emitter
- added tokens class for as/js codegen in a global place

Added:
    
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/ASTokens.java
   (with props)
Modified:
    
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/IASEmitter.java
    
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASBlockWalker.java
    
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASEmitter.java

Added: 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/ASTokens.java
URL: 
http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/ASTokens.java?rev=1446097&view=auto
==============================================================================
--- 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/ASTokens.java
 (added)
+++ 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/ASTokens.java
 Thu Feb 14 10:16:48 2013
@@ -0,0 +1,193 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.as.codegen;
+
+public interface ASTokens
+{
+    public static final String PAREN_OPEN = "(";
+    
+    public static final String PAREN_CLOSE = ")";
+
+    public static final String NEW = "new";
+    
+    public static final String SPACE = " ";
+
+    public static final String BRACE_OPEN = "{";
+    
+    public static final String BRACE_CLOSE = "}";
+
+    public static final String COLON = ":";
+
+    public static final String COMMA = ",";
+
+    //    int EOF = 1;
+    //    int NULL_TREE_LOOKAHEAD = 3;
+    //    int HIDDEN_TOKEN_COMMENT = 4;
+    //    int HIDDEN_TOKEN_SINGLE_LINE_COMMENT = 5;
+    //    int HIDDEN_TOKEN_STAR_ASSIGNMENT = 6;
+    //    int HIDDEN_TOKEN_BUILTIN_NS = 7;
+    //    int HIDDEN_TOKEN_MULTI_LINE_COMMENT = 8;
+    //    int TOKEN_ASDOC_TAG = 9;
+    //    int TOKEN_ASDOC_TEXT = 10;
+    //    int TOKEN_RESERVED_WORD_EACH = 11;
+    //    int TOKEN_RESERVED_WORD_CONFIG = 12;
+    //    int TOKEN_KEYWORD_INCLUDE = 13;
+    //    int TOKEN_RESERVED_WORD_GOTO = 14;
+    //    int TOKEN_IDENTIFIER = 15;
+    //    int TOKEN_KEYWORD_FINALLY = 16;
+    //    int TOKEN_KEYWORD_CATCH = 17;
+    //    int TOKEN_LITERAL_STRING = 18;
+    //    int TOKEN_BLOCK_OPEN = 19;
+    //    int TOKEN_BLOCK_CLOSE = 20;
+    //    int TOKEN_NAMESPACE_NAME = 21;
+    //    int TOKEN_OPERATOR_NS_QUALIFIER = 22;
+    //    int TOKEN_NAMESPACE_ANNOTATION = 23;
+    //    int TOKEN_COLON = 24;
+    //    int TOKEN_KEYWORD_IMPORT = 25;
+    //    int TOKEN_KEYWORD_USE = 26;
+    //    int TOKEN_RESERVED_WORD_NAMESPACE = 27;
+    //    int TOKEN_ASDOC_COMMENT = 28;
+    //    int TOKEN_MODIFIER_FINAL = 29;
+    //    int TOKEN_MODIFIER_DYNAMIC = 30;
+    //    int TOKEN_MODIFIER_OVERRIDE = 31;
+    //    int TOKEN_MODIFIER_STATIC = 32;
+    //    int TOKEN_MODIFIER_NATIVE = 33;
+    //    int TOKEN_MODIFIER_VIRTUAL = 34;
+    //    int TOKEN_OPERATOR_MEMBER_ACCESS = 35;
+    //    int TOKEN_ATTRIBUTE = 36;
+    //    int TOKEN_SQUARE_OPEN = 37;
+    //    int TOKEN_KEYWORD_PACKAGE = 38;
+    //    int TOKEN_KEYWORD_INTERFACE = 39;
+    //    int TOKEN_RESERVED_WORD_EXTENDS = 40;
+    //    int TOKEN_COMMA = 41;
+    //    int TOKEN_KEYWORD_CLASS = 42;
+    //    int TOKEN_RESERVED_WORD_IMPLEMENTS = 43;
+    //    int TOKEN_KEYWORD_FUNCTION = 44;
+    //    int TOKEN_PAREN_OPEN = 45;
+    //    int TOKEN_PAREN_CLOSE = 46;
+    //    int TOKEN_RESERVED_WORD_GET = 47;
+    //    int TOKEN_RESERVED_WORD_SET = 48;
+    //    int TOKEN_ELLIPSIS = 49;
+    //    int TOKEN_KEYWORD_VAR = 50;
+    //    int TOKEN_KEYWORD_CONST = 51;
+    //    int TOKEN_OPERATOR_ASSIGNMENT = 52;
+    //    int TOKEN_DIRECTIVE_DEFAULT_XML = 53;
+    //    int TOKEN_SEMICOLON = 54;
+    //    int TOKEN_KEYWORD_RETURN = 55;
+    //    int TOKEN_KEYWORD_THROW = 56;
+    //    int TOKEN_KEYWORD_FOR = 57;
+    //    int TOKEN_KEYWORD_IN = 58;
+    //    int TOKEN_KEYWORD_DO = 59;
+    //    int TOKEN_KEYWORD_WHILE = 60;
+    //    int TOKEN_KEYWORD_CONTINUE = 61;
+    //    int TOKEN_KEYWORD_BREAK = 62;
+    //    int TOKEN_KEYWORD_WITH = 63;
+    //    int TOKEN_KEYWORD_TRY = 64;
+    //    int TOKEN_KEYWORD_IF = 65;
+    //    int TOKEN_KEYWORD_ELSE = 66;
+    //    int TOKEN_KEYWORD_SWITCH = 67;
+    //    int TOKEN_KEYWORD_CASE = 68;
+    //    int TOKEN_KEYWORD_DEFAULT = 69;
+    //    int TOKEN_KEYWORD_SUPER = 70;
+    //    int TOKEN_TYPED_COLLECTION_OPEN = 71;
+    //    int TOKEN_TYPED_COLLECTION_CLOSE = 72;
+    //    int TOKEN_OPERATOR_GREATER_THAN = 73;
+    //    int TOKEN_OPERATOR_LOGICAL_AND_ASSIGNMENT = 74;
+    //    int TOKEN_OPERATOR_LOGICAL_OR_ASSIGNMENT = 75;
+    //    int TOKEN_OPERATOR_PLUS_ASSIGNMENT = 76;
+    //    int TOKEN_OPERATOR_MINUS_ASSIGNMENT = 77;
+    //    int TOKEN_OPERATOR_MULTIPLICATION_ASSIGNMENT = 78;
+    //    int TOKEN_OPERATOR_DIVISION_ASSIGNMENT = 79;
+    //    int TOKEN_OPERATOR_MODULO_ASSIGNMENT = 80;
+    //    int TOKEN_OPERATOR_BITWISE_AND_ASSIGNMENT = 81;
+    //    int TOKEN_OPERATOR_BITWISE_OR_ASSIGNMENT = 82;
+    //    int TOKEN_OPERATOR_BITWISE_XOR_ASSIGNMENT = 83;
+    //    int TOKEN_OPERATOR_BITWISE_LEFT_SHIFT_ASSIGNMENT = 84;
+    //    int TOKEN_OPERATOR_BITWISE_RIGHT_SHIFT_ASSIGNMENT = 85;
+    //    int TOKEN_OPERATOR_BITWISE_UNSIGNED_RIGHT_SHIFT_ASSIGNMENT = 86;
+    //    int TOKEN_OPERATOR_TERNARY = 87;
+    //    int TOKEN_OPERATOR_LOGICAL_OR = 88;
+    //    int TOKEN_OPERATOR_LOGICAL_AND = 89;
+    //    int TOKEN_OPERATOR_BITWISE_OR = 90;
+    //    int TOKEN_OPERATOR_BITWISE_XOR = 91;
+    //    int TOKEN_OPERATOR_BITWISE_AND = 92;
+    //    int TOKEN_OPERATOR_EQUAL = 93;
+    //    int TOKEN_OPERATOR_NOT_EQUAL = 94;
+    //    int TOKEN_OPERATOR_STRICT_EQUAL = 95;
+    //    int TOKEN_OPERATOR_STRICT_NOT_EQUAL = 96;
+    //    int TOKEN_OPERATOR_GREATER_THAN_EQUALS = 97;
+    //    int TOKEN_OPERATOR_LESS_THAN = 98;
+    //    int TOKEN_OPERATOR_LESS_THAN_EQUALS = 99;
+    //    int TOKEN_KEYWORD_INSTANCEOF = 100;
+    //    int TOKEN_KEYWORD_IS = 101;
+    //    int TOKEN_KEYWORD_AS = 102;
+    //    int TOKEN_OPERATOR_BITWISE_LEFT_SHIFT = 103;
+    //    int TOKEN_OPERATOR_BITWISE_RIGHT_SHIFT = 104;
+    //    int TOKEN_OPERATOR_BITWISE_UNSIGNED_RIGHT_SHIFT = 105;
+    //    int TOKEN_OPERATOR_MINUS = 106;
+    //    int TOKEN_OPERATOR_PLUS = 107;
+    //    int TOKEN_OPERATOR_DIVISION = 108;
+    //    int TOKEN_OPERATOR_MODULO = 109;
+    //    int TOKEN_OPERATOR_STAR = 110;
+    //    int TOKEN_KEYWORD_DELETE = 111;
+    //    int TOKEN_OPERATOR_INCREMENT = 112;
+    //    int TOKEN_OPERATOR_DECREMENT = 113;
+    //    int TOKEN_KEYWORD_VOID = 114;
+    //    int TOKEN_KEYWORD_TYPEOF = 115;
+    //    int TOKEN_OPERATOR_BITWISE_NOT = 116;
+    //    int TOKEN_OPERATOR_LOGICAL_NOT = 117;
+    //    int TOKEN_KEYWORD_NULL = 118;
+    //    int TOKEN_KEYWORD_TRUE = 119;
+    //    int TOKEN_KEYWORD_FALSE = 120;
+    //    int TOKEN_KEYWORD_THIS = 121;
+    //    int TOKEN_VOID_0 = 122;
+    //    int TOKEN_LITERAL_REGEXP = 123;
+    //    int TOKEN_LITERAL_NUMBER = 124;
+    //    int TOKEN_LITERAL_HEX_NUMBER = 125;
+    //    int TOKEN_SQUARE_CLOSE = 126;
+    //    int TOKEN_TYPED_LITERAL_OPEN = 127;
+    //    int TOKEN_TYPED_LITERAL_CLOSE = 128;
+    //    int TOKEN_E4X_WHITESPACE = 129;
+    //    int TOKEN_E4X_COMMENT = 130;
+    //    int TOKEN_E4X_CDATA = 131;
+    //    int TOKEN_E4X_PROCESSING_INSTRUCTION = 132;
+    //    int TOKEN_E4X_ENTITY = 133;
+    //    int TOKEN_E4X_DECIMAL_ENTITY = 134;
+    //    int TOKEN_E4X_HEX_ENTITY = 135;
+    //    int TOKEN_E4X_TEXT = 136;
+    //    int TOKEN_E4X_STRING = 137;
+    //    int TOKEN_E4X_OPEN_TAG_START = 138;
+    //    int TOKEN_E4X_CLOSE_TAG_START = 139;
+    //    int HIDDEN_TOKEN_E4X = 140;
+    //    int TOKEN_E4X_NAME = 141;
+    //    int TOKEN_E4X_TAG_END = 142;
+    //    int TOKEN_E4X_EMPTY_TAG_END = 143;
+    //    int TOKEN_E4X_XMLNS = 144;
+    //    int TOKEN_E4X_NAME_DOT = 145;
+    //    int TOKEN_E4X_DOTTED_NAME_PART = 146;
+    //    int TOKEN_E4X_EQUALS = 147;
+    //    int TOKEN_LITERAL_XMLLIST = 148;
+    //    int TOKEN_E4X_XMLLIST_CLOSE = 149;
+    //    int TOKEN_E4X_BINDING_OPEN = 150;
+    //    int TOKEN_E4X_BINDING_CLOSE = 151;
+    //    int TOKEN_KEYWORD_NEW = 152;
+    //    int TOKEN_OPERATOR_ATSIGN = 153;
+    //    int TOKEN_OPERATOR_DESCENDANT_ACCESS = 154;
+}

Propchange: 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/ASTokens.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/IASEmitter.java
URL: 
http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/IASEmitter.java?rev=1446097&r1=1446096&r2=1446097&view=diff
==============================================================================
--- 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/IASEmitter.java
 (original)
+++ 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/as/codegen/IASEmitter.java
 Thu Feb 14 10:16:48 2013
@@ -61,6 +61,7 @@ import org.apache.flex.compiler.tree.as.
 import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.apache.flex.compiler.tree.as.IWhileLoopNode;
 import org.apache.flex.compiler.tree.as.IWithNode;
+import org.apache.flex.compiler.tree.metadata.IMetaTagNode;
 import org.apache.flex.compiler.visitor.IASBlockWalker;
 import org.apache.flex.compiler.visitor.IASNodeStrategy;
 
@@ -365,4 +366,6 @@ public interface IASEmitter
 
     void emitLanguageIdentifier(ILanguageIdentifierNode node);
 
+    void emitMetaTag(IMetaTagNode node);
+
 }

Modified: 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASBlockWalker.java
URL: 
http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASBlockWalker.java?rev=1446097&r1=1446096&r2=1446097&view=diff
==============================================================================
--- 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASBlockWalker.java
 (original)
+++ 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASBlockWalker.java
 Thu Feb 14 10:16:48 2013
@@ -540,7 +540,7 @@ public class ASBlockWalker implements IA
     public void visitMetaTag(IMetaTagNode node)
     {
         debug("visitMetaTag(" + node.getTagName() + ")");
-        // TODO (mschmalle) visitMetaTag()    
+        emitter.emitMetaTag(node);
     }
 
     @Override
@@ -592,7 +592,7 @@ public class ASBlockWalker implements IA
     {
         // (erikdebruin) let's only do this when debugging... or it'll show up
         //               in the stdout on the command line
-        //System.out.println(message);
+        System.out.println(message);
     }
 
     
//--------------------------------------------------------------------------

Modified: 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASEmitter.java
URL: 
http://svn.apache.org/viewvc/flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASEmitter.java?rev=1446097&r1=1446096&r2=1446097&view=diff
==============================================================================
--- 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASEmitter.java
 (original)
+++ 
flex/falcon/trunk/compiler.jx/src/org/apache/flex/compiler/internal/as/codegen/ASEmitter.java
 Thu Feb 14 10:16:48 2013
@@ -89,6 +89,7 @@ import org.apache.flex.compiler.tree.as.
 import org.apache.flex.compiler.tree.as.IVariableNode;
 import org.apache.flex.compiler.tree.as.IWhileLoopNode;
 import org.apache.flex.compiler.tree.as.IWithNode;
+import org.apache.flex.compiler.tree.metadata.IMetaTagNode;
 import org.apache.flex.compiler.visitor.IASBlockWalker;
 
 /**
@@ -1470,6 +1471,11 @@ public class ASEmitter implements IASEmi
         }
     }
 
+    @Override
+    public void emitMetaTag(IMetaTagNode node)
+    {
+    }
+
     
//--------------------------------------------------------------------------
     // TODO (mschmalle) These are here to remind me I did the newline push 
backwards, needs to be fixed
     
//--------------------------------------------------------------------------


Reply via email to