Package net.jangaroo.jooc.backend
Class TypeScriptCodeGenerator
- java.lang.Object
-
- net.jangaroo.jooc.backend.CodeGeneratorBase
-
- net.jangaroo.jooc.backend.TypeScriptCodeGenerator
-
- All Implemented Interfaces:
AstVisitor
public class TypeScriptCodeGenerator extends CodeGeneratorBase
-
-
Field Summary
Fields Modifier and Type Field Description static List<net.jangaroo.utils.AS3Type>TYPES_ALLOWED_AS_INDEX-
Fields inherited from class net.jangaroo.jooc.backend.CodeGeneratorBase
compilationUnitModelResolver, out, PROPERTY_CLASS_INSTANCE
-
-
Method Summary
-
Methods inherited from class net.jangaroo.jooc.backend.CodeGeneratorBase
addBlockStartCodeGenerator, findFunctionDeclaration, findMemberWithBindableAnnotation, getBindablePropertiesByName, getBindablePropertyName, getObjectAndProperty, getPropertiesClassAssignments, renderPropertiesClassValues, visitAll, visitApplyExprArguments, visitArrayLiteral, visitAsExpr, visitAssignmentOpExpr, visitBinaryOpExpr, visitBreakStatement, visitCaseStatement, visitCatch, visitClassBody, visitCommaSeparatedList, visitConditionalExpr, visitContinueStatement, visitDefaultStatement, visitDoStatement, visitEmptyDeclaration, visitExtends, visitForInitializer, visitForStatement, visitIdeExpression, visitIfNotNull, visitIfNotNull, visitIfStatement, visitImplements, visitInfixOpExpr, visitIsExpr, visitLabeledStatement, visitNamespaceDeclaration, visitNamespacedIde, visitNewExpr, visitObjectField, visitObjectLiteral, visitPackageDeclaration, visitParenthesizedExpr, visitPostfixOpExpr, visitPredefinedTypeDeclaration, visitPrefixOpExpr, visitReturnStatement, visitSemicolonTerminatedStatement, visitSwitchStatement, visitThrowStatement, visitTryStatement, visitUseNamespaceDirective, visitWhileStatement, writeOptSymbol, writeOptSymbol, writeOptSymbolWhitespace, writeSymbolReplacement
-
-
-
-
Field Detail
-
TYPES_ALLOWED_AS_INDEX
public static final List<net.jangaroo.utils.AS3Type> TYPES_ALLOWED_AS_INDEX
-
-
Method Detail
-
generatesCode
public static boolean generatesCode(IdeDeclaration primaryDeclaration)
-
writeModifiers
protected void writeModifiers(IdeDeclaration declaration) throws IOException
- Overrides:
writeModifiersin classCodeGeneratorBase- Throws:
IOException
-
visitCompilationUnit
public void visitCompilationUnit(CompilationUnit compilationUnit) throws IOException
- Specified by:
visitCompilationUnitin interfaceAstVisitor- Overrides:
visitCompilationUnitin classCodeGeneratorBase- Throws:
IOException
-
visitClassDeclaration
public void visitClassDeclaration(ClassDeclaration classDeclaration) throws IOException
- Specified by:
visitClassDeclarationin interfaceAstVisitor- Overrides:
visitClassDeclarationin classCodeGeneratorBase- Throws:
IOException
-
visitTypeRelation
public void visitTypeRelation(TypeRelation typeRelation) throws IOException
- Specified by:
visitTypeRelationin interfaceAstVisitor- Overrides:
visitTypeRelationin classCodeGeneratorBase- Throws:
IOException
-
visitType
public void visitType(Type type) throws IOException
- Specified by:
visitTypein interfaceAstVisitor- Overrides:
visitTypein classCodeGeneratorBase- Throws:
IOException
-
visitParameter
public void visitParameter(Parameter parameter) throws IOException
- Specified by:
visitParameterin interfaceAstVisitor- Overrides:
visitParameterin classCodeGeneratorBase- Throws:
IOException
-
visitInitializer
public void visitInitializer(Initializer initializer) throws IOException
- Specified by:
visitInitializerin interfaceAstVisitor- Overrides:
visitInitializerin classCodeGeneratorBase- Throws:
IOException
-
visitObjectFieldValue
protected void visitObjectFieldValue(ObjectField objectField) throws IOException
- Overrides:
visitObjectFieldValuein classCodeGeneratorBase- Throws:
IOException
-
visitVectorLiteral
public void visitVectorLiteral(VectorLiteral vectorLiteral) throws IOException
- Specified by:
visitVectorLiteralin interfaceAstVisitor- Overrides:
visitVectorLiteralin classCodeGeneratorBase- Throws:
IOException
-
visitImportDirective
public void visitImportDirective(ImportDirective importDirective)
- Specified by:
visitImportDirectivein interfaceAstVisitor- Overrides:
visitImportDirectivein classCodeGeneratorBase
-
visitEmptyStatement
public void visitEmptyStatement(EmptyStatement emptyStatement) throws IOException
- Specified by:
visitEmptyStatementin interfaceAstVisitor- Overrides:
visitEmptyStatementin classCodeGeneratorBase- Throws:
IOException
-
visitAnnotation
public void visitAnnotation(Annotation annotation) throws IOException
- Specified by:
visitAnnotationin interfaceAstVisitor- Overrides:
visitAnnotationin classCodeGeneratorBase- Throws:
IOException
-
visitAnnotationParameter
public void visitAnnotationParameter(AnnotationParameter annotationParameter) throws IOException
- Specified by:
visitAnnotationParameterin interfaceAstVisitor- Overrides:
visitAnnotationParameterin classCodeGeneratorBase- Throws:
IOException
-
visitVariableDeclaration
public void visitVariableDeclaration(VariableDeclaration variableDeclaration) throws IOException
- Specified by:
visitVariableDeclarationin interfaceAstVisitor- Overrides:
visitVariableDeclarationin classCodeGeneratorBase- Throws:
IOException
-
visitBlockStatement
public void visitBlockStatement(BlockStatement blockStatement) throws IOException
- Specified by:
visitBlockStatementin interfaceAstVisitor- Overrides:
visitBlockStatementin classCodeGeneratorBase- Throws:
IOException
-
visitFunctionDeclaration
public void visitFunctionDeclaration(FunctionDeclaration functionDeclaration) throws IOException
- Specified by:
visitFunctionDeclarationin interfaceAstVisitor- Overrides:
visitFunctionDeclarationin classCodeGeneratorBase- Throws:
IOException
-
visitBlockStatementDirectives
protected void visitBlockStatementDirectives(BlockStatement body) throws IOException
- Overrides:
visitBlockStatementDirectivesin classCodeGeneratorBase- Throws:
IOException
-
visitSuperConstructorCallStatement
public void visitSuperConstructorCallStatement(SuperConstructorCallStatement superConstructorCallStatement) throws IOException
- Specified by:
visitSuperConstructorCallStatementin interfaceAstVisitor- Overrides:
visitSuperConstructorCallStatementin classCodeGeneratorBase- Throws:
IOException
-
visitFunctionExpr
public void visitFunctionExpr(FunctionExpr functionExpr) throws IOException
- Specified by:
visitFunctionExprin interfaceAstVisitor- Overrides:
visitFunctionExprin classCodeGeneratorBase- Throws:
IOException
-
visitApplyExpr
public void visitApplyExpr(ApplyExpr applyExpr) throws IOException
- Specified by:
visitApplyExprin interfaceAstVisitor- Overrides:
visitApplyExprin classCodeGeneratorBase- Throws:
IOException
-
handleExmlAppendPrepend
protected void handleExmlAppendPrepend(ObjectField objectField, DotExpr exmlAppendOrPrepend) throws IOException
- Specified by:
handleExmlAppendPrependin classCodeGeneratorBase- Throws:
IOException
-
visitForInStatement
public void visitForInStatement(ForInStatement forInStatement) throws IOException
- Specified by:
visitForInStatementin interfaceAstVisitor- Overrides:
visitForInStatementin classCodeGeneratorBase- Throws:
IOException
-
visitLiteralExpr
public final void visitLiteralExpr(LiteralExpr literalExpr) throws IOException
- Specified by:
visitLiteralExprin interfaceAstVisitor- Overrides:
visitLiteralExprin classCodeGeneratorBase- Throws:
IOException
-
visitDotExpr
public void visitDotExpr(DotExpr dotExpr) throws IOException
- Specified by:
visitDotExprin interfaceAstVisitor- Overrides:
visitDotExprin classCodeGeneratorBase- Throws:
IOException
-
visitParameters
public void visitParameters(Parameters parameters) throws IOException
- Specified by:
visitParametersin interfaceAstVisitor- Overrides:
visitParametersin classCodeGeneratorBase- Throws:
IOException
-
visitArrayIndexExpr
public void visitArrayIndexExpr(ArrayIndexExpr arrayIndexExpr) throws IOException
- Specified by:
visitArrayIndexExprin interfaceAstVisitor- Overrides:
visitArrayIndexExprin classCodeGeneratorBase- Throws:
IOException
-
visitIdeWithTypeParam
public void visitIdeWithTypeParam(IdeWithTypeParam ideWithTypeParam) throws IOException
- Specified by:
visitIdeWithTypeParamin interfaceAstVisitor- Overrides:
visitIdeWithTypeParamin classCodeGeneratorBase- Throws:
IOException
-
visitQualifiedIde
public void visitQualifiedIde(QualifiedIde qualifiedIde) throws IOException
- Specified by:
visitQualifiedIdein interfaceAstVisitor- Overrides:
visitQualifiedIdein classCodeGeneratorBase- Throws:
IOException
-
visitIde
public void visitIde(Ide ide) throws IOException
- Specified by:
visitIdein interfaceAstVisitor- Overrides:
visitIdein classCodeGeneratorBase- Throws:
IOException
-
visitClassBodyDirectives
public void visitClassBodyDirectives(List<Directive> classBodyDirectives) throws IOException
- Overrides:
visitClassBodyDirectivesin classCodeGeneratorBase- Throws:
IOException
-
builtInIdentifierCode
protected String builtInIdentifierCode(String builtInIdentifier)
- Specified by:
builtInIdentifierCodein classCodeGeneratorBase
-
-