From c5c06ff7f26add742c080f12439354c2b2e0867d Mon Sep 17 00:00:00 2001 From: mohaTlg Date: Sun, 27 Sep 2026 12:25:08 +0200 Subject: [PATCH 01/10] metamodel updated and more tests added --- .../FASTTypeScriptMetamodelGenerator.class.st | 2039 +- .../FASTTypeScriptImporterTest.class.st | 28469 ++++++++++++++++ .../TypeScriptParsingClassesTest.class.st | 256 +- .../FASTTEntity.extension.st | 24 +- .../FASTTExpression.extension.st | 966 +- .../FASTTStatement.extension.st | 156 +- ...ypeScriptAbstractClassDeclaration.class.st | 10 +- ...TypeScriptAbstractMethodSignature.class.st | 93 +- ...STTypeScriptAccessibilityModifier.class.st | 11 +- ...ASTTypeScriptAddingTypeAnnotation.class.st | 36 +- .../FASTTypeScriptAmbientDeclaration.class.st | 71 +- .../FASTTypeScriptArguments.class.st | 29 +- .../FASTTypeScriptArray.class.st | 74 +- .../FASTTypeScriptArrayPattern.class.st | 75 +- .../FASTTypeScriptArrayType.class.st | 65 +- .../FASTTypeScriptArrowFunction.class.st | 109 +- .../FASTTypeScriptAsExpression.class.st | 45 +- .../FASTTypeScriptAsserts.class.st | 103 +- .../FASTTypeScriptAssertsAnnotation.class.st | 96 +- ...ASTTypeScriptAssignmentExpression.class.st | 26 +- .../FASTTypeScriptAssignmentPattern.class.st | 62 +- ...riptAugmentedAssignmentExpression.class.st | 41 +- .../FASTTypeScriptAwaitExpression.class.st | 36 +- .../FASTTypeScriptBinaryExpression.class.st | 72 +- .../FASTTypeScriptBoolean.class.st | 40 +- .../FASTTypeScriptBreakStatement.class.st | 36 +- .../FASTTypeScriptCallExpression.class.st | 145 +- .../FASTTypeScriptCallSignature.class.st | 74 +- .../FASTTypeScriptCatchClause.class.st | 70 +- .../FASTTypeScriptClass.class.st | 131 +- .../FASTTypeScriptClassBody.class.st | 62 +- .../FASTTypeScriptClassDeclaration.class.st | 84 +- .../FASTTypeScriptClassHeritage.class.st | 45 +- .../FASTTypeScriptClassStaticBlock.class.st | 36 +- .../FASTTypeScriptComment.class.st | 8 +- .../FASTTypeScriptCompilationUnit.class.st | 9 +- ...ASTTypeScriptComputedPropertyName.class.st | 36 +- .../FASTTypeScriptConditionalType.class.st | 82 +- .../FASTTypeScriptConstraint.class.st | 59 +- .../FASTTypeScriptConstructSignature.class.st | 74 +- .../FASTTypeScriptConstructorType.class.st | 129 +- .../FASTTypeScriptContinueStatement.class.st | 36 +- .../FASTTypeScriptDebuggerStatement.class.st | 11 +- .../FASTTypeScriptDecorator.class.st | 178 +- .../FASTTypeScriptDefaultType.class.st | 61 +- .../FASTTypeScriptDoStatement.class.st | 44 +- .../FASTTypeScriptERROR.class.st | 8 +- .../FASTTypeScriptElseClause.class.st | 34 +- .../FASTTypeScriptEmptyStatement.class.st | 10 +- .../FASTTypeScriptEntity.class.st | 2245 +- .../FASTTypeScriptEnumAssignment.class.st | 62 +- .../FASTTypeScriptEnumBody.class.st | 42 +- .../FASTTypeScriptEnumDeclaration.class.st | 52 +- .../FASTTypeScriptEscapeSequence.class.st | 11 +- .../FASTTypeScriptExistentialType.class.st | 86 +- .../FASTTypeScriptExportClause.class.st | 44 +- .../FASTTypeScriptExportSpecifier.class.st | 32 +- .../FASTTypeScriptExportStatement.class.st | 109 +- .../FASTTypeScriptExpression.class.st | 40 +- ...FASTTypeScriptExpressionStatement.class.st | 33 +- .../FASTTypeScriptExtendsClause.class.st | 49 +- .../FASTTypeScriptExtendsTypeClause.class.st | 38 +- .../FASTTypeScriptFalse.class.st | 86 +- .../FASTTypeScriptFinallyClause.class.st | 32 +- .../FASTTypeScriptFlowMaybeType.class.st | 65 +- .../FASTTypeScriptForInStatement.class.st | 105 +- .../FASTTypeScriptForStatement.class.st | 87 +- .../FASTTypeScriptFormalParameters.class.st | 207 +- ...FASTTypeScriptFunctionDeclaration.class.st | 85 +- .../FASTTypeScriptFunctionExpression.class.st | 182 +- .../FASTTypeScriptFunctionSignature.class.st | 119 +- .../FASTTypeScriptFunctionType.class.st | 80 +- .../FASTTypeScriptGeneratorFunction.class.st | 183 +- ...criptGeneratorFunctionDeclaration.class.st | 137 +- .../FASTTypeScriptGenericType.class.st | 85 +- .../FASTTypeScriptHashBangLine.class.st | 10 +- .../FASTTypeScriptHtmlComment.class.st | 8 +- .../FASTTypeScriptIdentifier.class.st | 228 +- .../FASTTypeScriptIfStatement.class.st | 37 +- .../FASTTypeScriptImplementsClause.class.st | 45 +- .../FASTTypeScriptImport.class.st | 8 +- .../FASTTypeScriptImportAlias.class.st | 71 +- .../FASTTypeScriptImportAttribute.class.st | 36 +- .../FASTTypeScriptImportClause.class.st | 45 +- ...FASTTypeScriptImportRequireClause.class.st | 36 +- .../FASTTypeScriptImportSpecifier.class.st | 55 +- .../FASTTypeScriptImportStatement.class.st | 36 +- .../FASTTypeScriptIndexSignature.class.st | 88 +- .../FASTTypeScriptIndexTypeQuery.class.st | 105 +- .../FASTTypeScriptInferType.class.st | 114 +- ...TypeScriptInstantiationExpression.class.st | 55 +- .../FASTTypeScriptInterfaceBody.class.st | 44 +- ...ASTTypeScriptInterfaceDeclaration.class.st | 74 +- .../FASTTypeScriptInternalModule.class.st | 134 +- .../FASTTypeScriptIntersectionType.class.st | 114 +- .../FASTTypeScriptJsxText.class.st | 11 +- .../FASTTypeScriptLabeledStatement.class.st | 62 +- .../FASTTypeScriptLexicalDeclaration.class.st | 61 +- .../FASTTypeScriptLiteral.class.st | 40 +- .../FASTTypeScriptLiteralType.class.st | 105 +- .../FASTTypeScriptLookupType.class.st | 114 +- .../FASTTypeScriptMappedTypeClause.class.st | 88 +- .../FASTTypeScriptMemberExpression.class.st | 115 +- .../FASTTypeScriptMetaProperty.class.st | 88 +- .../FASTTypeScriptMethodDefinition.class.st | 65 +- .../FASTTypeScriptMethodSignature.class.st | 92 +- .../FASTTypeScriptModel.class.st | 12 +- .../FASTTypeScriptModule.class.st | 79 +- .../FASTTypeScriptNamedImports.class.st | 45 +- .../FASTTypeScriptNamespaceExport.class.st | 36 +- .../FASTTypeScriptNamespaceImport.class.st | 36 +- .../FASTTypeScriptNestedIdentifier.class.st | 28 +- ...ASTTypeScriptNestedTypeIdentifier.class.st | 124 +- .../FASTTypeScriptNewExpression.class.st | 37 +- .../FASTTypeScriptNonNullExpression.class.st | 106 +- .../FASTTypeScriptNull.class.st | 47 +- .../FASTTypeScriptNumber.class.st | 87 +- .../FASTTypeScriptObject.class.st | 114 +- ...TypeScriptObjectAssignmentPattern.class.st | 60 +- .../FASTTypeScriptObjectPattern.class.st | 115 +- .../FASTTypeScriptObjectType.class.st | 74 +- ...TTypeScriptOmittingTypeAnnotation.class.st | 105 +- ...ASTTypeScriptOptingTypeAnnotation.class.st | 105 +- .../FASTTypeScriptOptionalChain.class.st | 59 +- .../FASTTypeScriptOptionalParameter.class.st | 108 +- .../FASTTypeScriptOptionalType.class.st | 61 +- .../FASTTypeScriptOverrideModifier.class.st | 10 +- .../FASTTypeScriptPair.class.st | 60 +- .../FASTTypeScriptPairPattern.class.st | 55 +- ...TypeScriptParenthesizedExpression.class.st | 183 +- .../FASTTypeScriptParenthesizedType.class.st | 65 +- .../FASTTypeScriptPredefinedType.class.st | 46 +- ...peScriptPrivatePropertyIdentifier.class.st | 42 +- .../FASTTypeScriptProgram.class.st | 63 +- .../FASTTypeScriptPropertyIdentifier.class.st | 68 +- .../FASTTypeScriptPropertySignature.class.st | 55 +- ...STTypeScriptPublicFieldDefinition.class.st | 109 +- .../FASTTypeScriptReadonlyType.class.st | 64 +- .../FASTTypeScriptRegex.class.st | 84 +- .../FASTTypeScriptRegexFlags.class.st | 38 +- .../FASTTypeScriptRegexPattern.class.st | 36 +- .../FASTTypeScriptRequiredParameter.class.st | 106 +- .../FASTTypeScriptRestPattern.class.st | 105 +- .../FASTTypeScriptRestType.class.st | 62 +- .../FASTTypeScriptReturnStatement.class.st | 36 +- ...FASTTypeScriptSatisfiesExpression.class.st | 43 +- .../FASTTypeScriptSequenceExpression.class.st | 45 +- ...ScriptShorthandPropertyIdentifier.class.st | 12 +- ...horthandPropertyIdentifierPattern.class.st | 11 +- .../FASTTypeScriptSpreadElement.class.st | 38 +- .../FASTTypeScriptStatement.class.st | 10 +- .../FASTTypeScriptStatementBlock.class.st | 230 +- ...FASTTypeScriptStatementIdentifier.class.st | 80 +- .../FASTTypeScriptString.class.st | 137 +- .../FASTTypeScriptStringFragment.class.st | 10 +- ...FASTTypeScriptSubscriptExpression.class.st | 116 +- .../FASTTypeScriptSuper.class.st | 46 +- .../FASTTypeScriptSwitchBody.class.st | 71 +- .../FASTTypeScriptSwitchCase.class.st | 65 +- .../FASTTypeScriptSwitchDefault.class.st | 43 +- .../FASTTypeScriptSwitchStatement.class.st | 55 +- .../FASTTypeScriptTDeclaration.trait.st | 52 +- .../FASTTypeScriptTEntityCreator.trait.st | 185 +- .../FASTTypeScriptTModifier.trait.st | 11 +- .../FASTTypeScriptTOptionalField.trait.st | 29 +- .../FASTTypeScriptTPattern.trait.st | 51 + .../FASTTypeScriptTPrimaryExpression.trait.st | 137 + .../FASTTypeScriptTPrimaryType.trait.st | 22 + .../FASTTypeScriptTReturnType.trait.st | 11 +- .../FASTTypeScriptTType.trait.st | 20 + .../FASTTypeScriptTWithDeclarations.trait.st | 13 +- .../FASTTypeScriptTWithModifiers.trait.st | 13 +- ...FASTTypeScriptTemplateLiteralType.class.st | 74 +- .../FASTTypeScriptTemplateString.class.st | 116 +- ...ASTTypeScriptTemplateSubstitution.class.st | 36 +- .../FASTTypeScriptTemplateType.class.st | 61 +- .../FASTTypeScriptTernaryExpression.class.st | 92 +- .../FASTTypeScriptThis.class.st | 46 +- .../FASTTypeScriptThisType.class.st | 46 +- .../FASTTypeScriptThrowStatement.class.st | 37 +- .../FASTTypeScriptTrue.class.st | 86 +- .../FASTTypeScriptTryStatement.class.st | 37 +- .../FASTTypeScriptTupleType.class.st | 74 +- ...ASTTypeScriptTypeAliasDeclaration.class.st | 107 +- .../FASTTypeScriptTypeAnnotation.class.st | 191 +- .../FASTTypeScriptTypeArguments.class.st | 132 +- .../FASTTypeScriptTypeAssertion.class.st | 70 +- .../FASTTypeScriptTypeIdentifier.class.st | 187 +- .../FASTTypeScriptTypeParameter.class.st | 99 +- .../FASTTypeScriptTypeParameters.class.st | 428 +- .../FASTTypeScriptTypePredicate.class.st | 87 +- ...TypeScriptTypePredicateAnnotation.class.st | 43 +- .../FASTTypeScriptTypeQuery.class.st | 64 +- .../FASTTypeScriptUnaryExpression.class.st | 34 +- .../FASTTypeScriptUndefined.class.st | 47 +- .../FASTTypeScriptUnionType.class.st | 75 +- .../FASTTypeScriptUpdateExpression.class.st | 51 +- ...FASTTypeScriptVariableDeclaration.class.st | 71 +- .../FASTTypeScriptVariableDeclarator.class.st | 72 +- .../FASTTypeScriptWhileStatement.class.st | 44 +- .../FASTTypeScriptWithStatement.class.st | 28 +- .../FASTTypeScriptYieldExpression.class.st | 36 +- .../FASTTypeScriptImporter.class.st | 12 + ...ScriptAbstractMethodSignature.extension.st | 6 - ...peScriptAccessibilityModifier.extension.st | 6 - ...TTypeScriptAmbientDeclaration.extension.st | 6 - .../FASTTypeScriptArguments.extension.st | 6 - .../FASTTypeScriptArray.extension.st | 6 - .../FASTTypeScriptArrowFunction.extension.st | 6 - ...STTypeScriptAssertsAnnotation.extension.st | 6 - ...ypeScriptAssignmentExpression.extension.st | 7 - .../FASTTypeScriptCatchClause.extension.st | 6 - .../FASTTypeScriptClassBody.extension.st | 6 - ...ASTTypeScriptClassDeclaration.extension.st | 6 - ...ASTTypeScriptClassStaticBlock.extension.st | 6 - ...FASTTypeScriptCompilationUnit.extension.st | 6 - .../FASTTypeScriptDecorator.extension.st | 6 - .../FASTTypeScriptElseClause.extension.st | 6 - .../FASTTypeScriptEnumAssignment.extension.st | 6 - .../FASTTypeScriptEnumBody.extension.st | 6 - ...FASTTypeScriptEnumDeclaration.extension.st | 8 - ...FASTTypeScriptExistentialType.extension.st | 6 - .../FASTTypeScriptExtendsClause.extension.st | 6 - ...STTypeScriptExtendsTypeClause.extension.st | 6 - .../FASTTypeScriptFinallyClause.extension.st | 6 - ...ASTTypeScriptFormalParameters.extension.st | 6 - ...TypeScriptFunctionDeclaration.extension.st | 7 - ...STTypeScriptFunctionSignature.extension.st | 6 - ...ASTTypeScriptImplementsClause.extension.st | 6 - ...ASTTypeScriptMethodDefinition.extension.st | 6 - ...FASTTypeScriptMethodSignature.extension.st | 7 - .../FASTTypeScriptPredefinedType.extension.st | 6 - ...TTypeScriptPropertyIdentifier.extension.st | 6 - ...peScriptPublicFieldDefinition.extension.st | 6 - .../FASTTypeScriptTypeAnnotation.extension.st | 6 - .../FASTTypeScriptTypeIdentifier.extension.st | 7 - 236 files changed, 44235 insertions(+), 3779 deletions(-) create mode 100644 FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st create mode 100644 FAST-TypeScript-Model/FASTTypeScriptTPattern.trait.st create mode 100644 FAST-TypeScript-Model/FASTTypeScriptTPrimaryExpression.trait.st create mode 100644 FAST-TypeScript-Model/FASTTypeScriptTPrimaryType.trait.st create mode 100644 FAST-TypeScript-Model/FASTTypeScriptTType.trait.st create mode 100644 FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptAbstractMethodSignature.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptAccessibilityModifier.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptAmbientDeclaration.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptArguments.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptArray.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptArrowFunction.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptAssertsAnnotation.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptAssignmentExpression.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptCatchClause.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptClassBody.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptClassDeclaration.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptClassStaticBlock.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptCompilationUnit.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptDecorator.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptElseClause.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptEnumAssignment.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptEnumBody.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptEnumDeclaration.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptExistentialType.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptExtendsClause.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptExtendsTypeClause.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptFinallyClause.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptFormalParameters.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptFunctionDeclaration.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptFunctionSignature.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptImplementsClause.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptMethodDefinition.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptMethodSignature.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptPredefinedType.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptPropertyIdentifier.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptPublicFieldDefinition.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptTypeAnnotation.extension.st delete mode 100644 FAST-TypeScript-Visitor/FASTTypeScriptTypeIdentifier.extension.st diff --git a/FAST-TypeScript-Model-Generator/FASTTypeScriptMetamodelGenerator.class.st b/FAST-TypeScript-Model-Generator/FASTTypeScriptMetamodelGenerator.class.st index 19d4f68..528cd0e 100644 --- a/FAST-TypeScript-Model-Generator/FASTTypeScriptMetamodelGenerator.class.st +++ b/FAST-TypeScript-Model-Generator/FASTTypeScriptMetamodelGenerator.class.st @@ -2,203 +2,207 @@ Class { #name : 'FASTTypeScriptMetamodelGenerator', #superclass : 'FamixMetamodelGenerator', #instVars : [ - 'propertyIdentifier', + 'entity', + '_ERROR', '_true', '_false', '_super', - 'entity', - 'compilationUnit', 'tEntity', - 'tWithComments', - 'tStatement', + 'tExpression', 'tDeclaration', + 'tStatement', + 'tPattern', + 'tPrimaryExpression', + 'tPrimaryType', + 'tType', + 'tWithComments', 'tWithDeclarations', 'tModifier', 'tWithModifiers', 'tNamedEntity', 'tLiteral', - '_ERROR', - 'tExpression', 'tWithParameters', 'tReturnType', 'tOptionalField', - 'program', - 'expression', - 'constraint', - 'number', - 'import', - 'regex', - 'class', - 'boolean', - 'module', - 'pair', - 'null', - 'comment', - 'asserts', - 'decorator', - 'identifier', - 'array', - 'undefined', - 'object', + 'abstractClassDeclaration', + 'abstractMethodSignature', + 'accessibilityModifier', + 'addingTypeAnnotation', + 'ambientDeclaration', 'arguments', - 'this', - 'string', - 'spreadElement', - 'breakStatement', + 'array', + 'arrayPattern', + 'arrayType', 'arrowFunction', - 'abstractClassDeclaration', - 'callSignature', - 'labeledStatement', - 'formalParameters', - 'statementIdentifier', - 'existentialType', - 'metaProperty', - 'typeParameters', 'asExpression', - 'doStatement', - 'typeAssertion', - 'lookupType', - 'lexicalDeclaration', - 'templateString', - 'indexSignature', - 'importStatement', + 'asserts', + 'assertsAnnotation', + 'assignmentExpression', + 'assignmentPattern', + 'augmentedAssignmentExpression', + 'awaitExpression', + 'binaryExpression', + 'boolean', + 'breakStatement', + 'callExpression', + 'callSignature', + 'catchClause', + 'class', + 'classBody', + 'classDeclaration', + 'classHeritage', + 'classStaticBlock', + 'comment', + 'compilationUnit', + 'computedPropertyName', + 'conditionalType', + 'constraint', + 'constructSignature', + 'constructorType', + 'continueStatement', 'debuggerStatement', - 'restPattern', - 'satisfiesExpression', - 'switchDefault', - 'enumDeclaration', - 'switchBody', - 'subscriptExpression', - 'unionType', - 'interfaceBody', - 'typeIdentifier', - 'functionDeclaration', - 'arrayType', - 'newExpression', - 'literalType', - 'typePredicateAnnotation', + 'decorator', + 'defaultType', + 'doStatement', + 'elseClause', + 'emptyStatement', + 'enumAssignment', 'enumBody', - 'restType', - 'exportStatement', - 'catchClause', - 'methodSignature', - 'interfaceDeclaration', - 'jsxText', + 'enumDeclaration', + 'escapeSequence', + 'existentialType', 'exportClause', - 'switchStatement', + 'exportSpecifier', + 'exportStatement', + 'expression', + 'expressionStatement', + 'extendsClause', + 'extendsTypeClause', + 'finallyClause', + 'flowMaybeType', + 'forInStatement', 'forStatement', - 'accessibilityModifier', + 'formalParameters', + 'functionDeclaration', 'functionExpression', - 'generatorFunctionDeclaration', + 'functionSignature', 'functionType', - 'escapeSequence', - 'typeQuery', - 'shorthandPropertyIdentifierPattern', - 'binaryExpression', - 'parenthesizedExpression', - 'classDeclaration', - 'returnStatement', - 'assignmentExpression', - 'unaryExpression', - 'variableDeclarator', - 'classHeritage', - 'regexPattern', - 'omittingTypeAnnotation', - 'elseClause', - 'thisType', - 'withStatement', - 'privatePropertyIdentifier', - 'throwStatement', + 'generatorFunction', + 'generatorFunctionDeclaration', + 'genericType', 'hashBangLine', - 'nestedTypeIdentifier', - 'emptyStatement', - 'readonlyType', - 'classBody', - 'importClause', - 'optionalChain', - 'templateLiteralType', - 'assignmentPattern', - 'nestedIdentifier', - 'publicFieldDefinition', + 'htmlComment', + 'identifier', + 'ifStatement', + 'implementsClause', + 'import', 'importAlias', - 'tryStatement', - 'typeAliasDeclaration', - 'optionalParameter', - 'constructorType', - 'conditionalType', - 'parenthesizedType', - 'constructSignature', - 'flowMaybeType', - 'arrayPattern', - 'finallyClause', - 'extendsClause', - 'genericType', - 'namespaceImport', - 'objectAssignmentPattern', - 'computedPropertyName', - 'typeParameter', - 'templateSubstitution', + 'importAttribute', + 'importClause', + 'importRequireClause', + 'importSpecifier', + 'importStatement', + 'indexSignature', + 'indexTypeQuery', + 'inferType', 'instantiationExpression', + 'interfaceBody', + 'interfaceDeclaration', + 'internalModule', + 'intersectionType', + 'jsxText', + 'labeledStatement', + 'lexicalDeclaration', + 'literal', + 'literalType', + 'lookupType', + 'mappedTypeClause', 'memberExpression', - 'implementsClause', - 'callExpression', - 'ambientDeclaration', - 'templateType', - 'inferType', - 'ifStatement', + 'metaProperty', + 'methodDefinition', + 'methodSignature', + 'module', 'namedImports', - 'objectPattern', - 'awaitExpression', - 'pairPattern', - 'importRequireClause', - 'typeAnnotation', + 'namespaceExport', + 'namespaceImport', + 'nestedIdentifier', + 'nestedTypeIdentifier', + 'newExpression', 'nonNullExpression', + 'null', + 'number', + 'object', + 'objectAssignmentPattern', + 'objectPattern', 'objectType', - 'shorthandPropertyIdentifier', - 'indexTypeQuery', - 'forInStatement', - 'generatorFunction', - 'typePredicate', - 'typeArguments', - 'regexFlags', - 'sequenceExpression', - 'tupleType', + 'omittingTypeAnnotation', 'optingTypeAnnotation', - 'internalModule', - 'predefinedType', - 'importSpecifier', - 'abstractMethodSignature', - 'assertsAnnotation', - 'yieldExpression', - 'overrideModifier', - 'mappedTypeClause', - 'statementBlock', - 'functionSignature', - 'continueStatement', + 'optionalChain', + 'optionalParameter', 'optionalType', - 'expressionStatement', - 'classStaticBlock', - 'extendsTypeClause', - 'addingTypeAnnotation', - 'augmentedAssignmentExpression', - 'variableDeclaration', - 'exportSpecifier', - 'intersectionType', - 'updateExpression', - 'htmlComment', - 'enumAssignment', - 'namespaceExport', + 'overrideModifier', + 'pair', + 'pairPattern', + 'parenthesizedExpression', + 'parenthesizedType', + 'predefinedType', + 'privatePropertyIdentifier', + 'program', + 'propertyIdentifier', + 'propertySignature', + 'publicFieldDefinition', + 'readonlyType', + 'regex', + 'regexFlags', + 'regexPattern', 'requiredParameter', - 'importAttribute', + 'restPattern', + 'restType', + 'returnStatement', + 'satisfiesExpression', + 'sequenceExpression', + 'shorthandPropertyIdentifier', + 'shorthandPropertyIdentifierPattern', + 'spreadElement', + 'statement', + 'statementBlock', + 'statementIdentifier', + 'string', 'stringFragment', - 'defaultType', + 'subscriptExpression', + 'switchBody', + 'switchCase', + 'switchDefault', + 'switchStatement', + 'templateLiteralType', + 'templateString', + 'templateSubstitution', + 'templateType', 'ternaryExpression', + 'this', + 'thisType', + 'throwStatement', + 'tryStatement', + 'tupleType', + 'typeAliasDeclaration', + 'typeAnnotation', + 'typeArguments', + 'typeAssertion', + 'typeIdentifier', + 'typeParameter', + 'typeParameters', + 'typePredicate', + 'typePredicateAnnotation', + 'typeQuery', + 'unaryExpression', + 'undefined', + 'unionType', + 'updateExpression', + 'variableDeclaration', + 'variableDeclarator', 'whileStatement', - 'methodDefinition', - 'propertySignature', - 'switchCase', - 'literal', - 'statement' + 'withStatement', + 'yieldExpression' ], #category : 'FAST-TypeScript-Model-Generator', #package : 'FAST-TypeScript-Model-Generator' @@ -224,57 +228,70 @@ FASTTypeScriptMetamodelGenerator class >> submetamodels [ { #category : 'definition' } FASTTypeScriptMetamodelGenerator >> defineClasses [ + super defineClasses. + "--- Root entity ---" entity := self newClassNamed: #Entity. + "--- Compilation unit ---" + compilationUnit := builder ensureClassNamed: #CompilationUnit. + compilationUnit withTesting. program := builder ensureClassNamed: #Program. - + + "--- Identifiers ---" identifier := builder ensureClassNamed: #Identifier. - hashBangLine := builder ensureClassNamed: #HashBangLine. - stringFragment := builder ensureClassNamed: #StringFragment. - escapeSequence := builder ensureClassNamed: #EscapeSequence. - comment := builder ensureClassNamed: #Comment. - regexPattern := builder ensureClassNamed: #RegexPattern. - regexFlags := builder ensureClassNamed: #RegexFlags. - number := builder ensureClassNamed: #Number. + propertyIdentifier := builder ensureClassNamed: #PropertyIdentifier. privatePropertyIdentifier := builder ensureClassNamed: #PrivatePropertyIdentifier. - this := builder ensureClassNamed: #This. - _super := builder ensureClassNamed: #Super. - + shorthandPropertyIdentifier := builder ensureClassNamed: #ShorthandPropertyIdentifier. + shorthandPropertyIdentifierPattern := builder ensureClassNamed: #ShorthandPropertyIdentifierPattern. + statementIdentifier := builder ensureClassNamed: #StatementIdentifier. + nestedIdentifier := builder ensureClassNamed: #NestedIdentifier. + nestedTypeIdentifier := builder ensureClassNamed: #NestedTypeIdentifier. + typeIdentifier := builder ensureClassNamed: #TypeIdentifier. + + "--- Literals & Primitives ---" literal := builder ensureClassNamed: #Literal. boolean := builder ensureClassNamed: #Boolean. _true := builder ensureClassNamed: #True. _false := builder ensureClassNamed: #False. - null := builder ensureClassNamed: #Null. undefined := builder ensureClassNamed: #Undefined. + number := builder ensureClassNamed: #Number. + string := builder ensureClassNamed: #String. + stringFragment := builder ensureClassNamed: #StringFragment. + escapeSequence := builder ensureClassNamed: #EscapeSequence. + regex := builder ensureClassNamed: #Regex. + regexPattern := builder ensureClassNamed: #RegexPattern. + regexFlags := builder ensureClassNamed: #RegexFlags. + this := builder ensureClassNamed: #This. + _super := builder ensureClassNamed: #Super. + + "--- Comments ---" + comment := builder ensureClassNamed: #Comment. + hashBangLine := builder ensureClassNamed: #HashBangLine. htmlComment := builder ensureClassNamed: #HtmlComment. jsxText := builder ensureClassNamed: #JsxText. - - exportStatement := builder ensureClassNamed: #ExportStatement. - namespaceExport := builder ensureClassNamed: #NamespaceExport. - exportClause := builder ensureClassNamed: #ExportClause. - exportSpecifier := builder ensureClassNamed: #ExportSpecifier. - import := builder ensureClassNamed: #Import. - importStatement := builder ensureClassNamed: #ImportStatement. - importClause := builder ensureClassNamed: #ImportClause. - namespaceImport := builder ensureClassNamed: #NamespaceImport. - namedImports := builder ensureClassNamed: #NamedImports. - importSpecifier := builder ensureClassNamed: #ImportSpecifier. - importAttribute := builder ensureClassNamed: #ImportAttribute. + + "--- Statements ---" + statement := builder ensureClassNamed: #Statement. expressionStatement := builder ensureClassNamed: #ExpressionStatement. variableDeclaration := builder ensureClassNamed: #VariableDeclaration. lexicalDeclaration := builder ensureClassNamed: #LexicalDeclaration. variableDeclarator := builder ensureClassNamed: #VariableDeclarator. statementBlock := builder ensureClassNamed: #StatementBlock. - elseClause := builder ensureClassNamed: #ElseClause. ifStatement := builder ensureClassNamed: #IfStatement. + elseClause := builder ensureClassNamed: #ElseClause. switchStatement := builder ensureClassNamed: #SwitchStatement. + switchBody := builder ensureClassNamed: #SwitchBody. + switchCase := builder ensureClassNamed: #SwitchCase. + switchDefault := builder ensureClassNamed: #SwitchDefault. forStatement := builder ensureClassNamed: #ForStatement. forInStatement := builder ensureClassNamed: #ForInStatement. whileStatement := builder ensureClassNamed: #WhileStatement. doStatement := builder ensureClassNamed: #DoStatement. tryStatement := builder ensureClassNamed: #TryStatement. + catchClause := builder ensureClassNamed: #CatchClause. + finallyClause := builder ensureClassNamed: #FinallyClause. withStatement := builder ensureClassNamed: #WithStatement. breakStatement := builder ensureClassNamed: #BreakStatement. continueStatement := builder ensureClassNamed: #ContinueStatement. @@ -283,214 +300,248 @@ FASTTypeScriptMetamodelGenerator >> defineClasses [ throwStatement := builder ensureClassNamed: #ThrowStatement. emptyStatement := builder ensureClassNamed: #EmptyStatement. labeledStatement := builder ensureClassNamed: #LabeledStatement. - switchBody := builder ensureClassNamed: #SwitchBody. - switchCase := builder ensureClassNamed: #SwitchCase. - switchDefault := builder ensureClassNamed: #SwitchDefault. - catchClause := builder ensureClassNamed: #CatchClause. - finallyClause := builder ensureClassNamed: #FinallyClause. + + "--- Expressions ---" + expression := builder ensureClassNamed: #Expression. parenthesizedExpression := builder ensureClassNamed: #ParenthesizedExpression. yieldExpression := builder ensureClassNamed: #YieldExpression. - object := builder ensureClassNamed: #Object. - objectPattern := builder ensureClassNamed: #ObjectPattern. - assignmentPattern := builder ensureClassNamed: #AssignmentPattern. - objectAssignmentPattern := builder ensureClassNamed: #ObjectAssignmentPattern. - array := builder ensureClassNamed: #Array. - arrayPattern := builder ensureClassNamed: #ArrayPattern. - nestedIdentifier := builder ensureClassNamed: #NestedIdentifier. - class := builder ensureClassNamed: #Class. - - classDeclaration := builder ensureClassNamed: #ClassDeclaration. - classDeclaration withTesting. - - classHeritage := builder ensureClassNamed: #ClassHeritage. - functionExpression := builder ensureClassNamed: #FunctionExpression. - functionDeclaration := builder ensureClassNamed: #FunctionDeclaration. - generatorFunction := builder ensureClassNamed: #GeneratorFunction. - generatorFunctionDeclaration := builder ensureClassNamed: #GeneratorFunctionDeclaration. - arrowFunction := builder ensureClassNamed: #ArrowFunction. - optionalChain := builder ensureClassNamed: #OptionalChain. - callExpression := builder ensureClassNamed: #CallExpression. - newExpression := builder ensureClassNamed: #NewExpression. awaitExpression := builder ensureClassNamed: #AwaitExpression. - memberExpression := builder ensureClassNamed: #MemberExpression. - subscriptExpression := builder ensureClassNamed: #SubscriptExpression. assignmentExpression := builder ensureClassNamed: #AssignmentExpression. augmentedAssignmentExpression := builder ensureClassNamed: #AugmentedAssignmentExpression. - spreadElement := builder ensureClassNamed: #SpreadElement. ternaryExpression := builder ensureClassNamed: #TernaryExpression. binaryExpression := builder ensureClassNamed: #BinaryExpression. unaryExpression := builder ensureClassNamed: #UnaryExpression. updateExpression := builder ensureClassNamed: #UpdateExpression. sequenceExpression := builder ensureClassNamed: #SequenceExpression. - string := builder ensureClassNamed: #String. - templateString := builder ensureClassNamed: #TemplateString. - templateSubstitution := builder ensureClassNamed: #TemplateSubstitution. - regex := builder ensureClassNamed: #Regex. + callExpression := builder ensureClassNamed: #CallExpression. + newExpression := builder ensureClassNamed: #NewExpression. + memberExpression := builder ensureClassNamed: #MemberExpression. + subscriptExpression := builder ensureClassNamed: #SubscriptExpression. + spreadElement := builder ensureClassNamed: #SpreadElement. + nonNullExpression := builder ensureClassNamed: #NonNullExpression. metaProperty := builder ensureClassNamed: #MetaProperty. + optionalChain := builder ensureClassNamed: #OptionalChain. + asExpression := builder ensureClassNamed: #AsExpression. + satisfiesExpression := builder ensureClassNamed: #SatisfiesExpression. + typeAssertion := builder ensureClassNamed: #TypeAssertion. + instantiationExpression := builder ensureClassNamed: #InstantiationExpression. + + "--- Patterns ---" + assignmentPattern := builder ensureClassNamed: #AssignmentPattern. + objectAssignmentPattern := builder ensureClassNamed: #ObjectAssignmentPattern. + restPattern := builder ensureClassNamed: #RestPattern. + arrayPattern := builder ensureClassNamed: #ArrayPattern. + objectPattern := builder ensureClassNamed: #ObjectPattern. + pairPattern := builder ensureClassNamed: #PairPattern. + + "--- Objects & Arrays ---" + object := builder ensureClassNamed: #Object. + array := builder ensureClassNamed: #Array. + pair := builder ensureClassNamed: #Pair. + computedPropertyName := builder ensureClassNamed: #ComputedPropertyName. arguments := builder ensureClassNamed: #Arguments. - decorator := builder ensureClassNamed: #Decorator. - classBody := builder ensureClassNamed: #ClassBody. + + "--- Templates ---" + templateString := builder ensureClassNamed: #TemplateString. + templateSubstitution := builder ensureClassNamed: #TemplateSubstitution. + + "--- Functions ---" + functionExpression := builder ensureClassNamed: #FunctionExpression. + functionDeclaration := builder ensureClassNamed: #FunctionDeclaration. + generatorFunction := builder ensureClassNamed: #GeneratorFunction. + generatorFunctionDeclaration := builder ensureClassNamed: #GeneratorFunctionDeclaration. + arrowFunction := builder ensureClassNamed: #ArrowFunction. formalParameters := builder ensureClassNamed: #FormalParameters. + functionSignature := builder ensureClassNamed: #FunctionSignature. + + "--- Classes ---" + class := builder ensureClassNamed: #Class. + classDeclaration := builder ensureClassNamed: #ClassDeclaration. + classDeclaration withTesting. + abstractClassDeclaration := builder ensureClassNamed: #AbstractClassDeclaration. + classBody := builder ensureClassNamed: #ClassBody. + classHeritage := builder ensureClassNamed: #ClassHeritage. classStaticBlock := builder ensureClassNamed: #ClassStaticBlock. - restPattern := builder ensureClassNamed: #RestPattern. methodDefinition := builder ensureClassNamed: #MethodDefinition. - pair := builder ensureClassNamed: #Pair. - pairPattern := builder ensureClassNamed: #PairPattern. - computedPropertyName := builder ensureClassNamed: #ComputedPropertyName. publicFieldDefinition := builder ensureClassNamed: #PublicFieldDefinition. - nonNullExpression := builder ensureClassNamed: #NonNullExpression. - methodSignature := builder ensureClassNamed: #MethodSignature. - abstractMethodSignature := builder ensureClassNamed: #AbstractMethodSignature. - functionSignature := builder ensureClassNamed: #FunctionSignature. - typeAssertion := builder ensureClassNamed: #TypeAssertion. - asExpression := builder ensureClassNamed: #AsExpression. - satisfiesExpression := builder ensureClassNamed: #SatisfiesExpression. - instantiationExpression := builder ensureClassNamed: #InstantiationExpression. - importRequireClause := builder ensureClassNamed: #ImportRequireClause. + decorator := builder ensureClassNamed: #Decorator. extendsClause := builder ensureClassNamed: #ExtendsClause. implementsClause := builder ensureClassNamed: #ImplementsClause. - ambientDeclaration := builder ensureClassNamed: #AmbientDeclaration. - abstractClassDeclaration := builder ensureClassNamed: #AbstractClassDeclaration. - module := builder ensureClassNamed: #Module. - internalModule := builder ensureClassNamed: #InternalModule. - importAlias := builder ensureClassNamed: #ImportAlias. - nestedTypeIdentifier := builder ensureClassNamed: #NestedTypeIdentifier. + + "--- Interfaces ---" interfaceDeclaration := builder ensureClassNamed: #InterfaceDeclaration. + interfaceBody := builder ensureClassNamed: #InterfaceBody. extendsTypeClause := builder ensureClassNamed: #ExtendsTypeClause. - + methodSignature := builder ensureClassNamed: #MethodSignature. + abstractMethodSignature := builder ensureClassNamed: #AbstractMethodSignature. + propertySignature := builder ensureClassNamed: #PropertySignature. + callSignature := builder ensureClassNamed: #CallSignature. + constructSignature := builder ensureClassNamed: #ConstructSignature. + indexSignature := builder ensureClassNamed: #IndexSignature. + + "--- Enums ---" enumDeclaration := builder ensureClassNamed: #EnumDeclaration. enumDeclaration withTesting. - enumBody := builder ensureClassNamed: #EnumBody. enumAssignment := builder ensureClassNamed: #EnumAssignment. + + "--- Modules & Imports/Exports ---" + module := builder ensureClassNamed: #Module. + internalModule := builder ensureClassNamed: #InternalModule. + import := builder ensureClassNamed: #Import. + importStatement := builder ensureClassNamed: #ImportStatement. + importClause := builder ensureClassNamed: #ImportClause. + importAlias := builder ensureClassNamed: #ImportAlias. + importRequireClause := builder ensureClassNamed: #ImportRequireClause. + namespaceImport := builder ensureClassNamed: #NamespaceImport. + namedImports := builder ensureClassNamed: #NamedImports. + importSpecifier := builder ensureClassNamed: #ImportSpecifier. + importAttribute := builder ensureClassNamed: #ImportAttribute. + exportStatement := builder ensureClassNamed: #ExportStatement. + namespaceExport := builder ensureClassNamed: #NamespaceExport. + exportClause := builder ensureClassNamed: #ExportClause. + exportSpecifier := builder ensureClassNamed: #ExportSpecifier. + ambientDeclaration := builder ensureClassNamed: #AmbientDeclaration. + + "--- Type system ---" typeAliasDeclaration := builder ensureClassNamed: #TypeAliasDeclaration. - accessibilityModifier := builder ensureClassNamed: #AccessibilityModifier. - overrideModifier := builder ensureClassNamed: #OverrideModifier. - requiredParameter := builder ensureClassNamed: #RequiredParameter. - optionalParameter := builder ensureClassNamed: #OptionalParameter. - omittingTypeAnnotation := builder ensureClassNamed: #OmittingTypeAnnotation. - addingTypeAnnotation := builder ensureClassNamed: #AddingTypeAnnotation. - optingTypeAnnotation := builder ensureClassNamed: #OptingTypeAnnotation. typeAnnotation := builder ensureClassNamed: #TypeAnnotation. - callExpression := builder ensureClassNamed: #CallExpression. - asserts := builder ensureClassNamed: #Asserts. - assertsAnnotation := builder ensureClassNamed: #AssertsAnnotation. + typeArguments := builder ensureClassNamed: #TypeArguments. + typeParameters := builder ensureClassNamed: #TypeParameters. + typeParameter := builder ensureClassNamed: #TypeParameter. + typeQuery := builder ensureClassNamed: #TypeQuery. + typePredicate := builder ensureClassNamed: #TypePredicate. + typePredicateAnnotation := builder ensureClassNamed: #TypePredicateAnnotation. + defaultType := builder ensureClassNamed: #DefaultType. + constraint := builder ensureClassNamed: #Constraint. + genericType := builder ensureClassNamed: #GenericType. + conditionalType := builder ensureClassNamed: #ConditionalType. + constructorType := builder ensureClassNamed: #ConstructorType. + functionType := builder ensureClassNamed: #FunctionType. optionalType := builder ensureClassNamed: #OptionalType. restType := builder ensureClassNamed: #RestType. - constructorType := builder ensureClassNamed: #ConstructorType. - templateType := builder ensureClassNamed: #TemplateType. - templateLiteralType := builder ensureClassNamed: #TemplateLiteralType. - inferType := builder ensureClassNamed: #InferType. - conditionalType := builder ensureClassNamed: #ConditionalType. - genericType := builder ensureClassNamed: #GenericType. - typePredicate := builder ensureClassNamed: #TypePredicate. - typePredicateAnnotation := builder ensureClassNamed: #TypePredicateAnnotation. - typeQuery := builder ensureClassNamed: #TypeQuery. - indexTypeQuery := builder ensureClassNamed: #IndexTypeQuery. + arrayType := builder ensureClassNamed: #ArrayType. + tupleType := builder ensureClassNamed: #TupleType. + unionType := builder ensureClassNamed: #UnionType. + intersectionType := builder ensureClassNamed: #IntersectionType. + readonlyType := builder ensureClassNamed: #ReadonlyType. + literalType := builder ensureClassNamed: #LiteralType. lookupType := builder ensureClassNamed: #LookupType. + indexTypeQuery := builder ensureClassNamed: #IndexTypeQuery. + inferType := builder ensureClassNamed: #InferType. mappedTypeClause := builder ensureClassNamed: #MappedTypeClause. - literalType := builder ensureClassNamed: #LiteralType. existentialType := builder ensureClassNamed: #ExistentialType. flowMaybeType := builder ensureClassNamed: #FlowMaybeType. parenthesizedType := builder ensureClassNamed: #ParenthesizedType. predefinedType := builder ensureClassNamed: #PredefinedType. - typeArguments := builder ensureClassNamed: #TypeArguments. objectType := builder ensureClassNamed: #ObjectType. - callSignature := builder ensureClassNamed: #CallSignature. - propertySignature := builder ensureClassNamed: #PropertySignature. - typeParameters := builder ensureClassNamed: #TypeParameters. - typeParameter := builder ensureClassNamed: #TypeParameter. - defaultType := builder ensureClassNamed: #DefaultType. - constraint := builder ensureClassNamed: #Constraint. - constructSignature := builder ensureClassNamed: #ConstructSignature. - indexSignature := builder ensureClassNamed: #IndexSignature. - arrayType := builder ensureClassNamed: #ArrayType. - tupleType := builder ensureClassNamed: #TupleType . - readonlyType := builder ensureClassNamed: #ReadonlyType. - unionType := builder ensureClassNamed: #UnionType. - intersectionType := builder ensureClassNamed: #IntersectionType. - functionType := builder ensureClassNamed: #FunctionType. - interfaceBody := builder ensureClassNamed: #InterfaceBody. - propertyIdentifier := builder ensureClassNamed: #PropertyIdentifier. - shorthandPropertyIdentifier := builder ensureClassNamed: #ShorthandPropertyIdentifier. - shorthandPropertyIdentifierPattern := builder ensureClassNamed: #ShorthandPropertyIdentifierPattern. - statementIdentifier := builder ensureClassNamed: #StatementIdentifier. thisType := builder ensureClassNamed: #ThisType. - typeIdentifier := builder ensureClassNamed: #TypeIdentifier. - _ERROR := builder ensureClassNamed: #ERROR. - expression := builder ensureClassNamed: #Expression. - compilationUnit := builder ensureClassNamed: #CompilationUnit. - compilationUnit withTesting. - statement := builder ensureClassNamed: #Statement. - - + templateType := builder ensureClassNamed: #TemplateType. + templateLiteralType := builder ensureClassNamed: #TemplateLiteralType. + + "--- Annotations & Modifiers ---" + accessibilityModifier := builder ensureClassNamed: #AccessibilityModifier. + overrideModifier := builder ensureClassNamed: #OverrideModifier. + requiredParameter := builder ensureClassNamed: #RequiredParameter. + optionalParameter := builder ensureClassNamed: #OptionalParameter. + omittingTypeAnnotation := builder ensureClassNamed: #OmittingTypeAnnotation. + addingTypeAnnotation := builder ensureClassNamed: #AddingTypeAnnotation. + optingTypeAnnotation := builder ensureClassNamed: #OptingTypeAnnotation. + asserts := builder ensureClassNamed: #Asserts. + assertsAnnotation := builder ensureClassNamed: #AssertsAnnotation. + "--- ERROR ---" + _ERROR := builder ensureClassNamed: #ERROR. ] { #category : 'definition' } FASTTypeScriptMetamodelGenerator >> defineHierarchy [ "define class hierarchy" - super defineHierarchy. - "Inheritance" - + "--- Root entity ---" entity --|> tEntity. + entity --|> #TEntityMetaLevelDependency. entity --|> tWithComments. + "--- Program ---" program --|> tEntity. + program --|> #THasImmediateSource. + program withPrecedenceOf: #THasImmediateSource. + + "--- ERROR ---" + _ERROR --|> #THasImmediateSource. + "--- Literal hierarchy (F2) ---" + literal --|> tLiteral. number --|> literal. string --|> literal. null --|> literal. boolean --|> literal. _true --|> boolean. _false --|> boolean. - - abstractClassDeclaration --|> classDeclaration. - - "Traits" - literal --|> tLiteral. string --|> #TStringLiteral. boolean --|> #TBooleanLiteral. null --|> #TNullPointerLiteral. - program --|> tEntity. - program --|> #THasImmediateSource. - program withPrecedenceOf: #THasImmediateSource. - - _ERROR --|> #THasImmediateSource. - program withPrecedenceOf: #THasImmediateSource. - + "--- Trait: tDeclaration ---" + tDeclaration --|> tStatement. + abstractClassDeclaration --|> classDeclaration. classDeclaration --|> tDeclaration. classDeclaration --|> tWithDeclarations. classDeclaration --|> tWithModifiers. - classDeclaration --|> tStatement. - interfaceDeclaration --|> tDeclaration. interfaceDeclaration --|> tWithDeclarations. interfaceDeclaration --|> tWithModifiers. - interfaceDeclaration --|> tStatement. - - enumDeclaration --|> tDeclaration. enumDeclaration --|> tWithDeclarations. enumDeclaration --|> tWithModifiers. - enumDeclaration --|> tStatement. - - typeAnnotation --|> tOptionalField. - typeAnnotation --|> tReturnType. - - assertsAnnotation --|> tReturnType. - - identifier --|> tOptionalField. - - typeArguments --|> tOptionalField. + ambientDeclaration --|> tDeclaration. + functionDeclaration --|> tDeclaration. + functionSignature --|> tDeclaration. + generatorFunctionDeclaration --|> tDeclaration. + importAlias --|> tDeclaration. + internalModule --|> tDeclaration. + lexicalDeclaration --|> tDeclaration. + module --|> tDeclaration. + typeAliasDeclaration --|> tDeclaration. + variableDeclaration --|> tDeclaration. + + "--- Trait: tStatement (via statement concrete class) ---" + statement --|> tStatement. + breakStatement --|> statement. + continueStatement --|> statement. + debuggerStatement --|> statement. + doStatement --|> statement. + emptyStatement --|> statement. + exportStatement --|> statement. + expressionStatement --|> statement. + expressionStatement --|> #TExpressionStatement. + forInStatement --|> statement. + forStatement --|> statement. + ifStatement --|> statement. + importStatement --|> statement. + labeledStatement --|> statement. + returnStatement --|> statement. + statementBlock --|> statement. + statementIdentifier --|> statement. + switchStatement --|> statement. + throwStatement --|> statement. + tryStatement --|> statement. + whileStatement --|> statement. + withStatement --|> statement. - identifier --|> tExpression. + "--- Trait: tExpression (direct) ---" + tPrimaryExpression --|> tExpression. expression --|> tExpression. + identifier --|> tExpression. arrayPattern --|> tExpression. + privatePropertyIdentifier --|> tExpression. + propertyIdentifier --|> tExpression. typeIdentifier --|> tExpression. + internalModule --|> tExpression. + + "--- Type nodes as expressions (TypeScript: types in expression positions) ---" conditionalType --|> tExpression. flowMaybeType --|> tExpression. parenthesizedType --|> tExpression. @@ -499,17 +550,14 @@ FASTTypeScriptMetamodelGenerator >> defineHierarchy [ genericType --|> tExpression. arrayType --|> tExpression. objectType --|> tExpression. - privatePropertyIdentifier --|> tExpression. - propertyIdentifier --|> tExpression. - class --|> tExpression. - this --|> tExpression. - _super --|> tExpression. - array --|> tExpression. - undefined --|> tExpression. - regex --|> tExpression. - arrowFunction --|> tExpression. - unionType --|> tExpression. + tupleType --|> tExpression. + thisType --|> tExpression. + templateType --|> tExpression. + templateLiteralType --|> tExpression. + readonlyType --|> tExpression. + restType --|> tExpression. + optionalType --|> tExpression. typeArguments --|> tExpression. typeAssertion --|> tExpression. typeParameter --|> tExpression. @@ -518,15 +566,27 @@ FASTTypeScriptMetamodelGenerator >> defineHierarchy [ typePredicateAnnotation --|> tExpression. typeQuery --|> tExpression. typeAnnotation --|> tExpression. - tupleType --|> tExpression. - thisType --|> tExpression. - templateType --|> tExpression. - templateLiteralType --|> tExpression. - readonlyType --|> tExpression. - restType --|> tExpression. - optionalType --|> tExpression. + existentialType --|> tExpression. + indexTypeQuery --|> tExpression. + intersectionType --|> tExpression. + literalType --|> tExpression. + lookupType --|> tExpression. + nestedTypeIdentifier --|> tExpression. + + constructorType --|> tExpression. + inferType --|> tExpression. + + asserts --|> tExpression. + assertsAnnotation --|> tExpression. + + objectPattern --|> tExpression . + restPattern --|> tExpression . + + omittingTypeAnnotation --|> tExpression . + optingTypeAnnotation --|> tExpression . + "--- Expression concrete class hierarchy (F2) ---" binaryExpression --|> expression. unaryExpression --|> expression. memberExpression --|> expression. @@ -548,451 +608,986 @@ FASTTypeScriptMetamodelGenerator >> defineHierarchy [ yieldExpression --|> expression. object --|> expression. - statement --|> tStatement. - breakStatement --|> statement. - labeledStatement --|> statement. - statementIdentifier --|> statement. - doStatement --|> statement. - importStatement --|> statement. - debuggerStatement --|> statement. - exportStatement --|> statement. - switchStatement --|> statement. - forStatement --|> statement. - returnStatement --|> statement. - withStatement --|> statement. - throwStatement --|> statement. - emptyStatement --|> statement. - tryStatement --|> statement. - ifStatement --|> statement. - forInStatement --|> statement. - statementBlock --|> statement. - continueStatement --|> statement. - expressionStatement --|> statement. - expressionStatement --|> #TExpressionStatement . - whileStatement --|> statement. + "--- Trait: tPattern (F1) ---" + arrayPattern --|> tPattern. + identifier --|> tPattern. + memberExpression --|> tPattern. + nonNullExpression --|> tPattern. + objectPattern --|> tPattern. + restPattern --|> tPattern. + subscriptExpression --|> tPattern. + undefined --|> tPattern. + + "--- Trait: tPrimaryExpression (F1) ---" + array --|> tPrimaryExpression. + arrowFunction --|> tPrimaryExpression. + callExpression --|> tPrimaryExpression. + class --|> tPrimaryExpression. + _false --|> tPrimaryExpression. + functionExpression --|> tPrimaryExpression. + generatorFunction --|> tPrimaryExpression. + identifier --|> tPrimaryExpression. + memberExpression --|> tPrimaryExpression. + metaProperty --|> tPrimaryExpression. + nonNullExpression --|> tPrimaryExpression. + null --|> tPrimaryExpression. + number --|> tPrimaryExpression. + object --|> tPrimaryExpression. + parenthesizedExpression --|> tPrimaryExpression. + regex --|> tPrimaryExpression. + string --|> tPrimaryExpression. + subscriptExpression --|> tPrimaryExpression. + _super --|> tPrimaryExpression. + templateString --|> tPrimaryExpression. + this --|> tPrimaryExpression. + _true --|> tPrimaryExpression. + undefined --|> tPrimaryExpression. + + "--- Trait: tPrimaryType (F1) ---" + tPrimaryType --|> tType. + arrayType --|> tPrimaryType. + conditionalType --|> tPrimaryType. + existentialType --|> tPrimaryType. + flowMaybeType --|> tPrimaryType. + genericType --|> tPrimaryType. + indexTypeQuery --|> tPrimaryType. + intersectionType --|> tPrimaryType. + literalType --|> tPrimaryType. + lookupType --|> tPrimaryType. + nestedTypeIdentifier --|> tPrimaryType. + objectType --|> tPrimaryType. + parenthesizedType --|> tPrimaryType. + predefinedType --|> tPrimaryType. + templateLiteralType --|> tPrimaryType. + thisType --|> tPrimaryType. + tupleType --|> tPrimaryType. + typeIdentifier --|> tPrimaryType. + typeQuery --|> tPrimaryType. + unionType --|> tPrimaryType. + + "--- Trait: tType (F1) ---" + callExpression --|> tType. + constructorType --|> tType. + functionType --|> tType. + inferType --|> tType. + memberExpression --|> tType. + readonlyType --|> tType. + + "--- Trait: tOptionalField (F2) ---" + typeAnnotation --|> tOptionalField. + identifier --|> tOptionalField. + typeArguments --|> tOptionalField. - typePredicateAnnotation --|> typeAnnotation + "--- Trait: tReturnType (F2) ---" + typeAnnotation --|> tReturnType. + assertsAnnotation --|> tReturnType. - "_function_type --|> tWithParameters. " + "--- Concrete class inheritance ---" + typePredicateAnnotation --|> typeAnnotation. ] { #category : 'definition' } FASTTypeScriptMetamodelGenerator >> defineRelations [ - super defineRelations. - (entity property: #genericChildren) - <>-* (entity property: #genericParent). - (entity property: #value) <>-* (entity property: #valueParent). - - ((program property: #classDeclarations) comment: - 'The class declarations that I define') - <>-* - ((classDeclaration property: #programClassDeclarationOwner) - comment: 'The program that contains me'). - - ((program property: #enumDeclarations) comment: - 'The enum declarations that I define') - <>-* - ((enumDeclaration property: #programEnumDeclarationOwner) comment: - 'The program that contains me'). - - ((program property: #interfaceDeclarations) comment: - 'The interface declarations that I define') - <>-* - ((interfaceDeclaration property: #programInterfaceDeclarationOwner) - comment: 'The program that contains me'). - - ((forInStatement property: #left) comment: - 'The left operand (if possible)') - <>- - ((tExpression property: #forStatementLeftOwner) comment: 'My owner'). - - ((forInStatement property: #right) comment: - 'The right operand (if possible)') - <>- - ((tExpression property: #forStatementRightOwner) comment: 'My owner'). - ((forInStatement property: #body) comment: 'My body') - <>- ((statementBlock property: #forInStatementBodyOwner) comment: - 'The owner of this body'). - - ((binaryExpression property: #left) comment: - 'The left operand (if possible)') - <>- ((tExpression property: #binaryExpressionLeftOwner) comment: - 'My Owner'). - ((binaryExpression property: #right) comment: - 'The right operand (if possible)') - <>- ((tExpression property: #binaryExpressionRightOwner) comment: - 'My Owner'). - - "--- FOR STATEMENT RELATIONS ---" - (forStatement property: #initializer) <>- (lexicalDeclaration property: #forInitializerOwner). - (forStatement property: #condition) <>- (binaryExpression property: #forConditionOwner). - (forStatement property: #increment) <>- (updateExpression property: #forIncrementOwner). - (forStatement property: #body) <>- (statementBlock property: #forBodyOwner). - - - ((newExpression property: #constructor) comment: - 'The constructor of the new expression') - <>- ((tExpression property: #newExpressionConstructorOwner) comment: - 'The owner of this constructor'). - - ((newExpression property: #arguments) comment: - 'The arguments of the new expression') - <>- ((arguments property: #newExpressionArgumentsOwner) comment: - 'The owner of these arguments'). - - ((newExpression property: #type_arguments) comment: - 'The type arguments of the new expression if they exist between <>') - <>- - ((typeArguments property: #newExpressionTypeArgumentsOwner) - comment: 'The owner of these type arguments'). - - ((indexSignature property: #index_type) comment: 'My type idetifier') - <>- - ((typeIdentifier property: #indexSignatureIndexTypeOwner) comment: - 'The owner of this index type'). + "--- Generic tree structure ---" + (entity property: #genericChildren) <>-* (entity property: #genericParent). - ((indexSignature property: #type) comment: 'My annotation type') - <>- ((typeAnnotation property: #indexSignatureTypeOwner) comment: - 'The owner of this type'). + "--- Program typed declarations (F2) ---" + ((program property: #classDeclarations) comment: 'The class declarations that I define') + <>-* ((classDeclaration property: #programClassDeclarationOwner) comment: 'The program that contains me'). + ((program property: #enumDeclarations) comment: 'The enum declarations that I define') + <>-* ((enumDeclaration property: #programEnumDeclarationOwner) comment: 'The program that contains me'). + ((program property: #interfaceDeclarations) comment: 'The interface declarations that I define') + <>-* ((interfaceDeclaration property: #programInterfaceDeclarationOwner) comment: 'The program that contains me'). - ((indexSignature property: #name) comment: 'My name') - <>- ((identifier property: #indexSignatureNameOwner) comment: - 'The owner of this identifier'). + "--- Trait relations (F2) ---" + ((tWithDeclarations property: #declarations) comment: 'The elements I declare') + <>-* ((tDeclaration property: #tWithDeclarationsDeclarationsOwner) comment: 'The element that declares me'). + ((tWithModifiers property: #modifiers) comment: 'My modifiers') + <>-* ((tModifier property: #tWithModifiersModifiersOwner) comment: 'The owner of the modifier'). - ((functionType property: #return_type) comment: 'My return type') - <>- ((tExpression property: #functionTypeReturnTypeOwner) comment: - 'The owner of this type'). - ((functionType property: #parameters) comment: 'My parameters') - <>- - ((formalParameters property: #functionTypeParametersOwner) comment: - 'My owner'). + " ABSTRACT_METHOD_SIGNATURE " + ((abstractMethodSignature property: #return_type) comment: '') + <>- ((entity property: #abstractMethodSignatureReturnTypeOwner) comment: ''). + ((abstractMethodSignature property: #name) comment: '') + <>- ((entity property: #abstractMethodSignatureNameOwner) comment: ''). + ((abstractMethodSignature property: #type_parameters) comment: '') + <>- ((typeParameters property: #abstractMethodSignatureTypeParametersOwner) comment: ''). + ((abstractMethodSignature property: #parameters) comment: '') + <>- ((formalParameters property: #abstractMethodSignatureParametersOwner) comment: ''). - ((unaryExpression property: #argument) comment: 'My argument') - <>- ((tExpression property: #unaryExpressionArgumentOwner) comment: - 'The owner of this class'). + " ADDING_TYPE_ANNOTATION (SINGLE CHILD) " + ((addingTypeAnnotation property: #childrenNode) comment: '') + <>- ((entity property: #addingTypeAnnotationOwner) comment: ''). - ((extendsTypeClause property: #type) comment: 'My type identifier') - <>- ((typeIdentifier property: #extendsTypeClauseTypeOwner) comment: - 'The owner of this type identifier'). + " AMBIENT_DECLARATION (COLLECTION) " + ((ambientDeclaration property: #childrenNodes) comment: '') + <>-* ((entity property: #ambientDeclarationOwner) comment: ''). - ((withStatement property: #object) comment: - 'My object as parenthesized expression') - <>- ((parenthesizedExpression property: #withStatementObjectOwner) - comment: 'The owner of this type parenthesized expression'). + " ARGUMENTS " + ((arguments property: #argumentsList) comment: 'The list of arguments (expressions or spread elements)') + <>-* ((tEntity property: #argumentsOwner) comment: 'The arguments node that owns me'). - ((withStatement property: #body) comment: - 'My body as statement block') - <>- ((statementBlock property: #withStatementBodyOwner) comment: - 'The owner of this statement block'). + " ARRAY (COLLECTION) " + ((array property: #childrenNodes) comment: '') + <>-* ((entity property: #arrayOwner) comment: ''). - ((nestedIdentifier property: #object) comment: - 'My object as identifier') - <>- ((identifier property: #nestedIdentifierObjectOwner) comment: - 'The owner of this identifier'). + " ARRAY_PATTERN (COLLECTION) " + ((arrayPattern property: #childrenNodes) comment: '') + <>-* ((entity property: #arrayPatternOwner) comment: ''). - ((nestedIdentifier property: #property) comment: - 'My property as property identifier') - <>- ((propertyIdentifier property: #nestedIdentifierPropertyOwner) - comment: 'The owner of this property identifier'). + " ARRAY_TYPE (SINGLE CHILD) " + ((arrayType property: #childrenNode) comment: '') + <>- ((entity property: #arrayTypeOwner) comment: ''). - ((genericType property: #name) comment: 'My name as type identifier') - <>- ((typeIdentifier property: #genericTypeNameOwner) comment: - 'The owner of this type identifier'). + " ARROW_FUNCTION " + ((arrowFunction property: #parameters) comment: 'The parameters of the arrow function') + <>- ((formalParameters property: #arrowFunctionParametersOwner) comment: 'My owner'). + ((arrowFunction property: #body) comment: 'The body of the arrow function') + <>- ((tEntity property: #arrowFunctionBodyOwner) comment: 'My owner'). + ((arrowFunction property: #type_parameters) comment: '') + <>- ((typeParameters property: #arrowFunctionTypeParametersOwner) comment: ''). + ((arrowFunction property: #parameter) comment: 'The single parameter of the arrow function') + <>- ((identifier property: #arrowFunctionParameterOwner) comment: 'My owner'). + ((arrowFunction property: #return_type) comment: '') + <>- ((entity property: #arrowFunctionReturnTypeOwner) comment: ''). - ((genericType property: #type_arguments) comment: - 'My name as type identifier') - <>- - ((typeArguments property: #genericTypeTypeArgumentsOwner) comment: - 'The owner of this type arguments'). + " AS_EXPRESSION (COLLECTION) " + ((asExpression property: #childrenNodes) comment: '') + <>-* ((entity property: #asExpressionOwner) comment: ''). - ((constructorType property: #type) comment: - 'My type as type identifier') - <>- ((typeIdentifier property: #constructorTypeTypeOwner) comment: - 'The owner of this type identifier'). + " ASSERTS (SINGLE CHILD) " + ((asserts property: #childrenNode) comment: '') + <>- ((entity property: #assertsOwner) comment: ''). - ((constructorType property: #parameters) comment: 'My parameters') - <>- ((formalParameters property: #constructorTypeParametersOwner) - comment: 'The owner of these formal parameters'). - - ((optionalParameter property: #type) comment: - 'My type as type annotation') - <>- ((typeAnnotation property: #optionalParameterTypeOwner) comment: - 'The owner of this type annotation'). - - ((optionalParameter property: #pattern) comment: - 'My pattern as identifier') - <>- ((identifier property: #optionalParameterPatternOwner) comment: - 'The owner of this identifier'). - - ((ifStatement property: #condition) comment: - 'My condition as parenthesized expression') - <>- ((parenthesizedExpression property: #ifStatementConditionOwner) - comment: 'The owner of this parenthesized expression'). - - ((ifStatement property: #consequence) comment: - 'My consequence as statement block') - <>- - ((statementBlock property: #ifStatementConsequenceOwner) comment: - 'The owner of this statement block'). + " ASSERTS_ANNOTATION (SINGLE CHILD) " + ((assertsAnnotation property: #childrenNode) comment: '') + <>- ((entity property: #assertsAnnotationOwner) comment: ''). - ((augmentedAssignmentExpression property: #left) comment: 'left') - <>- ((tExpression property: #augmentedAssignmentExpressionLeftOwner) - comment: 'The left operand (if possible)'). + " ASSIGNMENT_EXPRESSION " + ((assignmentExpression property: #left) comment: 'The left operand') + <>- ((tExpression property: #assignmentExpressionLeftOwner) comment: 'The expression parent'). + ((assignmentExpression property: #right) comment: 'The right operand') + <>- ((tExpression property: #assignmentExpressionRightOwner) comment: 'The expression parent'). + + " ASSIGNMENT_PATTERN " + ((assignmentPattern property: #right) comment: '') + <>- ((tExpression property: #assignmentPatternRightOwner) comment: ''). + ((assignmentPattern property: #left) comment: '') + <>- ((tPattern property: #assignmentPatternLeftOwner) comment: ''). + " AUGMENTED_ASSIGNMENT_EXPRESSION " + ((augmentedAssignmentExpression property: #operator) comment: '') + <>- ((entity property: #augmentedAssignmentExpressionOperatorOwner) comment: ''). + ((augmentedAssignmentExpression property: #left) comment: 'left') + <>- ((tExpression property: #augmentedAssignmentExpressionLeftOwner) comment: 'The left operand (if possible)'). ((augmentedAssignmentExpression property: #right) comment: 'right') - <>- - ((tExpression property: #augmentedAssignmentExpressionRightOwner) - comment: 'The right operand (if possible)'). + <>- ((tExpression property: #augmentedAssignmentExpressionRightOwner) comment: 'The right operand (if possible)'). + + " AWAIT_EXPRESSION (SINGLE CHILD) " + ((awaitExpression property: #childrenNode) comment: '') + <>- ((entity property: #awaitExpressionOwner) comment: ''). + + " BINARY_EXPRESSION " + ((binaryExpression property: #operator) comment: '') + <>- ((entity property: #binaryExpressionOperatorOwner) comment: ''). + ((binaryExpression property: #left) comment: 'The left operand (if possible)') + <>- ((tExpression property: #binaryExpressionLeftOwner) comment: 'My Owner'). + ((binaryExpression property: #right) comment: 'The right operand (if possible)') + <>- ((tExpression property: #binaryExpressionRightOwner) comment: 'My Owner'). + + " BREAK_STATEMENT " + ((breakStatement property: #label) comment: '') + <>- ((statementIdentifier property: #breakStatementLabelOwner) comment: ''). + + " CALL_EXPRESSION " + ((callExpression property: #type_arguments) comment: '') + <>- ((typeArguments property: #callExpressionTypeArgumentsOwner) comment: ''). + ((callExpression property: #function) comment: '') + <>- ((entity property: #callExpressionFunctionOwner) comment: ''). + ((callExpression property: #arguments) comment: '') + <>- ((entity property: #callExpressionArgumentsOwner) comment: ''). + + " CALL_SIGNATURE " + ((callSignature property: #return_type) comment: '') + <>- ((entity property: #callSignatureReturnTypeOwner) comment: ''). + ((callSignature property: #type_parameters) comment: '') + <>- ((typeParameters property: #callSignatureTypeParametersOwner) comment: ''). + ((callSignature property: #parameters) comment: '') + <>- ((formalParameters property: #callSignatureParametersOwner) comment: ''). + + " CATCH_CLAUSE " + ((catchClause property: #parameter) comment: '') + <>- ((entity property: #catchClauseParameterOwner) comment: ''). + ((catchClause property: #body) comment: '') + <>- ((statementBlock property: #catchClauseBodyOwner) comment: ''). + ((catchClause property: #type) comment: '') + <>- ((typeAnnotation property: #catchClauseTypeOwner) comment: ''). + + " CLASS " + ((class property: #decorator) comment: '') + <>-* ((decorator property: #classDecoratorOwner) comment: ''). + ((class property: #name) comment: '') + <>- ((typeIdentifier property: #classNameOwner) comment: ''). + ((class property: #body) comment: '') + <>- ((classBody property: #classBodyOwner) comment: ''). + ((class property: #type_parameters) comment: '') + <>- ((typeParameters property: #classTypeParametersOwner) comment: ''). + + " CLASS_BODY " + ((classBody property: #decorator) comment: '') + <>-* ((decorator property: #classBodyDecoratorOwner) comment: ''). + + " CLASS_DECLARATION " + ((classDeclaration property: #decorator) comment: '') + <>-* ((decorator property: #classDeclarationDecoratorOwner) comment: ''). + ((classDeclaration property: #name) comment: 'The name of the class') + <>- ((typeIdentifier property: #classDeclarationNameOwner) comment: 'My owner'). + ((classDeclaration property: #body) comment: 'The body of the class') + <>- ((classBody property: #classDeclarationBodyOwner) comment: 'The class declaration that contains me'). + ((classDeclaration property: #type_parameters) comment: '') + <>- ((typeParameters property: #classDeclarationTypeParametersOwner) comment: ''). - ((conditionalType property: #left) comment: 'left') - <>- ((tExpression property: #conditionalTypeLeftOwner) comment: - 'The left operand (if possible)'). + " CLASS_HERITAGE (COLLECTION) " + ((classHeritage property: #childrenNodes) comment: '') + <>-* ((entity property: #classHeritageOwner) comment: ''). - ((conditionalType property: #right) comment: 'right') - <>- ((tExpression property: #conditionalTypeRightOwner) comment: - 'The right operand (if possible)'). + " CLASS_STATIC_BLOCK " + ((classStaticBlock property: #body) comment: '') + <>- ((statementBlock property: #classStaticBlockBodyOwner) comment: ''). - ((conditionalType property: #alternative) comment: 'alternative') - <>- - ((tExpression property: #conditionalTypeAlternativeOwner) comment: - 'Alternative owner'). + " COMPUTED_PROPERTY_NAME (SINGLE CHILD) " + ((computedPropertyName property: #childrenNode) comment: '') + <>- ((entity property: #computedPropertyNameOwner) comment: ''). + " CONDITIONAL_TYPE " + ((conditionalType property: #left) comment: 'left') + <>- ((tExpression property: #conditionalTypeLeftOwner) comment: 'The left operand (if possible)'). + ((conditionalType property: #right) comment: 'right') + <>- ((tExpression property: #conditionalTypeRightOwner) comment: 'The right operand (if possible)'). + ((conditionalType property: #alternative) comment: 'alternative') + <>- ((tExpression property: #conditionalTypeAlternativeOwner) comment: 'Alternative owner'). ((conditionalType property: #consequence) comment: 'consequence') - <>- - ((tExpression property: #conditionalTypeConsequenceOwner) comment: - 'Consequence owner'). - - ((tryStatement property: #body) comment: 'Body') - <>- ((statementBlock property: #tryStatementBodyOwner) comment: - 'Try statement owner'). + <>- ((tExpression property: #conditionalTypeConsequenceOwner) comment: 'Consequence owner'). + + " CONSTRAINT (SINGLE CHILD) " + ((constraint property: #childrenNode) comment: '') + <>- ((entity property: #constraintOwner) comment: ''). + + " CONSTRUCT_SIGNATURE " + ((constructSignature property: #type) comment: '') + <>- ((typeAnnotation property: #constructSignatureTypeOwner) comment: ''). + ((constructSignature property: #type_parameters) comment: '') + <>- ((typeParameters property: #constructSignatureTypeParametersOwner) comment: ''). + ((constructSignature property: #parameters) comment: '') + <>- ((formalParameters property: #constructSignatureParametersOwner) comment: ''). + + " CONSTRUCTOR_TYPE " + ((constructorType property: #type) comment: 'My type as type identifier') + <>- ((tExpression property: #constructorTypeTypeOwner) comment: 'The owner of this type identifier'). + ((constructorType property: #type_parameters) comment: '') + <>- ((typeParameters property: #constructorTypeTypeParametersOwner) comment: ''). + ((constructorType property: #parameters) comment: 'My parameters') + <>- ((formalParameters property: #constructorTypeParametersOwner) comment: 'The owner of these formal parameters'). - ((tryStatement property: #handler) comment: 'Handler') - <>- ((catchClause property: #tryStatementHandlerOwner) comment: - 'Try statement owner'). + " CONTINUE_STATEMENT " + ((continueStatement property: #label) comment: '') + <>- ((statementIdentifier property: #continueStatementLabelOwner) comment: ''). - ((tryStatement property: #finalizer) comment: 'Finalizer') - <>- ((finallyClause property: #tryStatementFinalizerOwner) comment: - 'Try statement owner'). + " DECORATOR (SINGLE CHILD) " + ((decorator property: #childrenNode) comment: '') + <>- ((entity property: #decoratorOwner) comment: ''). - ((memberExpression property: #object) comment: 'Object') - <>- ((tExpression property: #memberExpressionObjectOwner) comment: - 'This owner'). + " DEFAULT_TYPE (SINGLE CHILD) " + ((defaultType property: #childrenNode) comment: '') + <>- ((entity property: #defaultTypeOwner) comment: ''). - ((memberExpression property: #property) comment: 'Property') - <>- ((tExpression property: #memberExpressionPropertyOwner) comment: - 'My owner'). + " DO_STATEMENT " + ((doStatement property: #condition) comment: '') + <>- ((parenthesizedExpression property: #doStatementConditionOwner) comment: ''). + ((doStatement property: #body) comment: '') + <>- ((tStatement property: #doStatementBodyOwner) comment: ''). - ((exportSpecifier property: #name) comment: 'Name') - <>- - ((identifier property: #exportSpecifierNameOwner) comment: 'My owner'). + " ELSE_CLAUSE (SINGLE CHILD) " + ((elseClause property: #childrenNode) comment: '') + <>- ((entity property: #elseClauseOwner) comment: ''). - ((exportSpecifier property: #alias) comment: - 'My alias in case it exists') - <>- ((tOptionalField property: #exportSpecifierAliasOwner) comment: - 'My owner'). + " ENUM_ASSIGNMENT " + ((enumAssignment property: #name) comment: '') + <>- ((entity property: #enumAssignmentNameOwner) comment: ''). + ((enumAssignment property: #value) comment: '') + <>- ((tExpression property: #enumAssignmentValueOwner) comment: ''). - ((methodDefinition property: #return_type) comment: - 'My return type in case it exists') - <>- - ((tOptionalField property: #methodDefinitionReturnTypeOwner) - comment: 'My owner'). + " ENUM_BODY " + ((enumBody property: #name) comment: '') + <>-* ((entity property: #enumBodyNameOwner) comment: ''). - ((methodDefinition property: #name) comment: 'My name') - <>- - ((propertyIdentifier property: #methodDefinitionNameOwner) comment: - 'My owner'). + " ENUM_DECLARATION " + ((enumDeclaration property: #name) comment: 'The name of the enum') + <>- ((identifier property: #enumDeclarationNameOwner) comment: 'My owner'). + ((enumDeclaration property: #body) comment: 'The body of the enum') + <>- ((enumBody property: #enumDeclarationBodyOwner) comment: 'The enum declaration that contains me'). - ((methodDefinition property: #body) comment: 'My body') - <>- ((statementBlock property: #methodDefinitionBodyOwner) comment: - 'My owner'). + " EXPORT_CLAUSE (COLLECTION) " + ((exportClause property: #childrenNodes) comment: '') + <>-* ((entity property: #exportClauseOwner) comment: ''). - ((methodDefinition property: #parameters) comment: 'My parameters') - <>- ((formalParameters property: #methodDefinitionParametersOwner) - comment: 'My owner'). + " EXPORT_SPECIFIER " + ((exportSpecifier property: #name) comment: 'Name') + <>- ((identifier property: #exportSpecifierNameOwner) comment: 'My owner'). + ((exportSpecifier property: #alias) comment: 'My alias in case it exists') + <>- ((tOptionalField property: #exportSpecifierAliasOwner) comment: 'My owner'). + + " EXPORT_STATEMENT " + ((exportStatement property: #declaration) comment: '') + <>- ((tDeclaration property: #exportStatementDeclarationOwner) comment: ''). + ((exportStatement property: #decorator) comment: '') + <>-* ((decorator property: #exportStatementDecoratorOwner) comment: ''). + ((exportStatement property: #source) comment: '') + <>- ((string property: #exportStatementSourceOwner) comment: ''). + ((exportStatement property: #value) comment: '') + <>- ((tExpression property: #exportStatementValueOwner) comment: ''). + + " EXPRESSION_STATEMENT (SINGLE CHILD) " + ((expressionStatement property: #expression) comment: '') + <>- ((entity property: #expressionStatementOwner) comment: ''). + + " EXTENDS_CLAUSE " + ((extendsClause property: #value) comment: '') + <>-* ((tExpression property: #extendsClauseValueOwner) comment: ''). + ((extendsClause property: #type_arguments) comment: 'My type arguments') + <>-* ((typeArguments property: #extendsClauseTypeArgumentsOwner) comment: 'My owner'). + + " EXTENDS_TYPE_CLAUSE " + ((extendsTypeClause property: #type) comment: 'My type identifier') + <>- ((tExpression property: #extendsTypeClauseTypeOwner) comment: 'The owner of this type identifier'). + " FINALLY_CLAUSE " ((finallyClause property: #body) comment: 'My body') - <>- ((statementBlock property: #finallyClauseBodyOwner) comment: - 'My owner'). - - ((extendsClause property: #type_arguments) comment: - 'My type arguments') - <>- - ((typeArguments property: #extendsClauseTypeArgumentsOwner) - comment: 'My owner'). - - ((subscriptExpression property: #object) comment: 'My identifier') - <>- - ((tExpression property: #subscriptExpressionObjectOwner) comment: - 'My owner'). - - ((subscriptExpression property: #index) comment: 'My index') - <>- ((tExpression property: #subscriptExpressionIndexOwner) comment: - 'My owner'). - - "((extendsClause property: #value) comment: - 'My value') - <>- ((identifier property: #extendsClauseValueOwner) comment: 'My owner')." + <>- ((statementBlock property: #finallyClauseBodyOwner) comment: 'My owner'). - ((assignmentExpression property: #left) comment: 'The left operand') - <>- ((tExpression property: #assignmentExpressionLeftOwner) comment: - 'The expression parent'). + " FLOW_MAYBE_TYPE (SINGLE CHILD) " + ((flowMaybeType property: #childrenNode) comment: '') + <>- ((entity property: #flowMaybeTypeOwner) comment: ''). - ((assignmentExpression property: #right) comment: 'The right operand') - <>- - ((tExpression property: #assignmentExpressionRightOwner) comment: - 'The expression parent'). - - "((variableDeclarator property: #name) comment: - 'The identifier') - <>- ((identifier property: #variableDeclaratorNameOwner) comment: - 'My owner'). - - ((variableDeclarator property: #value) comment: - 'The value') - <>- ((tExpression property: #variableDeclaratorValueOwner) comment: - 'My owner'). " - - "function declaration" - ((functionDeclaration property: #name) comment: - 'The name of the function') - <>- ((identifier property: #functionDeclarationNameOwner) comment: - 'My owner'). - - ((functionDeclaration property: #parameters) comment: - 'The parameters of the function') - <>- - ((formalParameters property: #functionDeclarationParametersOwner) - comment: 'My owner'). - - ((functionDeclaration property: #body) comment: - 'The body of the function') - <>- - ((statementBlock property: #functionDeclarationBodyOwner) comment: - 'My owner'). - - ((functionDeclaration property: #return_type) comment: - 'The return type of the function (in case it exists)') - <>- - ((tReturnType property: #functionDeclarationReturnTypeOwner) - comment: 'My owner'). - - - - + " FOR_IN_STATEMENT " + ((forInStatement property: #left) comment: 'The left operand (if possible)') + <>- ((tExpression property: #forInStatementLeftOwner) comment: 'My owner'). + ((forInStatement property: #right) comment: 'The right operand (if possible)') + <>- ((tExpression property: #forInStatementRightOwner) comment: 'My owner'). + ((forInStatement property: #body) comment: 'My body') + <>- ((statementBlock property: #forInStatementBodyOwner) comment: 'The owner of this body'). + ((forInStatement property: #value) comment: '') + <>- ((tExpression property: #forInStatementValueOwner) comment: ''). + ((forInStatement property: #operator) comment: '') + <>- ((entity property: #forInStatementOperatorOwner) comment: ''). + ((forInStatement property: #kind) comment: '') + <>- ((entity property: #forInStatementKindOwner) comment: ''). + + " FOR_STATEMENT " + ((forStatement property: #initializer) comment: '') + <>- ((entity property: #forStatementInitializerOwner) comment: ''). + ((forStatement property: #condition) comment: '') + <>-* ((entity property: #forStatementConditionOwner) comment: ''). + ((forStatement property: #increment) comment: '') + <>- ((entity property: #forStatementIncrementOwner) comment: ''). + ((forStatement property: #body) comment: '') + <>- ((tStatement property: #forStatementBodyOwner) comment: ''). + + " FORMAL_PARAMETERS " + ((formalParameters property: #parameters) comment: 'The list of parameters') + <>-* ((tEntity property: #parentFormalParameters) comment: 'My owner'). - "class declaration" - ((classDeclaration property: #body) comment: 'The body of the class') - <>- ((classBody property: #classDeclarationBodyOwner) comment: - 'The class declaration that contains me'). + " FUNCTION_DECLARATION " + ((functionDeclaration property: #name) comment: 'The name of the function') + <>- ((identifier property: #functionDeclarationNameOwner) comment: 'My owner'). + ((functionDeclaration property: #parameters) comment: 'The parameters of the function') + <>- ((formalParameters property: #functionDeclarationParametersOwner) comment: 'My owner'). + ((functionDeclaration property: #body) comment: 'The body of the function') + <>- ((statementBlock property: #functionDeclarationBodyOwner) comment: 'My owner'). + ((functionDeclaration property: #type_parameters) comment: '') + <>- ((typeParameters property: #functionDeclarationTypeParametersOwner) comment: ''). + ((functionDeclaration property: #return_type) comment: 'The return type of the function (in case it exists)') + <>- ((tReturnType property: #functionDeclarationReturnTypeOwner) comment: 'My owner'). + + " FUNCTION_EXPRESSION " + ((functionExpression property: #parameters) comment: '') + <>- ((formalParameters property: #functionExpressionParametersOwner) comment: ''). + ((functionExpression property: #body) comment: '') + <>- ((statementBlock property: #functionExpressionBodyOwner) comment: ''). + ((functionExpression property: #type_parameters) comment: '') + <>- ((typeParameters property: #functionExpressionTypeParametersOwner) comment: ''). + ((functionExpression property: #return_type) comment: '') + <>- ((entity property: #functionExpressionReturnTypeOwner) comment: ''). + ((functionExpression property: #name) comment: '') + <>- ((identifier property: #functionExpressionNameOwner) comment: ''). + + " FUNCTION_SIGNATURE " + ((functionSignature property: #return_type) comment: '') + <>- ((entity property: #functionSignatureReturnTypeOwner) comment: ''). + ((functionSignature property: #name) comment: '') + <>- ((identifier property: #functionSignatureNameOwner) comment: ''). + ((functionSignature property: #type_parameters) comment: '') + <>- ((typeParameters property: #functionSignatureTypeParametersOwner) comment: ''). + ((functionSignature property: #parameters) comment: '') + <>- ((formalParameters property: #functionSignatureParametersOwner) comment: ''). + + " FUNCTION_TYPE " + ((functionType property: #return_type) comment: 'My return type') + <>- ((tExpression property: #functionTypeReturnTypeOwner) comment: 'The owner of this type'). + ((functionType property: #type_parameters) comment: '') + <>- ((typeParameters property: #functionTypeTypeParametersOwner) comment: ''). + ((functionType property: #parameters) comment: 'My parameters') + <>- ((formalParameters property: #functionTypeParametersOwner) comment: 'My owner'). + + " GENERATOR_FUNCTION " + ((generatorFunction property: #parameters) comment: '') + <>- ((formalParameters property: #generatorFunctionParametersOwner) comment: ''). + ((generatorFunction property: #body) comment: '') + <>- ((statementBlock property: #generatorFunctionBodyOwner) comment: ''). + ((generatorFunction property: #type_parameters) comment: '') + <>- ((typeParameters property: #generatorFunctionTypeParametersOwner) comment: ''). + ((generatorFunction property: #return_type) comment: '') + <>- ((entity property: #generatorFunctionReturnTypeOwner) comment: ''). + ((generatorFunction property: #name) comment: '') + <>- ((identifier property: #generatorFunctionNameOwner) comment: ''). + + " GENERATOR_FUNCTION_DECLARATION " + ((generatorFunctionDeclaration property: #parameters) comment: '') + <>- ((formalParameters property: #generatorFunctionDeclarationParametersOwner) comment: ''). + ((generatorFunctionDeclaration property: #body) comment: '') + <>- ((statementBlock property: #generatorFunctionDeclarationBodyOwner) comment: ''). + ((generatorFunctionDeclaration property: #type_parameters) comment: '') + <>- ((typeParameters property: #generatorFunctionDeclarationTypeParametersOwner) comment: ''). + ((generatorFunctionDeclaration property: #return_type) comment: '') + <>- ((entity property: #generatorFunctionDeclarationReturnTypeOwner) comment: ''). + ((generatorFunctionDeclaration property: #name) comment: '') + <>- ((identifier property: #generatorFunctionDeclarationNameOwner) comment: ''). + + " GENERIC_TYPE " + ((genericType property: #name) comment: 'My name as type identifier') + <>- ((tExpression property: #genericTypeNameOwner) comment: 'The owner of this type identifier'). + ((genericType property: #type_arguments) comment: 'My type arguments') + <>- ((typeArguments property: #genericTypeTypeArgumentsOwner) comment: 'The owner of this type arguments'). + + " IF_STATEMENT " + ((ifStatement property: #condition) comment: 'My condition as parenthesized expression') + <>- ((parenthesizedExpression property: #ifStatementConditionOwner) comment: 'The owner of this parenthesized expression'). + ((ifStatement property: #alternative) comment: '') + <>- ((elseClause property: #ifStatementAlternativeOwner) comment: ''). + ((ifStatement property: #consequence) comment: 'My consequence as statement block') + <>- ((statementBlock property: #ifStatementConsequenceOwner) comment: 'The owner of this statement block'). + + " IMPLEMENTS_CLAUSE (COLLECTION) " + ((implementsClause property: #childrenNodes) comment: '') + <>-* ((entity property: #implementsClauseOwner) comment: ''). + + " IMPORT_ALIAS (COLLECTION) " + ((importAlias property: #childrenNodes) comment: '') + <>-* ((entity property: #importAliasOwner) comment: ''). + + " IMPORT_ATTRIBUTE (SINGLE CHILD) " + ((importAttribute property: #childrenNode) comment: '') + <>- ((entity property: #importAttributeOwner) comment: ''). + + " IMPORT_CLAUSE (COLLECTION) " + ((importClause property: #childrenNodes) comment: '') + <>-* ((entity property: #importClauseOwner) comment: ''). + + " IMPORT_REQUIRE_CLAUSE " + ((importRequireClause property: #source) comment: '') + <>- ((string property: #importRequireClauseSourceOwner) comment: ''). + + " IMPORT_SPECIFIER " + ((importSpecifier property: #alias) comment: '') + <>- ((identifier property: #importSpecifierAliasOwner) comment: ''). + ((importSpecifier property: #name) comment: '') + <>- ((tPrimaryExpression property: #importSpecifierNameOwner) comment: ''). + + " IMPORT_STATEMENT " + ((importStatement property: #source) comment: '') + <>- ((string property: #importStatementSourceOwner) comment: ''). + + " INDEX_SIGNATURE " + ((indexSignature property: #index_type) comment: 'My type identifier') + <>- ((tExpression property: #indexSignatureIndexTypeOwner) comment: 'The owner of this index type'). + ((indexSignature property: #type) comment: 'My annotation type') + <>- ((tExpression property: #indexSignatureTypeOwner) comment: 'The owner of this type'). + ((indexSignature property: #name) comment: 'My name') + <>- ((identifier property: #indexSignatureNameOwner) comment: 'The owner of this identifier'). + ((indexSignature property: #sign) comment: '') + <>- ((entity property: #indexSignatureSignOwner) comment: ''). - ((classDeclaration property: #name) comment: 'The name of the class') - <>- ((typeIdentifier property: #classDeclarationNameOwner) comment: - 'My owner'). + " INDEX_TYPE_QUERY (SINGLE CHILD) " + ((indexTypeQuery property: #childrenNode) comment: '') + <>- ((entity property: #indexTypeQueryOwner) comment: ''). - "Enum" - - ((enumDeclaration property: #body) comment: 'The body of the enum') - <>- ((enumBody property: #enumDeclarationBodyOwner) comment: - 'The enum declaration that contains me'). + " INFER_TYPE (COLLECTION) " + ((inferType property: #childrenNodes) comment: '') + <>-* ((entity property: #inferTypeOwner) comment: ''). + " INSTANTIATION_EXPRESSION " + ((instantiationExpression property: #function) comment: '') + <>- ((entity property: #instantiationExpressionFunctionOwner) comment: ''). + ((instantiationExpression property: #type_arguments) comment: '') + <>- ((typeArguments property: #instantiationExpressionTypeArgumentsOwner) comment: ''). - ((enumDeclaration property: #name) comment: 'The name of the enum') - <>- - ((identifier property: #enumDeclarationNameOwner) comment: 'My owner'). + " INTERFACE_BODY (COLLECTION) " + ((interfaceBody property: #childrenNodes) comment: '') + <>-* ((entity property: #interfaceBodyOwner) comment: ''). - "Interface" + " INTERFACE_DECLARATION " ((interfaceDeclaration property: #name) comment: 'My name') - <>- - ((typeIdentifier property: #interfaceDeclarationNameOwner) comment: - 'My owner'). - - ((interfaceDeclaration property: #body) comment: - 'The body of the interface') - <>- - ((interfaceBody property: #interfaceDeclarationBodyOwner) comment: - 'The interface declaration that contains me'). - - "Traits" - ((tWithDeclarations property: #declarations) comment: - 'The elements I declare') - <>-* ((tDeclaration property: #tWithDeclarationsDeclarationsOwner) - comment: 'The element that declares me'). + <>- ((typeIdentifier property: #interfaceDeclarationNameOwner) comment: 'My owner'). + ((interfaceDeclaration property: #body) comment: 'The body of the interface') + <>- ((interfaceBody property: #interfaceDeclarationBodyOwner) comment: 'The interface declaration that contains me'). + ((interfaceDeclaration property: #type_parameters) comment: '') + <>- ((typeParameters property: #interfaceDeclarationTypeParametersOwner) comment: ''). + + " INTERNAL_MODULE " + ((internalModule property: #name) comment: '') + <>- ((entity property: #internalModuleNameOwner) comment: ''). + ((internalModule property: #body) comment: '') + <>- ((statementBlock property: #internalModuleBodyOwner) comment: ''). + + " INTERSECTION_TYPE (COLLECTION) " + ((intersectionType property: #childrenNodes) comment: '') + <>-* ((entity property: #intersectionTypeOwner) comment: ''). + + " LABELED_STATEMENT " + ((labeledStatement property: #label) comment: '') + <>- ((statementIdentifier property: #labeledStatementLabelOwner) comment: ''). + ((labeledStatement property: #body) comment: '') + <>- ((tStatement property: #labeledStatementBodyOwner) comment: ''). + + " LEXICAL_DECLARATION " + ((lexicalDeclaration property: #kind) comment: '') + <>- ((entity property: #lexicalDeclarationKindOwner) comment: ''). + + " LITERAL_TYPE (SINGLE CHILD) " + ((literalType property: #childrenNode) comment: '') + <>- ((entity property: #literalTypeOwner) comment: ''). + + " LOOKUP_TYPE (COLLECTION) " + ((lookupType property: #childrenNodes) comment: '') + <>-* ((entity property: #lookupTypeOwner) comment: ''). + + " MAPPED_TYPE_CLAUSE " + ((mappedTypeClause property: #alias) comment: '') + <>- ((tExpression property: #mappedTypeClauseAliasOwner) comment: ''). + ((mappedTypeClause property: #name) comment: '') + <>- ((typeIdentifier property: #mappedTypeClauseNameOwner) comment: ''). + ((mappedTypeClause property: #type) comment: '') + <>- ((tExpression property: #mappedTypeClauseTypeOwner) comment: ''). + + " MEMBER_EXPRESSION " + ((memberExpression property: #object) comment: 'Object') + <>- ((tExpression property: #memberExpressionObjectOwner) comment: 'This owner'). + ((memberExpression property: #property) comment: 'Property') + <>- ((tExpression property: #memberExpressionPropertyOwner) comment: 'My owner'). + ((memberExpression property: #optionalChain) comment: '') + <>- ((optionalChain property: #memberExpressionOptionalChainOwner) comment: ''). - ((tWithModifiers property: #modifiers) comment: 'My modifiers') - <>-* ((tModifier property: #tWithModifiersModifiersOwner) comment: - 'The owner of the modifier'). - - "-----------------------" - "Arguments" - ((arguments property: #argumentsList) comment: 'The list of arguments (expressions or spread elements)') - <>-* ((tEntity property: #argumentsOwner) comment: 'The arguments node that owns me'). - - ((arrowFunction property: #parameter) comment: 'The single parameter of the arrow function') - <>- ((identifier property: #arrowFunctionParameterOwner) comment: 'My owner'). - - ((arrowFunction property: #parameters) comment: 'The parameters of the arrow function') - <>- ((formalParameters property: #arrowFunctionParametersOwner) comment: 'My owner'). - - ((arrowFunction property: #body) comment: 'The body of the arrow function') - <>- ((tEntity property: #arrowFunctionBodyOwner) comment: 'My owner'). - - - "DoStatement" - (doStatement property: #condition) <>- (parenthesizedExpression property: #doConditionOwner). - (doStatement property: #body) <>- (tStatement property: #doBodyOwner). - - "ExpressionStatement" - "((expressionStatement property: #expression) comment: 'The expression contained in the statement') - <>- (tExpression property: #expressionStatementOwner )." - - ((formalParameters property: #parameters) comment: 'The list of parameters') - <>-* ((tEntity property: #parentFormalParameters) comment: 'My owner'). - - (ifStatement property: #alternative) <>- (elseClause property: #ifStatementAlternativeOwner ). - - "RequiredParameter" - ((requiredParameter property: #pattern) comment: 'The pattern (the name) of the required parameter') - <>- (identifier property: #requiredParameterPatternOwner ). - ((requiredParameter property: #type) comment: 'The type of the parameter (optional)') - <>- (tOptionalField property: #requiredParameterTypeOwner ). - - (whileStatement property: #condition) <>- (parenthesizedExpression property: #whileConditionOwner). - (whileStatement property: #body) <>- (tStatement property: #whileBodyOwner). + " METHOD_DEFINITION " + ((methodDefinition property: #name) comment: 'My name') + <>- ((propertyIdentifier property: #methodDefinitionNameOwner) comment: 'My owner'). + ((methodDefinition property: #parameters) comment: 'My parameters') + <>- ((formalParameters property: #methodDefinitionParametersOwner) comment: 'My owner'). + ((methodDefinition property: #body) comment: 'My body') + <>- ((statementBlock property: #methodDefinitionBodyOwner) comment: 'My owner'). + ((methodDefinition property: #type_parameters) comment: '') + <>- ((typeParameters property: #methodDefinitionTypeParametersOwner) comment: ''). + ((methodDefinition property: #return_type) comment: 'My return type in case it exists') + <>- ((tOptionalField property: #methodDefinitionReturnTypeOwner) comment: 'My owner'). + + " METHOD_SIGNATURE " + ((methodSignature property: #return_type) comment: '') + <>- ((entity property: #methodSignatureReturnTypeOwner) comment: ''). + ((methodSignature property: #name) comment: '') + <>- ((entity property: #methodSignatureNameOwner) comment: ''). + ((methodSignature property: #type_parameters) comment: '') + <>- ((typeParameters property: #methodSignatureTypeParametersOwner) comment: ''). + ((methodSignature property: #parameters) comment: '') + <>- ((formalParameters property: #methodSignatureParametersOwner) comment: ''). + + " MODULE " + ((module property: #name) comment: '') + <>- ((entity property: #moduleNameOwner) comment: ''). + ((module property: #body) comment: '') + <>- ((statementBlock property: #moduleBodyOwner) comment: ''). + + " NAMED_IMPORTS (COLLECTION) " + ((namedImports property: #childrenNodes) comment: '') + <>-* ((entity property: #namedImportsOwner) comment: ''). + + " NAMESPACE_EXPORT (SINGLE CHILD) " + ((namespaceExport property: #childrenNode) comment: '') + <>- ((entity property: #namespaceExportOwner) comment: ''). + + " NAMESPACE_IMPORT (SINGLE CHILD) " + ((namespaceImport property: #childrenNode) comment: '') + <>- ((entity property: #namespaceImportOwner) comment: ''). + + " NESTED_IDENTIFIER " + ((nestedIdentifier property: #object) comment: 'My object as identifier') + <>- ((identifier property: #nestedIdentifierObjectOwner) comment: 'The owner of this identifier'). + ((nestedIdentifier property: #property) comment: 'My property as property identifier') + <>- ((propertyIdentifier property: #nestedIdentifierPropertyOwner) comment: 'The owner of this property identifier'). + + " NESTED_TYPE_IDENTIFIER " + ((nestedTypeIdentifier property: #name) comment: '') + <>- ((typeIdentifier property: #nestedTypeIdentifierNameOwner) comment: ''). + ((nestedTypeIdentifier property: #module) comment: '') + <>- ((entity property: #nestedTypeIdentifierModuleOwner) comment: ''). + + " NEW_EXPRESSION " + ((newExpression property: #type_arguments) comment: 'The type arguments of the new expression if they exist between <>') + <>- ((typeArguments property: #newExpressionTypeArgumentsOwner) comment: 'The owner of these type arguments'). + ((newExpression property: #constructor) comment: 'The constructor of the new expression') + <>- ((tExpression property: #newExpressionConstructorOwner) comment: 'The owner of this constructor'). + ((newExpression property: #arguments) comment: 'The arguments of the new expression') + <>- ((arguments property: #newExpressionArgumentsOwner) comment: 'The owner of these arguments'). + + " NON_NULL_EXPRESSION (SINGLE CHILD) " + ((nonNullExpression property: #childrenNode) comment: '') + <>- ((entity property: #nonNullExpressionOwner) comment: ''). + + " OBJECT (COLLECTION) " + ((object property: #childrenNodes) comment: '') + <>-* ((entity property: #objectOwner) comment: ''). + + " OBJECT_ASSIGNMENT_PATTERN " + ((objectAssignmentPattern property: #right) comment: '') + <>- ((tExpression property: #objectAssignmentPatternRightOwner) comment: ''). + ((objectAssignmentPattern property: #left) comment: '') + <>- ((entity property: #objectAssignmentPatternLeftOwner) comment: ''). + + " OBJECT_PATTERN (COLLECTION) " + ((objectPattern property: #childrenNodes) comment: '') + <>-* ((entity property: #objectPatternOwner) comment: ''). + + " OBJECT_TYPE (COLLECTION) " + ((objectType property: #childrenNodes) comment: '') + <>-* ((entity property: #objectTypeOwner) comment: ''). + + " OMITTING_TYPE_ANNOTATION (SINGLE CHILD) " + ((omittingTypeAnnotation property: #childrenNode) comment: '') + <>- ((entity property: #omittingTypeAnnotationOwner) comment: ''). + + " OPTING_TYPE_ANNOTATION (SINGLE CHILD) " + ((optingTypeAnnotation property: #childrenNode) comment: '') + <>- ((entity property: #optingTypeAnnotationOwner) comment: ''). + + " OPTIONAL_PARAMETER " + ((optionalParameter property: #value) comment: '') + <>- ((tExpression property: #optionalParameterValueOwner) comment: ''). + ((optionalParameter property: #pattern) comment: 'My pattern as identifier') + <>- ((tExpression property: #optionalParameterPatternOwner) comment: 'The owner of this identifier'). + ((optionalParameter property: #decorator) comment: '') + <>-* ((decorator property: #optionalParameterDecoratorOwner) comment: ''). + ((optionalParameter property: #name) comment: '') + <>- ((identifier property: #optionalParameterNameOwner) comment: ''). + ((optionalParameter property: #type) comment: 'My type as type annotation') + <>- ((typeAnnotation property: #optionalParameterTypeOwner) comment: 'The owner of this type annotation'). + + " OPTIONAL_TYPE (SINGLE CHILD) " + ((optionalType property: #childrenNode) comment: '') + <>- ((entity property: #optionalTypeOwner) comment: ''). + + " PAIR " + ((pair property: #key) comment: '') + <>- ((entity property: #pairKeyOwner) comment: ''). + ((pair property: #value) comment: '') + <>- ((tExpression property: #pairValueOwner) comment: ''). + + " PAIR_PATTERN " + ((pairPattern property: #key) comment: '') + <>- ((entity property: #pairPatternKeyOwner) comment: ''). + ((pairPattern property: #value) comment: '') + <>- ((entity property: #pairPatternValueOwner) comment: ''). + + " PARENTHESIZED_EXPRESSION " + ((parenthesizedExpression property: #type) comment: '') + <>- ((typeAnnotation property: #parenthesizedExpressionTypeOwner) comment: ''). + + " PARENTHESIZED_TYPE (SINGLE CHILD) " + ((parenthesizedType property: #childrenNode) comment: '') + <>- ((entity property: #parenthesizedTypeOwner) comment: ''). + + " PROGRAM (COLLECTION) " + ((program property: #childrenNodes) comment: '') + <>-* ((entity property: #programOwner) comment: ''). + + " PROPERTY_SIGNATURE " + ((propertySignature property: #name) comment: '') + <>- ((entity property: #propertySignatureNameOwner) comment: ''). + ((propertySignature property: #type) comment: '') + <>- ((typeAnnotation property: #propertySignatureTypeOwner) comment: ''). + + " PUBLIC_FIELD_DEFINITION " + ((publicFieldDefinition property: #decorator) comment: '') + <>-* ((decorator property: #publicFieldDefinitionDecoratorOwner) comment: ''). + ((publicFieldDefinition property: #name) comment: '') + <>- ((entity property: #publicFieldDefinitionNameOwner) comment: ''). + ((publicFieldDefinition property: #value) comment: '') + <>- ((tExpression property: #publicFieldDefinitionValueOwner) comment: ''). + ((publicFieldDefinition property: #type) comment: '') + <>- ((typeAnnotation property: #publicFieldDefinitionTypeOwner) comment: ''). + + " READONLY_TYPE (SINGLE CHILD) " + ((readonlyType property: #childrenNode) comment: '') + <>- ((entity property: #readonlyTypeOwner) comment: ''). + + " REGEX " + ((regex property: #flags) comment: '') + <>- ((regexFlags property: #regexFlagsOwner) comment: ''). + ((regex property: #pattern) comment: '') + <>- ((regexPattern property: #regexPatternOwner) comment: ''). + + " REQUIRED_PARAMETER " + ((requiredParameter property: #value) comment: '') + <>- ((tExpression property: #requiredParameterValueOwner) comment: ''). + ((requiredParameter property: #pattern) comment: 'The pattern (the name) of the required parameter') + <>- ((tExpression property: #requiredParameterPatternOwner) comment: ''). + ((requiredParameter property: #decorator) comment: '') + <>-* ((decorator property: #requiredParameterDecoratorOwner) comment: ''). + ((requiredParameter property: #name) comment: '') + <>- ((entity property: #requiredParameterNameOwner) comment: ''). + ((requiredParameter property: #type) comment: 'The type of the parameter (optional)') + <>- ((tOptionalField property: #requiredParameterTypeOwner) comment: ''). + + " REST_PATTERN (SINGLE CHILD) " + ((restPattern property: #childrenNode) comment: '') + <>- ((entity property: #restPatternOwner) comment: ''). + + " REST_TYPE (SINGLE CHILD) " + ((restType property: #childrenNode) comment: '') + <>- ((entity property: #restTypeOwner) comment: ''). + + " RETURN_STATEMENT (SINGLE CHILD) " + ((returnStatement property: #childrenNode) comment: '') + <>- ((entity property: #returnStatementOwner) comment: ''). + + " SATISFIES_EXPRESSION (COLLECTION) " + ((satisfiesExpression property: #childrenNodes) comment: '') + <>-* ((entity property: #satisfiesExpressionOwner) comment: ''). + + " SEQUENCE_EXPRESSION (COLLECTION) " + ((sequenceExpression property: #childrenNodes) comment: '') + <>-* ((entity property: #sequenceExpressionOwner) comment: ''). + + " SPREAD_ELEMENT (SINGLE CHILD) " + ((spreadElement property: #childrenNode) comment: '') + <>- ((entity property: #spreadElementOwner) comment: ''). + + " STATEMENT_BLOCK (COLLECTION) " + ((statementBlock property: #childrenNodes) comment: '') + <>-* ((entity property: #statementBlockOwner) comment: ''). + + " STRING (COLLECTION) " + ((string property: #childrenNodes) comment: '') + <>-* ((entity property: #stringOwner) comment: ''). + + " SUBSCRIPT_EXPRESSION " + ((subscriptExpression property: #object) comment: 'My identifier') + <>- ((tExpression property: #subscriptExpressionObjectOwner) comment: 'My owner'). + ((subscriptExpression property: #index) comment: 'My index') + <>- ((tExpression property: #subscriptExpressionIndexOwner) comment: 'My owner'). + ((subscriptExpression property: #optionalChain) comment: '') + <>- ((optionalChain property: #subscriptExpressionOptionalChainOwner) comment: ''). + + " SWITCH_BODY (COLLECTION) " + ((switchBody property: #childrenNodes) comment: '') + <>-* ((entity property: #switchBodyOwner) comment: ''). + + " SWITCH_CASE " + ((switchCase property: #value) comment: '') + <>- ((entity property: #switchCaseValueOwner) comment: ''). + ((switchCase property: #body) comment: '') + <>-* ((tStatement property: #switchCaseBodyOwner) comment: ''). + + " SWITCH_DEFAULT " + ((switchDefault property: #body) comment: '') + <>-* ((tStatement property: #switchDefaultBodyOwner) comment: ''). + + " SWITCH_STATEMENT " + ((switchStatement property: #value) comment: '') + <>- ((parenthesizedExpression property: #switchStatementValueOwner) comment: ''). + ((switchStatement property: #body) comment: '') + <>- ((switchBody property: #switchStatementBodyOwner) comment: ''). + + " TEMPLATE_LITERAL_TYPE (COLLECTION) " + ((templateLiteralType property: #childrenNodes) comment: '') + <>-* ((entity property: #templateLiteralTypeOwner) comment: ''). + + " TEMPLATE_STRING (COLLECTION) " + ((templateString property: #childrenNodes) comment: '') + <>-* ((entity property: #templateStringOwner) comment: ''). + + " TEMPLATE_SUBSTITUTION (SINGLE CHILD) " + ((templateSubstitution property: #childrenNode) comment: '') + <>- ((entity property: #templateSubstitutionOwner) comment: ''). + + " TEMPLATE_TYPE (SINGLE CHILD) " + ((templateType property: #childrenNode) comment: '') + <>- ((entity property: #templateTypeOwner) comment: ''). + + " TERNARY_EXPRESSION " + ((ternaryExpression property: #condition) comment: '') + <>- ((tExpression property: #ternaryExpressionConditionOwner) comment: ''). + ((ternaryExpression property: #alternative) comment: '') + <>- ((tExpression property: #ternaryExpressionAlternativeOwner) comment: ''). + ((ternaryExpression property: #consequence) comment: '') + <>- ((tExpression property: #ternaryExpressionConsequenceOwner) comment: ''). + + " THROW_STATEMENT (SINGLE CHILD) " + ((throwStatement property: #childrenNode) comment: '') + <>- ((entity property: #throwStatementOwner) comment: ''). + + " TRY_STATEMENT " + ((tryStatement property: #body) comment: 'Body') + <>- ((statementBlock property: #tryStatementBodyOwner) comment: 'Try statement owner'). + ((tryStatement property: #handler) comment: 'Handler') + <>- ((catchClause property: #tryStatementHandlerOwner) comment: 'Try statement owner'). + ((tryStatement property: #finalizer) comment: 'Finalizer') + <>- ((finallyClause property: #tryStatementFinalizerOwner) comment: 'Try statement owner'). + + " TUPLE_TYPE (COLLECTION) " + ((tupleType property: #childrenNodes) comment: '') + <>-* ((entity property: #tupleTypeOwner) comment: ''). + + " TYPE_ALIAS_DECLARATION " + ((typeAliasDeclaration property: #name) comment: '') + <>- ((typeIdentifier property: #typeAliasDeclarationNameOwner) comment: ''). + ((typeAliasDeclaration property: #value) comment: '') + <>- ((tExpression property: #typeAliasDeclarationValueOwner) comment: ''). + ((typeAliasDeclaration property: #type_parameters) comment: '') + <>- ((typeParameters property: #typeAliasDeclarationTypeParametersOwner) comment: ''). + + " TYPE_ANNOTATION (SINGLE CHILD) " + ((typeAnnotation property: #childrenNode) comment: '') + <>- ((entity property: #typeAnnotationOwner) comment: ''). + + " TYPE_ARGUMENTS (COLLECTION) " + ((typeArguments property: #childrenNodes) comment: '') + <>-* ((entity property: #typeArgumentsOwner) comment: ''). + + " TYPE_ASSERTION (COLLECTION) " + ((typeAssertion property: #childrenNodes) comment: '') + <>-* ((entity property: #typeAssertionOwner) comment: ''). + + " TYPE_PARAMETER " + ((typeParameter property: #name) comment: '') + <>- ((typeIdentifier property: #typeParameterNameOwner) comment: ''). + ((typeParameter property: #constraint) comment: '') + <>- ((constraint property: #typeParameterConstraintOwner) comment: ''). + ((typeParameter property: #value) comment: '') + <>- ((defaultType property: #typeParameterValueOwner) comment: ''). + + " TYPE_PARAMETERS (COLLECTION) " + ((typeParameters property: #childrenNodes) comment: '') + <>-* ((entity property: #typeParametersOwner) comment: ''). + + " TYPE_PREDICATE " + ((typePredicate property: #name) comment: '') + <>- ((tPrimaryExpression property: #typePredicateNameOwner) comment: ''). + ((typePredicate property: #type) comment: '') + <>- ((tExpression property: #typePredicateTypeOwner) comment: ''). + + + " TYPE_QUERY (SINGLE CHILD) " + ((typeQuery property: #childrenNode) comment: '') + <>- ((entity property: #typeQueryOwner) comment: ''). + + " UNARY_EXPRESSION " + ((unaryExpression property: #argument) comment: 'My argument') + <>- ((tExpression property: #unaryExpressionArgumentOwner) comment: 'The owner of this class'). + ((unaryExpression property: #operator) comment: '') + <>- ((entity property: #unaryExpressionOperatorOwner) comment: ''). + + " UNION_TYPE (COLLECTION) " + ((unionType property: #childrenNodes) comment: '') + <>-* ((entity property: #unionTypeOwner) comment: ''). + + " UPDATE_EXPRESSION " + ((updateExpression property: #argument) comment: '') + <>- ((tExpression property: #updateExpressionArgumentOwner) comment: ''). + ((updateExpression property: #operator) comment: '') + <>- ((entity property: #updateExpressionOperatorOwner) comment: ''). + + " VARIABLE_DECLARATION (COLLECTION) " + ((variableDeclaration property: #childrenNodes) comment: '') + <>-* ((entity property: #variableDeclarationOwner) comment: ''). + + " VARIABLE_DECLARATOR " + ((variableDeclarator property: #name) comment: '') + <>- ((entity property: #variableDeclaratorNameOwner) comment: ''). + ((variableDeclarator property: #value) comment: '') + <>- ((tExpression property: #variableDeclaratorValueOwner) comment: ''). + ((variableDeclarator property: #type) comment: '') + <>- ((typeAnnotation property: #variableDeclaratorTypeOwner) comment: ''). + + " WHILE_STATEMENT " + ((whileStatement property: #condition) comment: '') + <>- ((parenthesizedExpression property: #whileStatementConditionOwner) comment: ''). + ((whileStatement property: #body) comment: '') + <>- ((tStatement property: #whileStatementBodyOwner) comment: ''). + + " WITH_STATEMENT " + ((withStatement property: #object) comment: 'My object as parenthesized expression') + <>- ((parenthesizedExpression property: #withStatementObjectOwner) comment: 'The owner of this type parenthesized expression'). + ((withStatement property: #body) comment: 'My body as statement block') + <>- ((statementBlock property: #withStatementBodyOwner) comment: 'The owner of this statement block'). + + " YIELD_EXPRESSION (SINGLE CHILD) " + ((yieldExpression property: #childrenNode) comment: '') + <>- ((entity property: #yieldExpressionOwner) comment: ''). ] { #category : 'definition' } FASTTypeScriptMetamodelGenerator >> defineTraits [ - super defineTraits. - tDeclaration := self - newTraitNamed: #TDeclaration - comment: 'I am a declaration in Typescript'. - tWithDeclarations := self - newTraitNamed: #TWithDeclarations - comment: 'I have declarations'. - - tModifier := self - newTraitNamed: #TModifier - comment: 'I am a modifier'. - tWithModifiers := self - newTraitNamed: #TWithModifiers - comment: 'I have modifiers'. - - "From FAST" + "--- Remote traits (from FAST) ---" tEntity := self remoteTrait: #TEntity withPrefix: #FAST. tWithComments := self remoteTrait: #TWithComments withPrefix: #FAST. tStatement := self remoteTrait: #TStatement withPrefix: #FAST. + tExpression := self remoteTrait: #TExpression withPrefix: #FAST. tNamedEntity := self remoteTrait: #TNamedEntity withPrefix: #FAST. tLiteral := self remoteTrait: #TLiteral withPrefix: #FAST. - tExpression := self remoteTrait: #TExpression withPrefix: #FAST. tWithParameters := self remoteTrait: #TWithParameters withPrefix: #FAST. - tReturnType := self newTraitNamed: #TReturnType comment: 'I am a Return Type in Typescript'. - tOptionalField := self newTraitNamed: #TOptionalField comment: 'I represent optional field in Typescript'. - - + "--- Local traits (TypeScript-specific) ---" + tDeclaration := self + newTraitNamed: #TDeclaration + comment: 'I am a declaration in Typescript'. + tWithDeclarations := self + newTraitNamed: #TWithDeclarations + comment: 'I have declarations'. + tModifier := self + newTraitNamed: #TModifier + comment: 'I am a modifier'. + tWithModifiers := self + newTraitNamed: #TWithModifiers + comment: 'I have modifiers'. + tReturnType := self + newTraitNamed: #TReturnType + comment: 'I am a Return Type in Typescript'. + tOptionalField := self + newTraitNamed: #TOptionalField + comment: 'I represent optional field in Typescript'. + tPattern := self + newTraitNamed: #TPattern + comment: 'I am a pattern in Typescript'. + tPrimaryExpression := self + newTraitNamed: #TPrimaryExpression + comment: 'I am a primary expression in Typescript'. + tPrimaryType := self + newTraitNamed: #TPrimaryType + comment: 'I am a primary type in Typescript'. + tType := self + newTraitNamed: #TType + comment: 'I am a type in Typescript'. ] diff --git a/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st b/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st new file mode 100644 index 0000000..77f696e --- /dev/null +++ b/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st @@ -0,0 +1,28469 @@ +Class { + #name : 'FASTTypeScriptImporterTest', + #superclass : 'TSFASTAbstractImporterTest', + #category : 'FAST-TypeScript-Model-Tests', + #package : 'FAST-TypeScript-Model-Tests' +} + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAbstract [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAbstract " + + self parse: 'type Foo = abstract new () => T;;'. + + self assert: (fast allWithType: FASTTypeScriptConstructorType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type Foo = abstract new () => T;;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type Foo = abstract new () => T;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'abstract new () => T'. + self assert: (self topEntity isOfType: FASTTypeScriptConstructorType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'type Foo = abstract new () => T;;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAbstractClasses [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAbstractClasses " + + self parse: 'abstract class Foo { +} + +abstract class Animal { + readonly abstract prop: string; + requiredProp!: string; + abstract makeSound(): void; + abstract get readonlyProp(): string; + protected abstract readonlyProp?(): string; + move(): void { + console.log("roaming the earth..."); + } +} + +@bar +abstract class Foo { +};'. + + self assert: (fast allWithType: FASTTypeScriptAbstractClassDeclaration) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptAbstractMethodSignature) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptAccessibilityModifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptDecorator) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptPublicFieldDefinition) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 3. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'abstract class Foo { +} + +abstract class Animal { + readonly abstract prop: string; + requiredProp!: string; + abstract makeSound(): void; + abstract get readonlyProp(): string; + protected abstract readonlyProp?(): string; + move(): void { + console.log("roaming the earth..."); + } +} + +@bar +abstract class Foo { +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'abstract class Foo { +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAbstractClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'abstract class Animal { + readonly abstract prop: string; + requiredProp!: string; + abstract makeSound(): void; + abstract get readonlyProp(): string; + protected abstract readonlyProp?(): string; + move(): void { + console.log("roaming the earth..."); + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAbstractClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + readonly abstract prop: string; + requiredProp!: string; + abstract makeSound(): void; + abstract get readonlyProp(): string; + protected abstract readonlyProp?(): string; + move(): void { + console.log("roaming the earth..."); + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 6. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'readonly abstract prop: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'prop'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'requiredProp!: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'requiredProp'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'abstract makeSound(): void'. + self assert: (self topEntity isOfType: FASTTypeScriptAbstractMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'makeSound'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': void'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'void'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 4). + self assert: self topEntity sourceCode equals: 'abstract get readonlyProp(): string'. + self assert: (self topEntity isOfType: FASTTypeScriptAbstractMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'readonlyProp'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 5). + self assert: self topEntity sourceCode equals: 'protected abstract readonlyProp?(): string'. + self assert: (self topEntity isOfType: FASTTypeScriptAbstractMethodSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'protected'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'readonlyProp'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 6). + self assert: self topEntity sourceCode equals: 'move(): void { + console.log("roaming the earth..."); + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + console.log("roaming the earth..."); + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'console.log("roaming the earth...");'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'console.log("roaming the earth...")'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '("roaming the earth...")'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '"roaming the earth..."'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'roaming the earth...'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'console.log'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'console'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'log'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'move'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': void'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'void'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Animal'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: '@bar +abstract class Foo { +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAbstractClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 1. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@bar'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'abstract class Foo { +} + +abstract class Animal { + readonly abstract prop: string; + requiredProp!: string; + abstract makeSound(): void; + abstract get readonlyProp(): string; + protected abstract readonlyProp?(): string; + move(): void { + console.log("roaming the earth..."); + } +} + +@bar +abstract class Foo { +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAccessibilityModifiersAsPairKeywords [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAccessibilityModifiersAsPairKeywords " + + self parse: 'x = { name, description, private: private_ };'. + + self assert: (fast allWithType: FASTTypeScriptAssignmentExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptObject) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPair) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptShorthandPropertyIdentifier) size equals: 2. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'x = { name, description, private: private_ };'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x = { name, description, private: private_ }'. + self assert: (self topEntity isOfType: FASTTypeScriptAssignmentExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '{ name, description, private: private_ }'. + self assert: (self topEntity isOfType: FASTTypeScriptObject). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'name'. + self assert: (self topEntity isOfType: FASTTypeScriptShorthandPropertyIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'description'. + self assert: (self topEntity isOfType: FASTTypeScriptShorthandPropertyIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'private: private_'. + self assert: (self topEntity isOfType: FASTTypeScriptPair). + + "Testing value of monovalue relation key" + self assert: self topEntity key isNotNil. + + stack push: self topEntity key. + self assert: self topEntity sourceCode equals: 'private'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'private_'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAmbientDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAmbientDeclarations " + + self parse: 'declare class Error { + constructor: Function +} + +declare var foo: number; + +declare const bar = "baz"; + +declare function greet(greeting: string): void; + +declare namespace myLib { + function makeGreeting(s: string): string; + let numberOfGreetings: number; + + interface LogOptions { + verbose?: boolean; + } + interface AlertOptions { + modal: boolean; + title?: string; + color?: string; + } +} + +declare class Greeter { + constructor(greeting: string); + + greeting: string; + showGreeting(): void; +} + +declare module Foo.Bar { export var foo; }; + +declare module Foo { + break; + continue; + debugger; + do { } while (true); + for (x in null) { } + for (;;) { } + if (true) { } else { } + 1; + return; + switch (x) { + case 1: + break; + default: + break; + } + throw "hello"; + try { } + catch (e) { } + finally { } +};'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 8. + self assert: (fast allWithType: FASTTypeScriptBreakStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptCatchClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptContinueStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptDebuggerStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptDoStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptElseClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFinallyClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptForInStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptForStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptFunctionSignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 15. + self assert: (fast allWithType: FASTTypeScriptIfStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceBody) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptInterfaceDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptInternalModule) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMethodSignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptModule) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptNestedIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNull) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptParenthesizedExpression) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 13. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 9. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptPublicFieldDefinition) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptReturnStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptSwitchBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptSwitchCase) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptSwitchDefault) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptSwitchStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptThrowStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTrue) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTryStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 14. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 4. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'declare class Error { + constructor: Function +} + +declare var foo: number; + +declare const bar = "baz"; + +declare function greet(greeting: string): void; + +declare namespace myLib { + function makeGreeting(s: string): string; + let numberOfGreetings: number; + + interface LogOptions { + verbose?: boolean; + } + interface AlertOptions { + modal: boolean; + title?: string; + color?: string; + } +} + +declare class Greeter { + constructor(greeting: string); + + greeting: string; + showGreeting(): void; +} + +declare module Foo.Bar { export var foo; }; + +declare module Foo { + break; + continue; + debugger; + do { } while (true); + for (x in null) { } + for (;;) { } + if (true) { } else { } + 1; + return; + switch (x) { + case 1: + break; + default: + break; + } + throw "hello"; + try { } + catch (e) { } + finally { } +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 10. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'declare class Error { + constructor: Function +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Error { + constructor: Function +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + constructor: Function +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'constructor: Function'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'constructor'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Function'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Function'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Error'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'declare var foo: number;'. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'var foo: number;'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo: number'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'declare const bar = "baz";'. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'const bar = "baz";'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'bar = "baz"'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '"baz"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'declare function greet(greeting: string): void;'. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function greet(greeting: string): void;'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'greet'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(greeting: string)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'greeting: string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'greeting'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': void'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'void'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'declare namespace myLib { + function makeGreeting(s: string): string; + let numberOfGreetings: number; + + interface LogOptions { + verbose?: boolean; + } + interface AlertOptions { + modal: boolean; + title?: string; + color?: string; + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'namespace myLib { + function makeGreeting(s: string): string; + let numberOfGreetings: number; + + interface LogOptions { + verbose?: boolean; + } + interface AlertOptions { + modal: boolean; + title?: string; + color?: string; + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInternalModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + function makeGreeting(s: string): string; + let numberOfGreetings: number; + + interface LogOptions { + verbose?: boolean; + } + interface AlertOptions { + modal: boolean; + title?: string; + color?: string; + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function makeGreeting(s: string): string;'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'makeGreeting'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(s: string)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 's: string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 's'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'let numberOfGreetings: number;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'numberOfGreetings: number'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'numberOfGreetings'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'interface LogOptions { + verbose?: boolean; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + verbose?: boolean; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'verbose?: boolean'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'verbose'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': boolean'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'boolean'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'LogOptions'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'interface AlertOptions { + modal: boolean; + title?: string; + color?: string; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + modal: boolean; + title?: string; + color?: string; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'modal: boolean'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'modal'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': boolean'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'boolean'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'title?: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'title'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'color?: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'color'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'AlertOptions'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'myLib'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'declare class Greeter { + constructor(greeting: string); + + greeting: string; + showGreeting(): void; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Greeter { + constructor(greeting: string); + + greeting: string; + showGreeting(): void; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + constructor(greeting: string); + + greeting: string; + showGreeting(): void; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 3. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'constructor(greeting: string)'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'constructor'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(greeting: string)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'greeting: string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'greeting'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'greeting: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'greeting'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'showGreeting(): void'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'showGreeting'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': void'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'void'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Greeter'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: 'declare module Foo.Bar { export var foo; }'. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'module Foo.Bar { export var foo; }'. + self assert: (self topEntity isOfType: FASTTypeScriptModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ export var foo; }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export var foo;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'var foo;'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo.Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptNestedIdentifier). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 8). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + + stack push: (stack top childrenNodes at: 9). + self assert: self topEntity sourceCode equals: 'declare module Foo { + break; + continue; + debugger; + do { } while (true); + for (x in null) { } + for (;;) { } + if (true) { } else { } + 1; + return; + switch (x) { + case 1: + break; + default: + break; + } + throw "hello"; + try { } + catch (e) { } + finally { } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'module Foo { + break; + continue; + debugger; + do { } while (true); + for (x in null) { } + for (;;) { } + if (true) { } else { } + 1; + return; + switch (x) { + case 1: + break; + default: + break; + } + throw "hello"; + try { } + catch (e) { } + finally { } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + break; + continue; + debugger; + do { } while (true); + for (x in null) { } + for (;;) { } + if (true) { } else { } + 1; + return; + switch (x) { + case 1: + break; + default: + break; + } + throw "hello"; + try { } + catch (e) { } + finally { } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 12. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'break;'. + self assert: (self topEntity isOfType: FASTTypeScriptBreakStatement). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'continue;'. + self assert: (self topEntity isOfType: FASTTypeScriptContinueStatement). + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'debugger;'. + self assert: (self topEntity isOfType: FASTTypeScriptDebuggerStatement). + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'do { } while (true);'. + self assert: (self topEntity isOfType: FASTTypeScriptDoStatement). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation condition" + self assert: self topEntity condition isNotNil. + + stack push: self topEntity condition. + self assert: self topEntity sourceCode equals: '(true)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptTrue). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'for (x in null) { }'. + self assert: (self topEntity isOfType: FASTTypeScriptForInStatement). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'null'. + self assert: (self topEntity isOfType: FASTTypeScriptNull). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'for (;;) { }'. + self assert: (self topEntity isOfType: FASTTypeScriptForStatement). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of multivalued relation condition" + self assert: self topEntity condition size equals: 1. + + stack push: (stack top condition at: 1). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + + "Testing value of monovalue relation initializer" + self assert: self topEntity initializer isNotNil. + + stack push: self topEntity initializer. + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: 'if (true) { } else { }'. + self assert: (self topEntity isOfType: FASTTypeScriptIfStatement). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'else { }'. + self assert: (self topEntity isOfType: FASTTypeScriptElseClause). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + stack pop. + + "Testing value of monovalue relation condition" + self assert: self topEntity condition isNotNil. + + stack push: self topEntity condition. + self assert: self topEntity sourceCode equals: '(true)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptTrue). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 8). + self assert: self topEntity sourceCode equals: '1;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '1'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 9). + self assert: self topEntity sourceCode equals: 'return;'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + stack pop. + + stack push: (stack top childrenNodes at: 10). + self assert: self topEntity sourceCode equals: 'switch (x) { + case 1: + break; + default: + break; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptSwitchStatement). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + case 1: + break; + default: + break; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptSwitchBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'case 1: + break;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptSwitchCase). + + "Testing value of multivalued relation body" + self assert: self topEntity body size equals: 2. + + stack push: (stack top body at: 1). + self assert: self topEntity sourceCode equals: 'break;'. + self assert: (self topEntity isOfType: FASTTypeScriptBreakStatement). + stack pop. + + stack push: (stack top body at: 2). + self assert: self topEntity sourceCode equals: 'break;'. + self assert: (self topEntity isOfType: FASTTypeScriptBreakStatement). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '1'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'default: + break;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptSwitchDefault). + + "Testing value of multivalued relation body" + self assert: self topEntity body size equals: 2. + + stack push: (stack top body at: 1). + self assert: self topEntity sourceCode equals: 'break;'. + self assert: (self topEntity isOfType: FASTTypeScriptBreakStatement). + stack pop. + + stack push: (stack top body at: 2). + self assert: self topEntity sourceCode equals: 'break;'. + self assert: (self topEntity isOfType: FASTTypeScriptBreakStatement). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '(x)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 11). + self assert: self topEntity sourceCode equals: 'throw "hello";'. + self assert: (self topEntity isOfType: FASTTypeScriptThrowStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"hello"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'hello'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 12). + self assert: self topEntity sourceCode equals: 'try { } + catch (e) { } + finally { }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTryStatement). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation finalizer" + self assert: self topEntity finalizer isNotNil. + + stack push: self topEntity finalizer. + self assert: self topEntity sourceCode equals: 'finally { }'. + self assert: (self topEntity isOfType: FASTTypeScriptFinallyClause). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + stack pop. + + "Testing value of monovalue relation handler" + self assert: self topEntity handler isNotNil. + + stack push: self topEntity handler. + self assert: self topEntity sourceCode equals: 'catch (e) { }'. + self assert: (self topEntity isOfType: FASTTypeScriptCatchClause). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation parameter" + self assert: self topEntity parameter isNotNil. + + stack push: self topEntity parameter. + self assert: self topEntity sourceCode equals: 'e'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 10). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'declare class Error { + constructor: Function +} + +declare var foo: number; + +declare const bar = "baz"; + +declare function greet(greeting: string): void; + +declare namespace myLib { + function makeGreeting(s: string): string; + let numberOfGreetings: number; + + interface LogOptions { + verbose?: boolean; + } + interface AlertOptions { + modal: boolean; + title?: string; + color?: string; + } +} + +declare class Greeter { + constructor(greeting: string); + + greeting: string; + showGreeting(): void; +} + +declare module Foo.Bar { export var foo; }; + +declare module Foo { + break; + continue; + debugger; + do { } while (true); + for (x in null) { } + for (;;) { } + if (true) { } else { } + 1; + return; + switch (x) { + case 1: + break; + default: + break; + } + throw "hello"; + try { } + catch (e) { } + finally { } +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAmbientExportFunctionDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAmbientExportFunctionDeclarations " + + self parse: 'export interface Foo { + export function OrderedMap(iter: Iterable.Keyed): OrderedMap; +};'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptInterfaceBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNestedTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 9. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'export interface Foo { + export function OrderedMap(iter: Iterable.Keyed): OrderedMap; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export interface Foo { + export function OrderedMap(iter: Iterable.Keyed): OrderedMap; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'interface Foo { + export function OrderedMap(iter: Iterable.Keyed): OrderedMap; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + export function OrderedMap(iter: Iterable.Keyed): OrderedMap; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export function OrderedMap(iter: Iterable.Keyed): OrderedMap;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'function OrderedMap(iter: Iterable.Keyed): OrderedMap;'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'OrderedMap'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(iter: Iterable.Keyed)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'iter: Iterable.Keyed'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'iter'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Iterable.Keyed'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Iterable.Keyed'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Iterable.Keyed'. + self assert: (self topEntity isOfType: FASTTypeScriptNestedTypeIdentifier). + + "Testing value of monovalue relation module" + self assert: self topEntity module isNotNil. + + stack push: self topEntity module. + self assert: self topEntity sourceCode equals: 'Iterable'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Keyed'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'K'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'V'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': OrderedMap'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'OrderedMap'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'OrderedMap'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'K'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'V'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'K'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'K'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'V'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'V'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'export interface Foo { + export function OrderedMap(iter: Iterable.Keyed): OrderedMap; +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAmbientExports [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAmbientExports " + + self parse: 'export default function point(x: number, y: number) { + return { x, y }; +} + +// a comment + +export default class A {} + +export async function readFile(filename: string): Promise;'. + + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptComment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFunctionDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptObject) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptReturnStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptShorthandPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 3. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'export default function point(x: number, y: number) { + return { x, y }; +} + +// a comment + +export default class A {} + +export async function readFile(filename: string): Promise;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export default function point(x: number, y: number) { + return { x, y }; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'function point(x: number, y: number) { + return { x, y }; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + return { x, y }; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'return { x, y };'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '{ x, y }'. + self assert: (self topEntity isOfType: FASTTypeScriptObject). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptShorthandPropertyIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'y'. + self assert: (self topEntity isOfType: FASTTypeScriptShorthandPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'point'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(x: number, y: number)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: number'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'y: number'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'y'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '// a comment'. + self assert: (self topEntity isOfType: FASTTypeScriptComment). + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'export default class A {}'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'class A {}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'export async function readFile(filename: string): Promise;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'async function readFile(filename: string): Promise;'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'readFile'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(filename: string)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'filename: string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'filename'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Buffer'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'export default function point(x: number, y: number) { + return { x, y }; +} + +// a comment + +export default class A {} + +export async function readFile(filename: string): Promise;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAmbientModuleDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAmbientModuleDeclarations " + + self parse: 'module Promise { + var on: {} + export function resolve(value?: Thenable): Promise; +} + +declare module "example" + +declare module "example" { };'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptModule) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptOptionalParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'module Promise { + var on: {} + export function resolve(value?: Thenable): Promise; +} + +declare module "example" + +declare module "example" { };' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'module Promise { + var on: {} + export function resolve(value?: Thenable): Promise; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + var on: {} + export function resolve(value?: Thenable): Promise; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'var on: {}'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'on: {}'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'on'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': {}'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'export function resolve(value?: Thenable): Promise;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'function resolve(value?: Thenable): Promise;'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'resolve'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(value?: Thenable)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'value?: Thenable'. + self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'value'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Thenable'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Thenable'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Thenable'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'R'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'R'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'R'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'R'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'declare module "example"'. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'module "example"'. + self assert: (self topEntity isOfType: FASTTypeScriptModule). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '"example"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'example'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'declare module "example" { }'. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'module "example" { }'. + self assert: (self topEntity isOfType: FASTTypeScriptModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '"example"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'example'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'module Promise { + var on: {} + export function resolve(value?: Thenable): Promise; +} + +declare module "example" + +declare module "example" { };' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAmbientTypeAliasDeclarationsInNamespaces [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAmbientTypeAliasDeclarationsInNamespaces " + + self parse: 'declare namespace moment { + type formatFunction = () => string; + + export var x: string; + export class foo { + + } + export function utc(): Moment; + export const enum Blah { Blaz, Bloz, Bleez } +};'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEnumBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEnumDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFunctionSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptInternalModule) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'declare namespace moment { + type formatFunction = () => string; + + export var x: string; + export class foo { + + } + export function utc(): Moment; + export const enum Blah { Blaz, Bloz, Bleez } +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'declare namespace moment { + type formatFunction = () => string; + + export var x: string; + export class foo { + + } + export function utc(): Moment; + export const enum Blah { Blaz, Bloz, Bleez } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'namespace moment { + type formatFunction = () => string; + + export var x: string; + export class foo { + + } + export function utc(): Moment; + export const enum Blah { Blaz, Bloz, Bleez } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInternalModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + type formatFunction = () => string; + + export var x: string; + export class foo { + + } + export function utc(): Moment; + export const enum Blah { Blaz, Bloz, Bleez } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 5. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type formatFunction = () => string;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'formatFunction'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '() => string'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'export var x: string;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'var x: string;'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x: string'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'export class foo { + + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'class foo { + + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'export function utc(): Moment;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'function utc(): Moment;'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'utc'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': Moment'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Moment'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'export const enum Blah { Blaz, Bloz, Bleez }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'const enum Blah { Blaz, Bloz, Bleez }'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ Blaz, Bloz, Bleez }'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumBody). + + "Testing value of multivalued relation name" + self assert: self topEntity name size equals: 3. + + stack push: (stack top name at: 1). + self assert: self topEntity sourceCode equals: 'Blaz'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + stack push: (stack top name at: 2). + self assert: self topEntity sourceCode equals: 'Bloz'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + stack push: (stack top name at: 3). + self assert: self topEntity sourceCode equals: 'Bleez'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Blah'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'moment'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'declare namespace moment { + type formatFunction = () => string; + + export var x: string; + export class foo { + + } + export function utc(): Moment; + export const enum Blah { Blaz, Bloz, Bleez } +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAmbientTypeDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAmbientTypeDeclarations " + + self parse: 'declare type IndexableType = string | number | Date | Array;;'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptUnionType) size equals: 5. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'declare type IndexableType = string | number | Date | Array;;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'declare type IndexableType = string | number | Date | Array;'. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type IndexableType = string | number | Date | Array;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'IndexableType'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'string | number | Date | Array'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string | number | Date'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string | number'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Date'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Array'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Array'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string | number | Date'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string | number'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Date'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'declare type IndexableType = string | number | Date | Array;;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAmbiguityBetweenFunctionSignatureAndFunctionDeclaration [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAmbiguityBetweenFunctionSignatureAndFunctionDeclaration " + + self parse: 'function foo() +{} + +function foo(bar) +function foo(bar): baz; +function foo(bar) + +function foo(): () => { [key: foo]: bar } +function foo(): () => { [key: foo]: bar } {};'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 8. + self assert: (fast allWithType: FASTTypeScriptFunctionDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFunctionSignature) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptIndexSignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 5. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'function foo() +{} + +function foo(bar) +function foo(bar): baz; +function foo(bar) + +function foo(): () => { [key: foo]: bar } +function foo(): () => { [key: foo]: bar } {};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 7. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function foo() +{}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'function foo(bar)'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(bar)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'function foo(bar): baz;'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(bar)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': baz'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'function foo(bar)'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(bar)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'function foo(): () => { [key: foo]: bar }'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': () => { [key: foo]: bar }'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '() => { [key: foo]: bar }'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: '{ [key: foo]: bar }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[key: foo]: bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'key'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'function foo(): () => { [key: foo]: bar } {}'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': () => { [key: foo]: bar }'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '() => { [key: foo]: bar }'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: '{ [key: foo]: bar }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[key: foo]: bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'key'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'function foo() +{} + +function foo(bar) +function foo(bar): baz; +function foo(bar) + +function foo(): () => { [key: foo]: bar } +function foo(): () => { [key: foo]: bar } {};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAmbiguityBetweenFunctionSignatureAndFunctionDeclarationCommentsAndNewlines [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAmbiguityBetweenFunctionSignatureAndFunctionDeclarationCommentsAndNewlines " + + self parse: 'function foo() + // above is a signature +foo(); + +function bar() + // above is a function declaration +{} + +function foo() + : number;;'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptComment) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptFunctionDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionSignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'function foo() + // above is a signature +foo(); + +function bar() + // above is a function declaration +{} + +function foo() + : number;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 6. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function foo()'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '// above is a signature'. + self assert: (self topEntity isOfType: FASTTypeScriptComment). + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'foo();'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'foo()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'function bar() + // above is a function declaration +{}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '// above is a function declaration'. + self assert: (self topEntity isOfType: FASTTypeScriptComment). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'function foo() + : number;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'function foo() + // above is a signature +foo(); + +function bar() + // above is a function declaration +{} + +function foo() + : number;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedArrayTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedArrayTypes " + + self parse: 'let x: X[];;'. + + self assert: (fast allWithType: FASTTypeScriptArrayType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'let x: X[];;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'let x: X[];'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: X[]'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': X[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'X[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'let x: X[];;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedArrayWithEmptyElements [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedArrayWithEmptyElements " + + self parse: '[, a, , b, , , , s, , , ];'. + + self assert: (fast allWithType: FASTTypeScriptArray) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: '[, a, , b, , , , s, , , ];'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '[, a, , b, , , , s, , , ]'. + self assert: (self topEntity isOfType: FASTTypeScriptArray). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 's'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedArrowFunctionWithParameterNamedAsync [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedArrowFunctionWithParameterNamedAsync " + + self parse: 'const x = async => async;;'. + + self assert: (fast allWithType: FASTTypeScriptArrowFunction) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'const x = async => async;;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'const x = async => async;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x = async => async'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'async => async'. + self assert: (self topEntity isOfType: FASTTypeScriptArrowFunction). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: 'async'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameter" + self assert: self topEntity parameter isNotNil. + + stack push: self topEntity parameter. + self assert: self topEntity sourceCode equals: 'async'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'const x = async => async;;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedArrowFunctionsAndGeneratorsWithCallSignatures [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedArrowFunctionsAndGeneratorsWithCallSignatures " + + self parse: '(amount, interestRate, duration): number => 2 + +function* foo(amount, interestRate, duration): number { + yield amount * interestRate * duration / 12 +} + +(module: any): number => 2;'. + + self assert: (fast allWithType: FASTTypeScriptArrowFunction) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptBinaryExpression) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptGeneratorFunctionDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptYieldExpression) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: '(amount, interestRate, duration): number => 2 + +function* foo(amount, interestRate, duration): number { + yield amount * interestRate * duration / 12 +} + +(module: any): number => 2;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '(amount, interestRate, duration): number => 2'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '(amount, interestRate, duration): number => 2'. + self assert: (self topEntity isOfType: FASTTypeScriptArrowFunction). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(amount, interestRate, duration)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 3. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'amount'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'amount'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'interestRate'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'interestRate'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'duration'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'duration'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'function* foo(amount, interestRate, duration): number { + yield amount * interestRate * duration / 12 +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptGeneratorFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + yield amount * interestRate * duration / 12 +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'yield amount * interestRate * duration / 12'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'yield amount * interestRate * duration / 12'. + self assert: (self topEntity isOfType: FASTTypeScriptYieldExpression). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'amount * interestRate * duration / 12'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'amount * interestRate * duration'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'amount * interestRate'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'amount'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'interestRate'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'duration'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '12'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(amount, interestRate, duration)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 3. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'amount'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'amount'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'interestRate'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'interestRate'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'duration'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'duration'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: '(module: any): number => 2;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '(module: any): number => 2'. + self assert: (self topEntity isOfType: FASTTypeScriptArrowFunction). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(module: any)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'module: any'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'module'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: '(amount, interestRate, duration): number => 2 + +function* foo(amount, interestRate, duration): number { + yield amount * interestRate * duration / 12 +} + +(module: any): number => 2;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAsExpressions [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAsExpressions " + + self parse: 'h as `hello` +T as {} & { [t: T]: T } +T as {} & { [t: T]: T } & { [g: G]: G };'. + + self assert: (fast allWithType: FASTTypeScriptAsExpression) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptIndexSignature) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIntersectionType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTemplateLiteralType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 6. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'h as `hello` +T as {} & { [t: T]: T } +T as {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'h as `hello`'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'h as `hello`'. + self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'h'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '`hello`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'hello'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'T as {} & { [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'T as {} & { [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{} & { [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[t: T]: T'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'T as {} & { [t: T]: T } & { [g: G]: G };'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'T as {} & { [t: T]: T } & { [g: G]: G }'. + self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{} & { [t: T]: T } & { [g: G]: G }'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{} & { [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[t: T]: T'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ [g: G]: G }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[g: G]: G'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'G'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'g'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': G'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'G'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'h as `hello` +T as {} & { [t: T]: T } +T as {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAssertionFunctionsCheckingAType [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAssertionFunctionsCheckingAType " + + self parse: 'function f(x: any): asserts x is number { +} + +class Foo { + test(): this is T {} +} + +function isT(t: T): t is T { + return true +};'. + + self assert: (fast allWithType: FASTTypeScriptAsserts) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptAssertsAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptFunctionDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptReturnStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptThis) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTrue) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypePredicate) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypePredicateAnnotation) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'function f(x: any): asserts x is number { +} + +class Foo { + test(): this is T {} +} + +function isT(t: T): t is T { + return true +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function f(x: any): asserts x is number { +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(x: any)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: any'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': asserts x is number'. + self assert: (self topEntity isOfType: FASTTypeScriptAssertsAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'asserts x is number'. + self assert: (self topEntity isOfType: FASTTypeScriptAsserts). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'x is number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicate). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'class Foo { + test(): this is T {} +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + test(): this is T {} +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'test(): this is T {}'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'test'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': this is T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicateAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'this is T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicate). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'this'. + self assert: (self topEntity isOfType: FASTTypeScriptThis). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'function isT(t: T): t is T { + return true +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + return true +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'return true'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptTrue). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'isT'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(t: T)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 't: T'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': t is T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicateAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 't is T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicate). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'function f(x: any): asserts x is number { +} + +class Foo { + test(): this is T {} +} + +function isT(t: T): t is T { + return true +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAssertionFunctionsCheckingAValue [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAssertionFunctionsCheckingAValue " + + self parse: 'function f(x: any): asserts x { +};'. + + self assert: (fast allWithType: FASTTypeScriptAsserts) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptAssertsAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'function f(x: any): asserts x { +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function f(x: any): asserts x { +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(x: any)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: any'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': asserts x'. + self assert: (self topEntity isOfType: FASTTypeScriptAssertsAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'asserts x'. + self assert: (self topEntity isOfType: FASTTypeScriptAsserts). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'function f(x: any): asserts x { +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAssignmentToNonnullLHS [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAssignmentToNonnullLHS " + + self parse: 'foo! = bar; +foo! += bar; +(foo)! = bar; +(foo)! += bar;;'. + + self assert: (fast allWithType: FASTTypeScriptAssignmentExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptAugmentedAssignmentExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 8. + self assert: (fast allWithType: FASTTypeScriptNonNullExpression) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptParenthesizedExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'foo! = bar; +foo! += bar; +(foo)! = bar; +(foo)! += bar;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 5. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo! = bar;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'foo! = bar'. + self assert: (self topEntity isOfType: FASTTypeScriptAssignmentExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'foo!'. + self assert: (self topEntity isOfType: FASTTypeScriptNonNullExpression). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'foo! += bar;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'foo! += bar'. + self assert: (self topEntity isOfType: FASTTypeScriptAugmentedAssignmentExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'foo!'. + self assert: (self topEntity isOfType: FASTTypeScriptNonNullExpression). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: '(foo)! = bar;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '(foo)! = bar'. + self assert: (self topEntity isOfType: FASTTypeScriptAssignmentExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: '(foo)!'. + self assert: (self topEntity isOfType: FASTTypeScriptNonNullExpression). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(foo)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: '(foo)! += bar;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '(foo)! += bar'. + self assert: (self topEntity isOfType: FASTTypeScriptAugmentedAssignmentExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: '(foo)!'. + self assert: (self topEntity isOfType: FASTTypeScriptNonNullExpression). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(foo)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'foo! = bar; +foo! += bar; +(foo)! = bar; +(foo)! += bar;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedAutomaticSemicolonDisabledBeforeReturnType [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedAutomaticSemicolonDisabledBeforeReturnType " + + self parse: 'function f(): any { + ''a''; + ''b''; +} + +function +f +() + : + any { + ''a'' + ''b'' +};'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFunctionDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'function f(): any { + ''a''; + ''b''; +} + +function +f +() + : + any { + ''a'' + ''b'' +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function f(): any { + ''a''; + ''b''; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + ''a''; + ''b''; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '''a'';'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '''a'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '''b'';'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '''b'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'function +f +() + : + any { + ''a'' + ''b'' +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + ''a'' + ''b'' +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '''a'''. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '''a'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '''b'''. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '''b'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': + any' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'function f(): any { + ''a''; + ''b''; +} + +function +f +() + : + any { + ''a'' + ''b'' +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedBuiltinTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedBuiltinTypes " + + self parse: 'var x: string = ''hi''; +var y: number;;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'var x: string = ''hi''; +var y: number;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'var x: string = ''hi'';'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x: string = ''hi'''. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '''hi'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'hi'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'var y: number;'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'y: number'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'y'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'var x: string = ''hi''; +var y: number;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedClassesWithDecoratorCallsThatHaveTypeArguments [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedClassesWithDecoratorCallsThatHaveTypeArguments " + + self parse: 'class Foo { + @bar() + method() { + } +};'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptDecorator) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class Foo { + @bar() + method() { + } +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Foo { + @bar() + method() { + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + @bar() + method() { + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 1. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@bar()'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bar()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'method() { + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'method'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class Foo { + @bar() + method() { + } +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedClassesWithDecorators [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedClassesWithDecorators " + + self parse: '@baz @bam class Foo { + @foo static 2: string; + @bar.buzz(grue) public static 2: string = ''string''; + @readonly readonly ''hello''?: int = ''string''; + @readonly fooBar(@required param: any, @optional param2?: any) { + } +};'. + + self assert: (fast allWithType: FASTTypeScriptAccessibilityModifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptDecorator) size equals: 8. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptOptionalParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPublicFieldDefinition) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: '@baz @bam class Foo { + @foo static 2: string; + @bar.buzz(grue) public static 2: string = ''string''; + @readonly readonly ''hello''?: int = ''string''; + @readonly fooBar(@required param: any, @optional param2?: any) { + } +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '@baz @bam class Foo { + @foo static 2: string; + @bar.buzz(grue) public static 2: string = ''string''; + @readonly readonly ''hello''?: int = ''string''; + @readonly fooBar(@required param: any, @optional param2?: any) { + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + @foo static 2: string; + @bar.buzz(grue) public static 2: string = ''string''; + @readonly readonly ''hello''?: int = ''string''; + @readonly fooBar(@required param: any, @optional param2?: any) { + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 1. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@readonly'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'readonly'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 4. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '@foo static 2: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 1. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@foo'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: '@bar.buzz(grue) public static 2: string = ''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 1. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@bar.buzz(grue)'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bar.buzz(grue)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(grue)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'grue'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'bar.buzz'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'buzz'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: '@readonly readonly ''hello''?: int = ''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 1. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@readonly'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'readonly'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '''hello'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'hello'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 4). + self assert: self topEntity sourceCode equals: 'fooBar(@required param: any, @optional param2?: any) { + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'fooBar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(@required param: any, @optional param2?: any)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '@required param: any'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 1. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@required'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'required'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'param'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: '@optional param2?: any'. + self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 1. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@optional'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'optional'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'param2'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 2. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@baz'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top decorator at: 2). + self assert: self topEntity sourceCode equals: '@bam'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bam'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: '@baz @bam class Foo { + @foo static 2: string; + @bar.buzz(grue) public static 2: string = ''string''; + @readonly readonly ''hello''?: int = ''string''; + @readonly fooBar(@required param: any, @optional param2?: any) { + } +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedClassesWithExtensions [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedClassesWithExtensions " + + self parse: 'class A extends B(D) implements C {} +export class A extends B(D) implements C {} + +class A extends B(D) implements C {} +export class A extends B(D) implements C {} + +export class A extends B implements C {};'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptClassHeritage) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptExtendsClause) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 9. + self assert: (fast allWithType: FASTTypeScriptImplementsClause) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 18. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class A extends B(D) implements C {} +export class A extends B(D) implements C {} + +class A extends B(D) implements C {} +export class A extends B(D) implements C {} + +export class A extends B implements C {};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 6. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class A extends B(D) implements C {}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends B(D) implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptImplementsClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'export class A extends B(D) implements C {}'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'class A extends B(D) implements C {}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends B(D) implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptImplementsClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'class A extends B(D) implements C {}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends B(D) implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation type_arguments" + self assert: self topEntity type_arguments size equals: 1. + + stack push: (stack top type_arguments at: 1). + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'E'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptImplementsClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'export class A extends B(D) implements C {}'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'class A extends B(D) implements C {}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends B(D) implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation type_arguments" + self assert: self topEntity type_arguments size equals: 1. + + stack push: (stack top type_arguments at: 1). + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'E'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'B(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(D)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptImplementsClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'export class A extends B implements C {}'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'class A extends B implements C {}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends B implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends B'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation type_arguments" + self assert: self topEntity type_arguments size equals: 1. + + stack push: (stack top type_arguments at: 1). + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'implements C'. + self assert: (self topEntity isOfType: FASTTypeScriptImplementsClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class A extends B(D) implements C {} +export class A extends B(D) implements C {} + +class A extends B(D) implements C {} +export class A extends B(D) implements C {} + +export class A extends B implements C {};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedClassesWithGenericParameters [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedClassesWithGenericParameters " + + self parse: 'class A< + B, + C, +> {} + +class D extends A< + X, + Y, +> {};'. + + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptClassHeritage) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExtendsClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class A< + B, + C, +> {} + +class D extends A< + X, + Y, +> {};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class A< + B, + C, +> {}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: '< + B, + C, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'class D extends A< + X, + Y, +> {}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends A< + X, + Y, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends A< + X, + Y, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation type_arguments" + self assert: self topEntity type_arguments size equals: 1. + + stack push: (stack top type_arguments at: 1). + self assert: self topEntity sourceCode equals: '< + X, + Y, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class A< + B, + C, +> {} + +class D extends A< + X, + Y, +> {};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodSignatures [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedClassesWithMethodSignatures " + + self parse: 'class Foo { + public async waitFor(func: () => T | Promise, accept?: (result: T) => boolean | Promise, timeoutMessage?: string, retryCount?: number): Promise; + + public readonly async bar?(); + private static bar(); + private static async bar(): T; +};'. + + self assert: (fast allWithType: FASTTypeScriptAccessibilityModifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptLiteralType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodSignature) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptOptionalParameter) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptUndefined) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptUnionType) size equals: 3. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class Foo { + public async waitFor(func: () => T | Promise, accept?: (result: T) => boolean | Promise, timeoutMessage?: string, retryCount?: number): Promise; + + public readonly async bar?(); + private static bar(); + private static async bar(): T; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Foo { + public async waitFor(func: () => T | Promise, accept?: (result: T) => boolean | Promise, timeoutMessage?: string, retryCount?: number): Promise; + + public readonly async bar?(); + private static bar(); + private static async bar(): T; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + public async waitFor(func: () => T | Promise, accept?: (result: T) => boolean | Promise, timeoutMessage?: string, retryCount?: number): Promise; + + public readonly async bar?(); + private static bar(); + private static async bar(): T; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 4. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public async waitFor(func: () => T | Promise, accept?: (result: T) => boolean | Promise, timeoutMessage?: string, retryCount?: number): Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'waitFor'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(func: () => T | Promise, accept?: (result: T) => boolean | Promise, timeoutMessage?: string, retryCount?: number)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 4. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'func: () => T | Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'func'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': () => T | Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '() => T | Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'T | Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T | undefined'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'undefined'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'undefined'. + self assert: (self topEntity isOfType: FASTTypeScriptUndefined). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'accept?: (result: T) => boolean | Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'accept'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': (result: T) => boolean | Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(result: T) => boolean | Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(result: T)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'result: T'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'result'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'boolean | Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'boolean'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'boolean'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'timeoutMessage?: string'. + self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'timeoutMessage'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 4). + self assert: self topEntity sourceCode equals: 'retryCount?: number'. + self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'retryCount'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'public readonly async bar?()'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'private static bar()'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'private'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 4). + self assert: self topEntity sourceCode equals: 'private static async bar(): T'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'private'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class Foo { + public async waitFor(func: () => T | Promise, accept?: (result: T) => boolean | Promise, timeoutMessage?: string, retryCount?: number): Promise; + + public readonly async bar?(); + private static bar(); + private static async bar(): T; +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodsWithAndWithoutTrailingSemicolonsOnOneLine [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedClassesWithMethodsWithAndWithoutTrailingSemicolonsOnOneLine " + + self parse: 'class Foo extends Baz { bar = 5; static one(a) { return a; }; two(b) { return b; } three(c) { return c; } };'. + + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassHeritage) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExtendsClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptPublicFieldDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptReturnStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class Foo extends Baz { bar = 5; static one(a) { return a; }; two(b) { return b; } three(c) { return c; } };'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Foo extends Baz { bar = 5; static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ bar = 5; static one(a) { return a; }; two(b) { return b; } three(c) { return c; } }'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 4. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'bar = 5'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '5'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'static one(a) { return a; }'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ return a; }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'return a;'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'one'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(a)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'two(b) { return b; }'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ return b; }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'return b;'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'two'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(b)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 4). + self assert: self topEntity sourceCode equals: 'three(c) { return c; }'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ return c; }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'return c;'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'c'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'three'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(c)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'c'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'c'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends Baz'. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends Baz'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'Baz'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'Baz'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class Foo extends Baz { bar = 5; static one(a) { return a; }; two(b) { return b; } three(c) { return c; } };' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedClassesWithPropertyNamesAsStringsOrNumbers [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedClassesWithPropertyNamesAsStringsOrNumbers " + + self parse: 'class Foo { + static 2: string; + public static 2: string = ''string''; + public static readonly ''hello''?: int = ''string''; + static readonly ''hello''?: int = ''string''; + readonly ''hello''?: int = ''string''; +};'. + + self assert: (fast allWithType: FASTTypeScriptAccessibilityModifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPublicFieldDefinition) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 4. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class Foo { + static 2: string; + public static 2: string = ''string''; + public static readonly ''hello''?: int = ''string''; + static readonly ''hello''?: int = ''string''; + readonly ''hello''?: int = ''string''; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Foo { + static 2: string; + public static 2: string = ''string''; + public static readonly ''hello''?: int = ''string''; + static readonly ''hello''?: int = ''string''; + readonly ''hello''?: int = ''string''; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + static 2: string; + public static 2: string = ''string''; + public static readonly ''hello''?: int = ''string''; + static readonly ''hello''?: int = ''string''; + readonly ''hello''?: int = ''string''; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 5. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'static 2: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'public static 2: string = ''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'public static readonly ''hello''?: int = ''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '''hello'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'hello'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 4). + self assert: self topEntity sourceCode equals: 'static readonly ''hello''?: int = ''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '''hello'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'hello'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 5). + self assert: self topEntity sourceCode equals: 'readonly ''hello''?: int = ''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '''hello'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'hello'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '''string'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class Foo { + static 2: string; + public static 2: string = ''string''; + public static readonly ''hello''?: int = ''string''; + static readonly ''hello''?: int = ''string''; + readonly ''hello''?: int = ''string''; +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedClassesWithStaticBlocks [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedClassesWithStaticBlocks " + + self parse: 'class Foo { + static { + this.#bar = ''''; + } + static { + this.baz(); + } +};'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptAssignmentExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassStaticBlock) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPrivatePropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptThis) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class Foo { + static { + this.#bar = ''''; + } + static { + this.baz(); + } +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Foo { + static { + this.#bar = ''''; + } + static { + this.baz(); + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + static { + this.#bar = ''''; + } + static { + this.baz(); + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'static { + this.#bar = ''''; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassStaticBlock). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + this.#bar = ''''; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'this.#bar = '''';'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'this.#bar = '''''. + self assert: (self topEntity isOfType: FASTTypeScriptAssignmentExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'this.#bar'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'this'. + self assert: (self topEntity isOfType: FASTTypeScriptThis). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: '#bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPrivatePropertyIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: ''''''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'static { + this.baz(); + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassStaticBlock). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + this.baz(); + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'this.baz();'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'this.baz()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'this.baz'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'this'. + self assert: (self topEntity isOfType: FASTTypeScriptThis). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class Foo { + static { + this.#bar = ''''; + } + static { + this.baz(); + } +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedConditionalTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedConditionalTypes " + + self parse: 'type T = X extends Y ? Z : Y +type T = X extends ?Y ? ?X : Y +type F = ((t: T) => X extends Y ? X : Y) extends ((t: T) => X extends Y ? Y : X) ? X : Y +type F = (t: T) => X extends Y ? X : Y extends (t: T) => X extends Y ? Y : X ? X : Y +type T = T extends X ? Y : X +type T = X extends (infer X)[] ? X : never; +type T = T extends { x: infer X } ? X : never; +type T = T extends { x: infer X extends number } ? X : never;;'. + + self assert: (fast allWithType: FASTTypeScriptArrayType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptConditionalType) size equals: 12. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFlowMaybeType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptInferType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptParenthesizedType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 8. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 65. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 6. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type T = X extends Y ? Z : Y +type T = X extends ?Y ? ?X : Y +type F = ((t: T) => X extends Y ? X : Y) extends ((t: T) => X extends Y ? Y : X) ? X : Y +type F = (t: T) => X extends Y ? X : Y extends (t: T) => X extends Y ? Y : X ? X : Y +type T = T extends X ? Y : X +type T = X extends (infer X)[] ? X : never; +type T = T extends { x: infer X } ? X : never; +type T = T extends { x: infer X extends number } ? X : never;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 9. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type T = X extends Y ? Z : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'X extends Y ? Z : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'Z'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type T = X extends ?Y ? ?X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'X extends ?Y ? ?X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: '?X'. + self assert: (self topEntity isOfType: FASTTypeScriptFlowMaybeType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '?Y'. + self assert: (self topEntity isOfType: FASTTypeScriptFlowMaybeType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type F = ((t: T) => X extends Y ? X : Y) extends ((t: T) => X extends Y ? Y : X) ? X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'F'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '((t: T) => X extends Y ? X : Y) extends ((t: T) => X extends Y ? Y : X) ? X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: '((t: T) => X extends Y ? X : Y)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(t: T) => X extends Y ? X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(t: T)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 't: T'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'X extends Y ? X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '((t: T) => X extends Y ? Y : X)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(t: T) => X extends Y ? Y : X'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(t: T)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 't: T'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'X extends Y ? Y : X'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'type F = (t: T) => X extends Y ? X : Y extends (t: T) => X extends Y ? Y : X ? X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'F'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '(t: T) => X extends Y ? X : Y extends (t: T) => X extends Y ? Y : X ? X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(t: T)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 't: T'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'X extends Y ? X : Y extends (t: T) => X extends Y ? Y : X ? X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'Y extends (t: T) => X extends Y ? Y : X ? X : Y'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '(t: T) => X extends Y ? Y : X'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(t: T)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 't: T'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'X extends Y ? Y : X'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'type T = T extends X ? Y : X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'T extends X ? Y : X'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'infer Y'. + self assert: (self topEntity isOfType: FASTTypeScriptInferType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'type T = X extends (infer X)[] ? X : never;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'X extends (infer X)[] ? X : never'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'never'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '(infer X)[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(infer X)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'infer X'. + self assert: (self topEntity isOfType: FASTTypeScriptInferType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: 'type T = T extends { x: infer X } ? X : never;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'T extends { x: infer X } ? X : never'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'never'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '{ x: infer X }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x: infer X'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': infer X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'infer X'. + self assert: (self topEntity isOfType: FASTTypeScriptInferType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 8). + self assert: self topEntity sourceCode equals: 'type T = T extends { x: infer X extends number } ? X : never;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'T extends { x: infer X extends number } ? X : never'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'never'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '{ x: infer X extends number }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x: infer X extends number'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': infer X extends number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'infer X extends number'. + self assert: (self topEntity isOfType: FASTTypeScriptInferType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 9). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'type T = X extends Y ? Z : Y +type T = X extends ?Y ? ?X : Y +type F = ((t: T) => X extends Y ? X : Y) extends ((t: T) => X extends Y ? Y : X) ? X : Y +type F = (t: T) => X extends Y ? X : Y extends (t: T) => X extends Y ? Y : X ? X : Y +type T = T extends X ? Y : X +type T = X extends (infer X)[] ? X : never; +type T = T extends { x: infer X } ? X : never; +type T = T extends { x: infer X extends number } ? X : never;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedConstructorTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedConstructorTypes " + + self parse: 'let x: new < T1, T2 > ( p1, p2 ) => R;;'. + + self assert: (fast allWithType: FASTTypeScriptConstructorType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'let x: new < T1, T2 > ( p1, p2 ) => R;;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'let x: new < T1, T2 > ( p1, p2 ) => R;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: new < T1, T2 > ( p1, p2 ) => R'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': new < T1, T2 > ( p1, p2 ) => R'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'new < T1, T2 > ( p1, p2 ) => R'. + self assert: (self topEntity isOfType: FASTTypeScriptConstructorType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '( p1, p2 )'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'p1'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'p1'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'p2'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'p2'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'R'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: '< T1, T2 >'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T1'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T1'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'T2'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T2'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'let x: new < T1, T2 > ( p1, p2 ) => R;;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedDecoratorWithParenthesizedExpression [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedDecoratorWithParenthesizedExpression " + + self parse: 'class C { + @(super.decorate) + method2() { } +};'. + + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptDecorator) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptParenthesizedExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class C { + @(super.decorate) + method2() { } +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class C { + @(super.decorate) + method2() { } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + @(super.decorate) + method2() { } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation decorator" + self assert: self topEntity decorator size equals: 1. + + stack push: (stack top decorator at: 1). + self assert: self topEntity sourceCode equals: '@(super.decorate)'. + self assert: (self topEntity isOfType: FASTTypeScriptDecorator). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(super.decorate)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'super.decorate'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'super'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'decorate'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'method2() { }'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'method2'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class C { + @(super.decorate) + method2() { } +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedDefiniteAssignmentAssertions [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedDefiniteAssignmentAssertions " + + self parse: 'var a!: b; +let a!: b;;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'var a!: b; +let a!: b;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'var a!: b;'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a!: b'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': b'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'let a!: b;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'a!: b'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': b'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'var a!: b; +let a!: b;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedEnumDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedEnumDeclarations " + + self parse: 'enum Test { + A, + ''B'', + ''C'' = Math.floor(Math.random() * 1000), + D = 10, + E +} + +enum Style { + None = 0, + Bold = 1, + Italic = 2, + Underline = 4, + Emphasis = Bold | Italic, + Hyperlink = Bold | Underline +};'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptBinaryExpression) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEnumAssignment) size equals: 8. + self assert: (fast allWithType: FASTTypeScriptEnumBody) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEnumDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 8. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'enum Test { + A, + ''B'', + ''C'' = Math.floor(Math.random() * 1000), + D = 10, + E +} + +enum Style { + None = 0, + Bold = 1, + Italic = 2, + Underline = 4, + Emphasis = Bold | Italic, + Hyperlink = Bold | Underline +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'enum Test { + A, + ''B'', + ''C'' = Math.floor(Math.random() * 1000), + D = 10, + E +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptEnumDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + A, + ''B'', + ''C'' = Math.floor(Math.random() * 1000), + D = 10, + E +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptEnumBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '''C'' = Math.floor(Math.random() * 1000)'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumAssignment). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '''C'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Math.floor(Math.random() * 1000)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(Math.random() * 1000)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'Math.random() * 1000'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'Math.random()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'Math.random'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'Math'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'random'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '1000'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'Math.floor'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'Math'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'floor'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'D = 10'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumAssignment). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '10'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + "Testing value of multivalued relation name" + self assert: self topEntity name size equals: 3. + + stack push: (stack top name at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + stack push: (stack top name at: 2). + self assert: self topEntity sourceCode equals: '''B'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + + stack push: (stack top name at: 3). + self assert: self topEntity sourceCode equals: 'E'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Test'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'enum Style { + None = 0, + Bold = 1, + Italic = 2, + Underline = 4, + Emphasis = Bold | Italic, + Hyperlink = Bold | Underline +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptEnumDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + None = 0, + Bold = 1, + Italic = 2, + Underline = 4, + Emphasis = Bold | Italic, + Hyperlink = Bold | Underline +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptEnumBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 6. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'None = 0'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumAssignment). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'None'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '0'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'Bold = 1'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumAssignment). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Bold'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '1'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'Italic = 2'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumAssignment). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Italic'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 4). + self assert: self topEntity sourceCode equals: 'Underline = 4'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumAssignment). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Underline'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '4'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 5). + self assert: self topEntity sourceCode equals: 'Emphasis = Bold | Italic'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumAssignment). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Emphasis'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Bold | Italic'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'Bold'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'Italic'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 6). + self assert: self topEntity sourceCode equals: 'Hyperlink = Bold | Underline'. + self assert: (self topEntity isOfType: FASTTypeScriptEnumAssignment). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Hyperlink'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Bold | Underline'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'Bold'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'Underline'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Style'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'enum Test { + A, + ''B'', + ''C'' = Math.floor(Math.random() * 1000), + D = 10, + E +} + +enum Style { + None = 0, + Bold = 1, + Italic = 2, + Underline = 4, + Emphasis = Bold | Italic, + Hyperlink = Bold | Underline +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedExceptionHandling [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedExceptionHandling " + + self parse: 'try {} +catch (e: unknown) {} +finally {};'. + + self assert: (fast allWithType: FASTTypeScriptCatchClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFinallyClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTryStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'try {} +catch (e: unknown) {} +finally {};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'try {} +catch (e: unknown) {} +finally {}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTryStatement). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation finalizer" + self assert: self topEntity finalizer isNotNil. + + stack push: self topEntity finalizer. + self assert: self topEntity sourceCode equals: 'finally {}'. + self assert: (self topEntity isOfType: FASTTypeScriptFinallyClause). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + stack pop. + + "Testing value of monovalue relation handler" + self assert: self topEntity handler isNotNil. + + stack push: self topEntity handler. + self assert: self topEntity sourceCode equals: 'catch (e: unknown) {}'. + self assert: (self topEntity isOfType: FASTTypeScriptCatchClause). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation parameter" + self assert: self topEntity parameter isNotNil. + + stack push: self topEntity parameter. + self assert: self topEntity sourceCode equals: 'e'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': unknown'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'unknown'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'try {} +catch (e: unknown) {} +finally {};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedExistentialTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedExistentialTypes " + + self parse: 'let x: Array<*>;'. + + self assert: (fast allWithType: FASTTypeScriptExistentialType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'let x: Array<*>;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: Array<*>'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Array<*>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Array<*>'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Array'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '<*>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '*'. + self assert: (self topEntity isOfType: FASTTypeScriptExistentialType) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedExportAssignments [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedExportAssignments " + + self parse: 'export = Linter; +export = {};;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObject) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'export = Linter; +export = {};;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export = Linter;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'Linter'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'export = {};'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptObject). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'export = Linter; +export = {};;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedExportImportAliases [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedExportImportAliases " + + self parse: 'module M { + export module N { + } + export import X = N; +};'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptImportAlias) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptModule) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'module M { + export module N { + } + export import X = N; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'module M { + export module N { + } + export import X = N; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + export module N { + } + export import X = N; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export module N { + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'module N { + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'N'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'export import X = N;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'import X = N;'. + self assert: (self topEntity isOfType: FASTTypeScriptImportAlias). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'N'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'M'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'module M { + export module N { + } + export import X = N; +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedExportInterfacesInNamespaces [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedExportInterfacesInNamespaces " + + self parse: 'declare namespace Foo { + export interface Bar { + } +};'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInternalModule) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'declare namespace Foo { + export interface Bar { + } +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'declare namespace Foo { + export interface Bar { + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'namespace Foo { + export interface Bar { + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInternalModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + export interface Bar { + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export interface Bar { + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'interface Bar { + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'declare namespace Foo { + export interface Bar { + } +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedExtends [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedExtends " + + self parse: 'type Foo any> = T; +type Foo any> = T;;'. + + self assert: (fast allWithType: FASTTypeScriptConstraint) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptConstructorType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptRestPattern) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type Foo any> = T; +type Foo any> = T;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type Foo any> = T;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ' any>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T extends abstract new (...args: any) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation constraint" + self assert: self topEntity constraint isNotNil. + + stack push: self topEntity constraint. + self assert: self topEntity sourceCode equals: 'extends abstract new (...args: any) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptConstraint). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'abstract new (...args: any) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptConstructorType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(...args: any)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '...args: any'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: '...args'. + self assert: (self topEntity isOfType: FASTTypeScriptRestPattern). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'args'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type Foo any> = T;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ' any>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T extends new (...args: any) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation constraint" + self assert: self topEntity constraint isNotNil. + + stack push: self topEntity constraint. + self assert: self topEntity sourceCode equals: 'extends new (...args: any) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptConstraint). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'new (...args: any) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptConstructorType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(...args: any)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '...args: any'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: '...args'. + self assert: (self topEntity isOfType: FASTTypeScriptRestPattern). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'args'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'type Foo any> = T; +type Foo any> = T;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFlowExactObjectTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFlowExactObjectTypes " + + self parse: 'type BrowserStats = {| + url: string, + ms: number +|};'. + + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'type BrowserStats = {| + url: string, + ms: number +|};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'BrowserStats'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{| + url: string, + ms: number +|}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'url: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'url'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'ms: number'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'ms'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFlowExportTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFlowExportTypes " + + self parse: 'export type UserType = {}; +export interface UserInterface {};'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptInterfaceBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'export type UserType = {}; +export interface UserInterface {};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export type UserType = {};'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'type UserType = {};'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'UserType'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'export interface UserInterface {}'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'interface UserInterface {}'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'UserInterface'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'export type UserType = {}; +export interface UserInterface {};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFlowImportTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFlowImportTypes " + + self parse: 'import type {UserID, User} from "./User.js"; +import {type UserID, type User} from "./User.js"; +import typeof {jimiguitar as GuitarT} from "./User.js"; +import type UserID, {addUser, removeUser} from ''./User.js''; + +import type from ''./User.js''; +import type, {addUser} from ''./User.js''; +import {type} from ''./User.js''; +import {addUser as type} from ''./User.js''; +import {type as addUser} from ''./User.js''; +import {type, addUser} from ''./User.js''; +import {addUser, type} from ''./User.js''; +import type, {addUser, type User} from ''./User.js'';;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 24. + self assert: (fast allWithType: FASTTypeScriptImportClause) size equals: 12. + self assert: (fast allWithType: FASTTypeScriptImportSpecifier) size equals: 17. + self assert: (fast allWithType: FASTTypeScriptImportStatement) size equals: 12. + self assert: (fast allWithType: FASTTypeScriptNamedImports) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 12. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 12. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'import type {UserID, User} from "./User.js"; +import {type UserID, type User} from "./User.js"; +import typeof {jimiguitar as GuitarT} from "./User.js"; +import type UserID, {addUser, removeUser} from ''./User.js''; + +import type from ''./User.js''; +import type, {addUser} from ''./User.js''; +import {type} from ''./User.js''; +import {addUser as type} from ''./User.js''; +import {type as addUser} from ''./User.js''; +import {type, addUser} from ''./User.js''; +import {addUser, type} from ''./User.js''; +import type, {addUser, type User} from ''./User.js'';;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 13. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'import type {UserID, User} from "./User.js";'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{UserID, User}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{UserID, User}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'UserID'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'UserID'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'User'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'User'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '"./User.js"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'import {type UserID, type User} from "./User.js";'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{type UserID, type User}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{type UserID, type User}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type UserID'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'UserID'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type User'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'User'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '"./User.js"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'import typeof {jimiguitar as GuitarT} from "./User.js";'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{jimiguitar as GuitarT}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{jimiguitar as GuitarT}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'jimiguitar as GuitarT'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation alias" + self assert: self topEntity alias isNotNil. + + stack push: self topEntity alias. + self assert: self topEntity sourceCode equals: 'GuitarT'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'jimiguitar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '"./User.js"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'import type UserID, {addUser, removeUser} from ''./User.js'';'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'UserID, {addUser, removeUser}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'UserID'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{addUser, removeUser}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'removeUser'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'removeUser'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''./User.js'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'import type from ''./User.js'';'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''./User.js'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'import type, {addUser} from ''./User.js'';'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'type, {addUser}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{addUser}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''./User.js'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: 'import {type} from ''./User.js'';'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{type}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{type}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''./User.js'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 8). + self assert: self topEntity sourceCode equals: 'import {addUser as type} from ''./User.js'';'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{addUser as type}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{addUser as type}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'addUser as type'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation alias" + self assert: self topEntity alias isNotNil. + + stack push: self topEntity alias. + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''./User.js'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 9). + self assert: self topEntity sourceCode equals: 'import {type as addUser} from ''./User.js'';'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{type as addUser}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{type as addUser}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type as addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation alias" + self assert: self topEntity alias isNotNil. + + stack push: self topEntity alias. + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''./User.js'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 10). + self assert: self topEntity sourceCode equals: 'import {type, addUser} from ''./User.js'';'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{type, addUser}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{type, addUser}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''./User.js'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 11). + self assert: self topEntity sourceCode equals: 'import {addUser, type} from ''./User.js'';'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{addUser, type}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{addUser, type}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''./User.js'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 12). + self assert: self topEntity sourceCode equals: 'import type, {addUser, type User} from ''./User.js'';'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'type, {addUser, type User}'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{addUser, type User}'. + self assert: (self topEntity isOfType: FASTTypeScriptNamedImports). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'addUser'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type User'. + self assert: (self topEntity isOfType: FASTTypeScriptImportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'User'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''./User.js'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 13). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'import type {UserID, User} from "./User.js"; +import {type UserID, type User} from "./User.js"; +import typeof {jimiguitar as GuitarT} from "./User.js"; +import type UserID, {addUser, removeUser} from ''./User.js''; + +import type from ''./User.js''; +import type, {addUser} from ''./User.js''; +import {type} from ''./User.js''; +import {addUser as type} from ''./User.js''; +import {type as addUser} from ''./User.js''; +import {type, addUser} from ''./User.js''; +import {addUser, type} from ''./User.js''; +import type, {addUser, type User} from ''./User.js'';;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFlowIntersectionTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFlowIntersectionTypes " + + self parse: 'type BrowserStats$ResourceTiming = number & string;;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIntersectionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type BrowserStats$ResourceTiming = number & string;;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type BrowserStats$ResourceTiming = number & string;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'BrowserStats$ResourceTiming'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'number & string'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'type BrowserStats$ResourceTiming = number & string;;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFlowMaybeTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFlowMaybeTypes " + + self parse: 'const editor: ?CodeEditor +const miscArray: ?T[];'. + + self assert: (fast allWithType: FASTTypeScriptArrayType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFlowMaybeType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'const editor: ?CodeEditor +const miscArray: ?T[];' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'const editor: ?CodeEditor'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'editor: ?CodeEditor'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'editor'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': ?CodeEditor'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '?CodeEditor'. + self assert: (self topEntity isOfType: FASTTypeScriptFlowMaybeType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'CodeEditor'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'const miscArray: ?T[];'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'miscArray: ?T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'miscArray'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': ?T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '?T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptFlowMaybeType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'const editor: ?CodeEditor +const miscArray: ?T[];' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFlowModuleexportsDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFlowModuleexportsDeclarations " + + self parse: 'declare module.exports: { + foo: string; +};'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'declare module.exports: { + foo: string; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'exports'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ + foo: string; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFlowTypeParameterConstraintSyntax [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFlowTypeParameterConstraintSyntax " + + self parse: 'type HandlerFunction = void;'. + + self assert: (fast allWithType: FASTTypeScriptConstraint) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'type HandlerFunction = void;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'HandlerFunction'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T: Element'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation constraint" + self assert: self topEntity constraint isNotNil. + + stack push: self topEntity constraint. + self assert: self topEntity sourceCode equals: ': Element'. + self assert: (self topEntity isOfType: FASTTypeScriptConstraint). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Element'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'void'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFlowUnionTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFlowUnionTypes " + + self parse: 'type U = number | string; +type Z = | "foo" | "bar"; +type Z = | "foo";;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLiteralType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptUnionType) size equals: 4. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type U = number | string; +type Z = | "foo" | "bar"; +type Z = | "foo";;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type U = number | string;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'number | string'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type Z = | "foo" | "bar";'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Z'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '| "foo" | "bar"'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '| "foo"'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '"foo"'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"foo"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '"bar"'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"bar"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type Z = | "foo";'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Z'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '| "foo"'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '"foo"'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"foo"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'type U = number | string; +type Z = | "foo" | "bar"; +type Z = | "foo";;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFlowstyleAmbientClassDeclarationsWithCommas [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFlowstyleAmbientClassDeclarationsWithCommas " + + self parse: 'declare interface IFoo { + bar(): number, + baz(): IBaz, +} + +declare class Foo { + bar(): number, + baz(): Baz, +};'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptInterfaceBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodSignature) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 4. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'declare interface IFoo { + bar(): number, + baz(): IBaz, +} + +declare class Foo { + bar(): number, + baz(): Baz, +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'declare interface IFoo { + bar(): number, + baz(): IBaz, +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'interface IFoo { + bar(): number, + baz(): IBaz, +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + bar(): number, + baz(): IBaz, +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'bar(): number'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'baz(): IBaz'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': IBaz'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'IBaz'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'IFoo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'declare class Foo { + bar(): number, + baz(): Baz, +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Foo { + bar(): number, + baz(): Baz, +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + bar(): number, + baz(): Baz, +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'bar(): number'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'baz(): Baz'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': Baz'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Baz'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'declare interface IFoo { + bar(): number, + baz(): IBaz, +} + +declare class Foo { + bar(): number, + baz(): Baz, +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFunctionCallsWithArrayAndTupleTypeArguments [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFunctionCallsWithArrayAndTupleTypeArguments " + + self parse: 'a.b<[C]>(); +a();;'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptArrayType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNestedTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTupleType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'a.b<[C]>(); +a();;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a.b<[C]>();'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'a.b<[C]>()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'a.b'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '<[C]>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[C]'. + self assert: (self topEntity isOfType: FASTTypeScriptTupleType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'a();'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'a()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C.D[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'C.D'. + self assert: (self topEntity isOfType: FASTTypeScriptNestedTypeIdentifier). + + "Testing value of monovalue relation module" + self assert: self topEntity module isNotNil. + + stack push: self topEntity module. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'a.b<[C]>(); +a();;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFunctionCallsWithOptionalChainingAndTypeArguments [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFunctionCallsWithOptionalChainingAndTypeArguments " + + self parse: 'A?.();;'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'A?.();;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A?.();'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'A?.()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'A?.();;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFunctionSignature [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFunctionSignature " + + self parse: 'export default function foo(): bar;'. + + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'export default function foo(): bar;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'function foo(): bar;'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFunctionTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFunctionTypes " + + self parse: 'let x: (result: string) => any; +const foo: (this: Readable, size?: number) => any;;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptOptionalParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptThis) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'let x: (result: string) => any; +const foo: (this: Readable, size?: number) => any;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'let x: (result: string) => any;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: (result: string) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': (result: string) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(result: string) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(result: string)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'result: string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'result'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'const foo: (this: Readable, size?: number) => any;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'foo: (this: Readable, size?: number) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': (this: Readable, size?: number) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(this: Readable, size?: number) => any'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(this: Readable, size?: number)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'this: Readable'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'this'. + self assert: (self topEntity isOfType: FASTTypeScriptThis). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Readable'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Readable'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'size?: number'. + self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'size'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'let x: (result: string) => any; +const foo: (this: Readable, size?: number) => any;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFunctionsWithDestructuredParameters [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFunctionsWithDestructuredParameters " + + self parse: 'let foo: ({a}: Foo) => number;'. + + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObjectPattern) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptShorthandPropertyIdentifierPattern) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'let foo: ({a}: Foo) => number;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'foo: ({a}: Foo) => number'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': ({a}: Foo) => number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '({a}: Foo) => number'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '({a}: Foo)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{a}: Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: '{a}'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectPattern). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptShorthandPropertyIdentifierPattern). + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedFunctionsWithTypedParameters [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedFunctionsWithTypedParameters " + + self parse: 'function greeter(person: string) { + return "Hello, " + person; +} + +function foo(x: T): T { + +} + +function foo(a: T[], f: (x: T) => U): U[] { + +} + +function foo(this: T[]): U[] { + return [] +} + +function foo(x: T, y: U) { + +};'. + + self assert: (fast allWithType: FASTTypeScriptArray) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptArrayType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptBinaryExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptConstraint) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptFunctionDeclaration) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 13. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 8. + self assert: (fast allWithType: FASTTypeScriptReturnStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptThis) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 17. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 4. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'function greeter(person: string) { + return "Hello, " + person; +} + +function foo(x: T): T { + +} + +function foo(a: T[], f: (x: T) => U): U[] { + +} + +function foo(this: T[]): U[] { + return [] +} + +function foo(x: T, y: U) { + +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 6. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function greeter(person: string) { + return "Hello, " + person; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + return "Hello, " + person; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'return "Hello, " + person;'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"Hello, " + person'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: '"Hello, "'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Hello, '. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'person'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'greeter'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(person: string)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'person: string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'person'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'function foo(x: T): T { + +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(x: T)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: T'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'function foo(a: T[], f: (x: T) => U): U[] { + +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(a: T[], f: (x: T) => U)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'a: T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'f: (x: T) => U'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': (x: T) => U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(x: T) => U'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(x: T)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: T'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': U[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'U[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'function foo(this: T[]): U[] { + return [] +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + return [] +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'return []'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArray). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(this: T[])'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'this: T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'this'. + self assert: (self topEntity isOfType: FASTTypeScriptThis). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': U[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'U[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'function foo(x: T, y: U) { + +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(x: T, y: U)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: T'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'y: U'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'y'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'const T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'const U extends string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation constraint" + self assert: self topEntity constraint isNotNil. + + stack push: self topEntity constraint. + self assert: self topEntity sourceCode equals: 'extends string'. + self assert: (self topEntity isOfType: FASTTypeScriptConstraint). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'function greeter(person: string) { + return "Hello, " + person; +} + +function foo(x: T): T { + +} + +function foo(a: T[], f: (x: T) => U): U[] { + +} + +function foo(this: T[]): U[] { + return [] +} + +function foo(x: T, y: U) { + +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedGenericCalls [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedGenericCalls " + + self parse: 'f(x);'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'f(x);'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'f(x)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(x)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedGenericTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedGenericTypes " + + self parse: 'class A< + B, + C, +> {} + +class D extends A< + X, + Y, +> {} + +class E extends funThatEvalsToClass()< + X, + Y, +> {} + +class F extends G, H {};'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptClassHeritage) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExtendsClause) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class A< + B, + C, +> {} + +class D extends A< + X, + Y, +> {} + +class E extends funThatEvalsToClass()< + X, + Y, +> {} + +class F extends G, H {};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 5. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class A< + B, + C, +> {}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: '< + B, + C, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'class D extends A< + X, + Y, +> {}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends A< + X, + Y, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends A< + X, + Y, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation type_arguments" + self assert: self topEntity type_arguments size equals: 1. + + stack push: (stack top type_arguments at: 1). + self assert: self topEntity sourceCode equals: '< + X, + Y, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'class E extends funThatEvalsToClass()< + X, + Y, +> {}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends funThatEvalsToClass()< + X, + Y, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends funThatEvalsToClass()< + X, + Y, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation type_arguments" + self assert: self topEntity type_arguments size equals: 1. + + stack push: (stack top type_arguments at: 1). + self assert: self topEntity sourceCode equals: '< + X, + Y, +>' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'funThatEvalsToClass()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'funThatEvalsToClass'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'funThatEvalsToClass()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'funThatEvalsToClass'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'E'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'class F extends G, H {}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends G, H'. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends G, H'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation type_arguments" + self assert: self topEntity type_arguments size equals: 1. + + stack push: (stack top type_arguments at: 1). + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 4. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'G'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'G'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top value at: 3). + self assert: self topEntity sourceCode equals: 'H'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top value at: 4). + self assert: self topEntity sourceCode equals: 'H'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'F'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class A< + B, + C, +> {} + +class D extends A< + X, + Y, +> {} + +class E extends funThatEvalsToClass()< + X, + Y, +> {} + +class F extends G, H {};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedGlobalNamespaceDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedGlobalNamespaceDeclarations " + + self parse: 'declare global { +};'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'declare global { +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'declare global { +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'declare global { +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedImportAliases [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedImportAliases " + + self parse: 'import r = X.N;;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptImportAlias) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNestedIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'import r = X.N;;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'import r = X.N;'. + self assert: (self topEntity isOfType: FASTTypeScriptImportAlias). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'r'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'X.N'. + self assert: (self topEntity isOfType: FASTTypeScriptNestedIdentifier). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'N'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'import r = X.N;;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedImportAliasesInModules [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedImportAliasesInModules " + + self parse: 'module C { + import r = X.N; +};'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptImportAlias) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptModule) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNestedIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'module C { + import r = X.N; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'module C { + import r = X.N; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + import r = X.N; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'import r = X.N;'. + self assert: (self topEntity isOfType: FASTTypeScriptImportAlias). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'r'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'X.N'. + self assert: (self topEntity isOfType: FASTTypeScriptNestedIdentifier). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'N'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'module C { + import r = X.N; +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedImportAssert [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedImportAssert " + + self parse: 'import something from ''foo.css'' assert { type: ''css'' };'. + + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptImportAttribute) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptImportClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptImportStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObject) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPair) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 2. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'import something from ''foo.css'' assert { type: ''css'' };'. + self assert: (self topEntity isOfType: FASTTypeScriptImportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'something'. + self assert: (self topEntity isOfType: FASTTypeScriptImportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'something'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'assert { type: ''css'' }'. + self assert: (self topEntity isOfType: FASTTypeScriptImportAttribute). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '{ type: ''css'' }'. + self assert: (self topEntity isOfType: FASTTypeScriptObject). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type: ''css'''. + self assert: (self topEntity isOfType: FASTTypeScriptPair). + + "Testing value of monovalue relation key" + self assert: self topEntity key isNotNil. + + stack push: self topEntity key. + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '''css'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'css'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''foo.css'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo.css'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedImportInType [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedImportInType " + + self parse: 'type Foo = import(''node:fs'').ReadStream & { + bar(); +};;'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptImport) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIntersectionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type Foo = import(''node:fs'').ReadStream & { + bar(); +};;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type Foo = import(''node:fs'').ReadStream & { + bar(); +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'import(''node:fs'').ReadStream & { + bar(); +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'import(''node:fs'').ReadStream'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'import(''node:fs'')'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(''node:fs'')'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '''node:fs'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'node:fs'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'import'. + self assert: (self topEntity isOfType: FASTTypeScriptImport). + stack pop. + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'ReadStream'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ + bar(); +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'bar()'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'type Foo = import(''node:fs'').ReadStream & { + bar(); +};;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedIndexSignatures [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedIndexSignatures " + + self parse: 'type Foo = { + [b: string]: any; + readonly [c: number]: string; +};'. + + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIndexSignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'type Foo = { + [b: string]: any; + readonly [c: number]: string; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{ + [b: string]: any; + readonly [c: number]: string; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[b: string]: any'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'readonly [c: number]: string'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'c'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedIndexTypeQueries [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedIndexTypeQueries " + + self parse: 'export type Extracted = keyof Pick;'. + + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIndexTypeQuery) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLiteralType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 3. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'export type Extracted = keyof Pick;'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'type Extracted = keyof Pick;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Extracted'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'keyof Pick'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Pick'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Pick'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Base'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '"id"'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"id"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'id'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedIndexedAccessPrecedence [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedIndexedAccessPrecedence " + + self parse: '// These should generate the same AST aside from the parenthesized_type node +type X1 = typeof Y[keyof typeof Z]; +type X2 = (typeof Y)[keyof typeof Z];;'. + + self assert: (fast allWithType: FASTTypeScriptComment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptIndexTypeQuery) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLookupType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptParenthesizedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeQuery) size equals: 4. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: '// These should generate the same AST aside from the parenthesized_type node +type X1 = typeof Y[keyof typeof Z]; +type X2 = (typeof Y)[keyof typeof Z];;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '// These should generate the same AST aside from the parenthesized_type node'. + self assert: (self topEntity isOfType: FASTTypeScriptComment). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type X1 = typeof Y[keyof typeof Z];'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X1'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'typeof Y[keyof typeof Z]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'typeof Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'keyof typeof Z'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'typeof Z'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Z'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type X2 = (typeof Y)[keyof typeof Z];'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X2'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '(typeof Y)[keyof typeof Z]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '(typeof Y)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'typeof Y'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Y'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'keyof typeof Z'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'typeof Z'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Z'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: '// These should generate the same AST aside from the parenthesized_type node +type X1 = typeof Y[keyof typeof Z]; +type X2 = (typeof Y)[keyof typeof Z];;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedInstantiationExpressions [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedInstantiationExpressions " + + self parse: 'const makeHammerBox = makeBox; +const makeStringBox = makeBox; +const ErrorMap = Map;;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptInstantiationExpression) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 3. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'const makeHammerBox = makeBox; +const makeStringBox = makeBox; +const ErrorMap = Map;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'const makeHammerBox = makeBox;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'makeHammerBox = makeBox'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'makeHammerBox'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'makeBox'. + self assert: (self topEntity isOfType: FASTTypeScriptInstantiationExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'makeBox'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Hammer'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'const makeStringBox = makeBox;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'makeStringBox = makeBox'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'makeStringBox'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'makeBox'. + self assert: (self topEntity isOfType: FASTTypeScriptInstantiationExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'makeBox'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'const ErrorMap = Map;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'ErrorMap = Map'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'ErrorMap'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Map'. + self assert: (self topEntity isOfType: FASTTypeScriptInstantiationExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'Map'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Error'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'const makeHammerBox = makeBox; +const makeStringBox = makeBox; +const ErrorMap = Map;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedInterfaceDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedInterfaceDeclarations " + + self parse: 'interface A { a: string; } + +interface B extends A { b: string; } + +interface Friend { + name: string; + favoriteColor?: string; +} + +interface G { + x: T; + y: U; +} + +interface X { + hook: { + } + get(key: Key): Promise; +} + +interface Enum extends Bar, Baz, Foo { + public toEnum(): Int; +};'. + + self assert: (fast allWithType: FASTTypeScriptAccessibilityModifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptConstraint) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExtendsTypeClause) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceBody) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptInterfaceDeclaration) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptMethodSignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 9. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 10. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 20. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'interface A { a: string; } + +interface B extends A { b: string; } + +interface Friend { + name: string; + favoriteColor?: string; +} + +interface G { + x: T; + y: U; +} + +interface X { + hook: { + } + get(key: Key): Promise; +} + +interface Enum extends Bar, Baz, Foo { + public toEnum(): Int; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 7. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'interface A { a: string; }'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ a: string; }'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'interface B extends A { b: string; }'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ b: string; }'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'b: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends A'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsTypeClause). + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'interface Friend { + name: string; + favoriteColor?: string; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + name: string; + favoriteColor?: string; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'name: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'name'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'favoriteColor?: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'favoriteColor'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Friend'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'interface G { + x: T; + y: U; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + x: T; + y: U; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x: T'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'y: U'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'y'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'G'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'U extends B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation constraint" + self assert: self topEntity constraint isNotNil. + + stack push: self topEntity constraint. + self assert: self topEntity sourceCode equals: 'extends B'. + self assert: (self topEntity isOfType: FASTTypeScriptConstraint). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'interface X { + hook: { + } + get(key: Key): Promise; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + hook: { + } + get(key: Key): Promise; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'hook: { + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'hook'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': { + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '{ + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'get(key: Key): Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'get'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(key: Key)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'key: Key'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'key'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Key'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Key'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'interface Enum extends Bar, Baz, Foo { + public toEnum(): Int; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + public toEnum(): Int; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'public toEnum(): Int'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'toEnum'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': Int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Int'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends Bar, Baz, Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsTypeClause). + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Enum'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'interface A { a: string; } + +interface B extends A { b: string; } + +interface Friend { + name: string; + favoriteColor?: string; +} + +interface G { + x: T; + y: U; +} + +interface X { + hook: { + } + get(key: Key): Promise; +} + +interface Enum extends Bar, Baz, Foo { + public toEnum(): Int; +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedLanguagetsx [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedLanguagetsx " + + self parse: '>hi; + />; +<>fragment;;'. + + self assert: (fast allWithType: FASTTypeScriptBinaryExpression) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptERROR) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRegex) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptRegexPattern) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAssertion) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: '>hi; + />; +<>fragment;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '>hi; + />; +<>fragment;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '>hi; + />; +<>fragment' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: '>hi; + />; +<>fragment>hi; +>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Element'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Element'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'hi; +; +; +'. + self assert: (self topEntity isOfType: FASTTypeScriptRegex). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'Element>; +'. + self assert: (self topEntity isOfType: FASTTypeScriptRegexPattern). + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'Element; +<>fragment>hi; + />; +<>fragment;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedLanguagetypescript [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedLanguagetypescript " + + self parse: 'b; +>e.f;;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeAssertion) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 3. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'b; +>e.f;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'b;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAssertion). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '>e.f;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '>e.f'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAssertion). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'e.f'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'e'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'b; +>e.f;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedLiteralTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedLiteralTypes " + + self parse: 'let x: 2 +let x: 2 | -3 | +4 +let x: "string" +let x: false;'. + + self assert: (fast allWithType: FASTTypeScriptFalse) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptLiteralType) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptUnaryExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptUnionType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 4. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'let x: 2 +let x: 2 | -3 | +4 +let x: "string" +let x: false;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'let x: 2'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: 2'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': 2'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'let x: 2 | -3 | +4'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: 2 | -3 | +4'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': 2 | -3 | +4'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '2 | -3 | +4'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '2 | -3'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '-3'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '-3'. + self assert: (self topEntity isOfType: FASTTypeScriptUnaryExpression). + + "Testing value of monovalue relation argument" + self assert: self topEntity argument isNotNil. + + stack push: self topEntity argument. + self assert: self topEntity sourceCode equals: '3'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '+4'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '+4'. + self assert: (self topEntity isOfType: FASTTypeScriptUnaryExpression). + + "Testing value of monovalue relation argument" + self assert: self topEntity argument isNotNil. + + stack push: self topEntity argument. + self assert: self topEntity sourceCode equals: '4'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'let x: "string"'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: "string"'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': "string"'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"string"'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"string"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'let x: false;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: false'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': false'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'false'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'false'. + self assert: (self topEntity isOfType: FASTTypeScriptFalse). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'let x: 2 +let x: 2 | -3 | +4 +let x: "string" +let x: false;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedLiteralTypesAndPredefinedTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedLiteralTypesAndPredefinedTypes " + + self parse: 'type T = Foo;'. + + self assert: (fast allWithType: FASTTypeScriptFalse) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLiteralType) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptNull) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTrue) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptUndefined) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'type T = Foo;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 11. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'unknown'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'void'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptTrue). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: 'false'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'false'. + self assert: (self topEntity isOfType: FASTTypeScriptFalse). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 8). + self assert: self topEntity sourceCode equals: 'null'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'null'. + self assert: (self topEntity isOfType: FASTTypeScriptNull). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 9). + self assert: self topEntity sourceCode equals: 'undefined'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'undefined'. + self assert: (self topEntity isOfType: FASTTypeScriptUndefined). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 10). + self assert: self topEntity sourceCode equals: '0'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '0'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 11). + self assert: self topEntity sourceCode equals: '"foo"'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"foo"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedLookupTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedLookupTypes " + + self parse: 'type K1 = Foo[bar] +type K1 = Foo[''bar'' | ''baz''];'. + + self assert: (fast allWithType: FASTTypeScriptLiteralType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLookupType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptUnionType) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type K1 = Foo[bar] +type K1 = Foo[''bar'' | ''baz''];' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type K1 = Foo[bar]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'K1'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Foo[bar]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type K1 = Foo[''bar'' | ''baz''];'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'K1'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Foo[''bar'' | ''baz'']'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '''bar'' | ''baz'''. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '''bar'''. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '''bar'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '''baz'''. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '''baz'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'type K1 = Foo[bar] +type K1 = Foo[''bar'' | ''baz''];' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedMappedTypeAsClauses [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedMappedTypeAsClauses " + + self parse: 'type A = { [B in keyof C & string as `get${Capitalize

}`]: () => A[B] }; +type A = { [B in keyof C & string as `${P}1` | `${P}2`]: A[B] };'. + + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIndexSignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIndexTypeQuery) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIntersectionType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLookupType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMappedTypeClause) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTemplateLiteralType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTemplateType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 16. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptUnionType) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type A = { [B in keyof C & string as `get${Capitalize

}`]: () => A[B] }; +type A = { [B in keyof C & string as `${P}1` | `${P}2`]: A[B] };' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type A = { [B in keyof C & string as `get${Capitalize

}`]: () => A[B] };'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{ [B in keyof C & string as `get${Capitalize

}`]: () => A[B] }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[B in keyof C & string as `get${Capitalize

}`]: () => A[B]'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'B in keyof C & string as `get${Capitalize

}`'. + self assert: (self topEntity isOfType: FASTTypeScriptMappedTypeClause). + + "Testing value of monovalue relation alias" + self assert: self topEntity alias isNotNil. + + stack push: self topEntity alias. + self assert: self topEntity sourceCode equals: '`get${Capitalize

}`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'get'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '${Capitalize

}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Capitalize

'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Capitalize'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '

'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'P'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'keyof C & string'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'keyof C'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': () => A[B]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '() => A[B]'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'A[B]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type A = { [B in keyof C & string as `${P}1` | `${P}2`]: A[B] };'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{ [B in keyof C & string as `${P}1` | `${P}2`]: A[B] }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[B in keyof C & string as `${P}1` | `${P}2`]: A[B]'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'B in keyof C & string as `${P}1` | `${P}2`'. + self assert: (self topEntity isOfType: FASTTypeScriptMappedTypeClause). + + "Testing value of monovalue relation alias" + self assert: self topEntity alias isNotNil. + + stack push: self topEntity alias. + self assert: self topEntity sourceCode equals: '`${P}1` | `${P}2`'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '`${P}1`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '${P}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'P'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '1'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '`${P}2`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '${P}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'P'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '2'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'keyof C & string'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'keyof C'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': A[B]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'A[B]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'type A = { [B in keyof C & string as `get${Capitalize

}`]: () => A[B] }; +type A = { [B in keyof C & string as `${P}1` | `${P}2`]: A[B] };' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedMappedTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedMappedTypes " + + self parse: 'export type NoInfer = T & { [K in keyof T]: T[K] };;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIndexSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIndexTypeQuery) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIntersectionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLookupType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMappedTypeClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'export type NoInfer = T & { [K in keyof T]: T[K] };;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export type NoInfer = T & { [K in keyof T]: T[K] };'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'type NoInfer = T & { [K in keyof T]: T[K] };'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'NoInfer'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'T & { [K in keyof T]: T[K] }'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ [K in keyof T]: T[K] }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[K in keyof T]: T[K]'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'K in keyof T'. + self assert: (self topEntity isOfType: FASTTypeScriptMappedTypeClause). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'K'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'keyof T'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T[K]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T[K]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'K'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'export type NoInfer = T & { [K in keyof T]: T[K] };;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedMethodDeclarationsWithKeywordsAsNames [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedMethodDeclarationsWithKeywordsAsNames " + + self parse: 'class Foo { + private async() {}; + get(): Result {}; + private set(plugin) {}; +};'. + + self assert: (fast allWithType: FASTTypeScriptAccessibilityModifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class Foo { + private async() {}; + get(): Result {}; + private set(plugin) {}; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Foo { + private async() {}; + get(): Result {}; + private set(plugin) {}; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + private async() {}; + get(): Result {}; + private set(plugin) {}; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 3. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'private async() {}'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'private'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'async'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'get(): Result {}'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'get'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': Result'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Result'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 3). + self assert: self topEntity sourceCode equals: 'private set(plugin) {}'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'private'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'set'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(plugin)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'plugin'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'plugin'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class Foo { + private async() {}; + get(): Result {}; + private set(plugin) {}; +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedMultilineVariableDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedMultilineVariableDeclarations " + + self parse: 'var a = b + , c = d + , e = f;'. + + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 3. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'var a = b + , c = d + , e = f;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a = b'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'c = d'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'c'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'd'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'e = f'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'e'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedNamespacesAsInternalModules [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedNamespacesAsInternalModules " + + self parse: 'namespace Foo { +} + +namespace Bar { + var x; +};'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptInternalModule) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'namespace Foo { +} + +namespace Bar { + var x; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'namespace Foo { +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'namespace Foo { +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInternalModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'namespace Bar { + var x; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInternalModule). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + var x; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'var x;'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'namespace Foo { +} + +namespace Bar { + var x; +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedNestedTypeArguments [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedNestedTypeArguments " + + self parse: 'interface X { + x(): Promise>; +} + +var y: Map>>>;'. + + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'interface X { + x(): Promise>; +} + +var y: Map>>>;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'interface X { + x(): Promise>; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + x(): Promise>; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x(): Promise>'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': Promise>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Promise>'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Array'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Array'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'X'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'var y: Map>>>;'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'y: Map>>>'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'y'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Map>>>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Map>>>'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Map'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '>>>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Promise>>'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Promise'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '>>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Map>'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Map'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'bool'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Map'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Map'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'interface X { + x(): Promise>; +} + +var y: Map>>>;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedNewObjectWithTypeArguments [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedNewObjectWithTypeArguments " + + self parse: 'const lines = new Array();'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNewExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'const lines = new Array();'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'lines = new Array()'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'lines'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'new Array()'. + self assert: (self topEntity isOfType: FASTTypeScriptNewExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation constructor" + self assert: self topEntity constructor isNotNil. + + stack push: self topEntity constructor. + self assert: self topEntity sourceCode equals: 'Array'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'DiffLine'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedNonnullAssertionOperator [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedNonnullAssertionOperator " + + self parse: 'const repository = foo++!;'. + + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNonNullExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptUpdateExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'const repository = foo++!;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'repository = foo++!'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'repository'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'foo++!'. + self assert: (self topEntity isOfType: FASTTypeScriptNonNullExpression). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'foo++'. + self assert: (self topEntity isOfType: FASTTypeScriptUpdateExpression). + + "Testing value of monovalue relation argument" + self assert: self topEntity argument isNotNil. + + stack push: self topEntity argument. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedObjectTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedObjectTypes " + + self parse: 'let person: {name: string, age: number}; +let thing: { [type: string]: string }; +type T = { [K in keyof T]-?: any } +type T = { [K in keyof T]?: any } +type T = { -readonly [K in keyof T]: any };'. + + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIndexSignature) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptIndexTypeQuery) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMappedTypeClause) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptOmittingTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptOptingTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 9. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'let person: {name: string, age: number}; +let thing: { [type: string]: string }; +type T = { [K in keyof T]-?: any } +type T = { [K in keyof T]?: any } +type T = { -readonly [K in keyof T]: any };' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 5. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'let person: {name: string, age: number};'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'person: {name: string, age: number}'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'person'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': {name: string, age: number}'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '{name: string, age: number}'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'name: string'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'name'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'age: number'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'age'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'let thing: { [type: string]: string };'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'thing: { [type: string]: string }'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'thing'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': { [type: string]: string }'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '{ [type: string]: string }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[type: string]: string'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type T = { [K in keyof T]-?: any }'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{ [K in keyof T]-?: any }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[K in keyof T]-?: any'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'K in keyof T'. + self assert: (self topEntity isOfType: FASTTypeScriptMappedTypeClause). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'K'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'keyof T'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: '-?: any'. + self assert: (self topEntity isOfType: FASTTypeScriptOmittingTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'type T = { [K in keyof T]?: any }'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{ [K in keyof T]?: any }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[K in keyof T]?: any'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'K in keyof T'. + self assert: (self topEntity isOfType: FASTTypeScriptMappedTypeClause). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'K'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'keyof T'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: '?: any'. + self assert: (self topEntity isOfType: FASTTypeScriptOptingTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'type T = { -readonly [K in keyof T]: any };'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{ -readonly [K in keyof T]: any }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '-readonly [K in keyof T]: any'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'K in keyof T'. + self assert: (self topEntity isOfType: FASTTypeScriptMappedTypeClause). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'K'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'keyof T'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'let person: {name: string, age: number}; +let thing: { [type: string]: string }; +type T = { [K in keyof T]-?: any } +type T = { [K in keyof T]?: any } +type T = { -readonly [K in keyof T]: any };' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedObjectTypesWithAutomaticSemicolonInsertion [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedObjectTypesWithAutomaticSemicolonInsertion " + + self parse: 'type Something = { + length: number + (string): string + [index:string] : number +};'. + + self assert: (fast allWithType: FASTTypeScriptCallSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIndexSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'type Something = { + length: number + (string): string + [index:string] : number +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Something'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{ + length: number + (string): string + [index:string] : number +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'length: number'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'length'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '(string): string'. + self assert: (self topEntity isOfType: FASTTypeScriptCallSignature). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(string)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: '[index:string] : number'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'index'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedObjectTypesWithCallSignatures [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedObjectTypesWithCallSignatures " + + self parse: 'let MyFunction: { + (string): string, + length: number +};;'. + + self assert: (fast allWithType: FASTTypeScriptCallSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'let MyFunction: { + (string): string, + length: number +};;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'let MyFunction: { + (string): string, + length: number +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'MyFunction: { + (string): string, + length: number +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'MyFunction'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': { + (string): string, + length: number +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '{ + (string): string, + length: number +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '(string): string'. + self assert: (self topEntity isOfType: FASTTypeScriptCallSignature). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(string)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'length: number'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'length'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'let MyFunction: { + (string): string, + length: number +};;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedObjectsWithReservedWordsAsKeys [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedObjectsWithReservedWordsAsKeys " + + self parse: '{ + public: true, + private: true, + readonly: true +}; + +{ + readonly: 1, + abstract: 1, + static: 1 +};;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptObject) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPair) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTrue) size equals: 3. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: '{ + public: true, + private: true, + readonly: true +}; + +{ + readonly: 1, + abstract: 1, + static: 1 +};;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{ + public: true, + private: true, + readonly: true +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{ + public: true, + private: true, + readonly: true +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObject). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'public: true'. + self assert: (self topEntity isOfType: FASTTypeScriptPair). + + "Testing value of monovalue relation key" + self assert: self topEntity key isNotNil. + + stack push: self topEntity key. + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptTrue). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'private: true'. + self assert: (self topEntity isOfType: FASTTypeScriptPair). + + "Testing value of monovalue relation key" + self assert: self topEntity key isNotNil. + + stack push: self topEntity key. + self assert: self topEntity sourceCode equals: 'private'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptTrue). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'readonly: true'. + self assert: (self topEntity isOfType: FASTTypeScriptPair). + + "Testing value of monovalue relation key" + self assert: self topEntity key isNotNil. + + stack push: self topEntity key. + self assert: self topEntity sourceCode equals: 'readonly'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptTrue). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ + readonly: 1, + abstract: 1, + static: 1 +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{ + readonly: 1, + abstract: 1, + static: 1 +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObject). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'readonly: 1'. + self assert: (self topEntity isOfType: FASTTypeScriptPair). + + "Testing value of monovalue relation key" + self assert: self topEntity key isNotNil. + + stack push: self topEntity key. + self assert: self topEntity sourceCode equals: 'readonly'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '1'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'abstract: 1'. + self assert: (self topEntity isOfType: FASTTypeScriptPair). + + "Testing value of monovalue relation key" + self assert: self topEntity key isNotNil. + + stack push: self topEntity key. + self assert: self topEntity sourceCode equals: 'abstract'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '1'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'static: 1'. + self assert: (self topEntity isOfType: FASTTypeScriptPair). + + "Testing value of monovalue relation key" + self assert: self topEntity key isNotNil. + + stack push: self topEntity key. + self assert: self topEntity sourceCode equals: 'static'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '1'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: '{ + public: true, + private: true, + readonly: true +}; + +{ + readonly: 1, + abstract: 1, + static: 1 +};;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedOverrideModifier [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedOverrideModifier " + + self parse: 'abstract class Foo { + abstract baz(): void; +} + +class Bar extends Foo { + override baz() {} +};'. + + self assert: (fast allWithType: FASTTypeScriptAbstractClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptAbstractMethodSignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassHeritage) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExtendsClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptOverrideModifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'abstract class Foo { + abstract baz(): void; +} + +class Bar extends Foo { + override baz() {} +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'abstract class Foo { + abstract baz(): void; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAbstractClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + abstract baz(): void; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'abstract baz(): void'. + self assert: (self topEntity isOfType: FASTTypeScriptAbstractMethodSignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': void'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'void'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'class Bar extends Foo { + override baz() {} +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + override baz() {} +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'override baz() {}'. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'override'. + self assert: (self topEntity isOfType: FASTTypeScriptOverrideModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'abstract class Foo { + abstract baz(): void; +} + +class Bar extends Foo { + override baz() {} +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedParenthesizedTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedParenthesizedTypes " + + self parse: 'var x: (string); +var x: ({a: any});;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptParenthesizedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'var x: (string); +var x: ({a: any});;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'var x: (string);'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x: (string)'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': (string)'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(string)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'var x: ({a: any});'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'x: ({a: any})'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': ({a: any})'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '({a: any})'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '{a: any}'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a: any'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'var x: (string); +var x: ({a: any});;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedPredefinedTypesAsIdentifiers [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedPredefinedTypesAsIdentifiers " + + self parse: 'let score: (string: string, query: string) => number;'. + + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'let score: (string: string, query: string) => number;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'score: (string: string, query: string) => number'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'score'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': (string: string, query: string) => number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(string: string, query: string) => number'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(string: string, query: string)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'string: string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'query: string'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'query'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedPropertySignaturesWithAccessibilityModifiers [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedPropertySignaturesWithAccessibilityModifiers " + + self parse: 'export interface IAppState { + public readonly users: ReadonlyArray +} + +export class CloningRepository { + public readonly id = CloningRepositoryID++ +};'. + + self assert: (fast allWithType: FASTTypeScriptAccessibilityModifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInterfaceDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPublicFieldDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptUpdateExpression) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'export interface IAppState { + public readonly users: ReadonlyArray +} + +export class CloningRepository { + public readonly id = CloningRepositoryID++ +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export interface IAppState { + public readonly users: ReadonlyArray +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'interface IAppState { + public readonly users: ReadonlyArray +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + public readonly users: ReadonlyArray +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'public readonly users: ReadonlyArray'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'users'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': ReadonlyArray'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'ReadonlyArray'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'ReadonlyArray'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'User'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'IAppState'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'export class CloningRepository { + public readonly id = CloningRepositoryID++ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'class CloningRepository { + public readonly id = CloningRepositoryID++ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + public readonly id = CloningRepositoryID++ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public readonly id = CloningRepositoryID++'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'id'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'CloningRepositoryID++'. + self assert: (self topEntity isOfType: FASTTypeScriptUpdateExpression). + + "Testing value of monovalue relation argument" + self assert: self topEntity argument isNotNil. + + stack push: self topEntity argument. + self assert: self topEntity sourceCode equals: 'CloningRepositoryID'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'CloningRepository'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'export interface IAppState { + public readonly users: ReadonlyArray +} + +export class CloningRepository { + public readonly id = CloningRepositoryID++ +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedReadonlyArrays [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedReadonlyArrays " + + self parse: 'type t = a[] +type t = readonly a[] +type t = readonly a[][] +type t = (readonly a[])[] +type t = readonly (readonly a[]) [];'. + + self assert: (fast allWithType: FASTTypeScriptArrayType) size equals: 8. + self assert: (fast allWithType: FASTTypeScriptParenthesizedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptReadonlyType) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 10. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type t = a[] +type t = readonly a[] +type t = readonly a[][] +type t = (readonly a[])[] +type t = readonly (readonly a[]) [];' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 5. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type t = a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type t = readonly a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'readonly a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptReadonlyType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type t = readonly a[][]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'readonly a[][]'. + self assert: (self topEntity isOfType: FASTTypeScriptReadonlyType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a[][]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'type t = (readonly a[])[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '(readonly a[])[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(readonly a[])'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'readonly a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptReadonlyType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'type t = readonly (readonly a[]) [];'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'readonly (readonly a[]) []'. + self assert: (self topEntity isOfType: FASTTypeScriptReadonlyType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(readonly a[]) []'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(readonly a[])'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'readonly a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptReadonlyType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'type t = a[] +type t = readonly a[] +type t = readonly a[][] +type t = (readonly a[])[] +type t = readonly (readonly a[]) [];' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedSatisfiesExpressions [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedSatisfiesExpressions " + + self parse: 'h satisfies `hello` +T satisfies {} & { [t: T]: T } +T satisfies {} & { [t: T]: T } & { [g: G]: G };'. + + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptIndexSignature) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIntersectionType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptSatisfiesExpression) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTemplateLiteralType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 6. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'h satisfies `hello` +T satisfies {} & { [t: T]: T } +T satisfies {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'h satisfies `hello`'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'h satisfies `hello`'. + self assert: (self topEntity isOfType: FASTTypeScriptSatisfiesExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'h'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '`hello`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'hello'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'T satisfies {} & { [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'T satisfies {} & { [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptSatisfiesExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{} & { [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[t: T]: T'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'T satisfies {} & { [t: T]: T } & { [g: G]: G };'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'T satisfies {} & { [t: T]: T } & { [g: G]: G }'. + self assert: (self topEntity isOfType: FASTTypeScriptSatisfiesExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{} & { [t: T]: T } & { [g: G]: G }'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{} & { [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ [t: T]: T }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[t: T]: T'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '{ [g: G]: G }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '[g: G]: G'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexSignature). + + "Testing value of monovalue relation index_type" + self assert: self topEntity index_type isNotNil. + + stack push: self topEntity index_type. + self assert: self topEntity sourceCode equals: 'G'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'g'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': G'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'G'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'h satisfies `hello` +T satisfies {} & { [t: T]: T } +T satisfies {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedSemicolonIsNotAutomaticallyInsertedForMethodDefinitionsWithABody [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedSemicolonIsNotAutomaticallyInsertedForMethodDefinitionsWithABody " + + self parse: 'class Foo { + public bar() + { + } +};'. + + self assert: (fast allWithType: FASTTypeScriptAccessibilityModifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class Foo { + public bar() + { + } +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Foo { + public bar() + { + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + public bar() + { + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public bar() + { + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class Foo { + public bar() + { + } +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedSubscriptExpressionsInIfStatements [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedSubscriptExpressionsInIfStatements " + + self parse: 'if ( foo ) { + set[ 1 ].apply() +};'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIfStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptParenthesizedExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptSubscriptExpression) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'if ( foo ) { + set[ 1 ].apply() +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'if ( foo ) { + set[ 1 ].apply() +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptIfStatement). + + "Testing value of monovalue relation condition" + self assert: self topEntity condition isNotNil. + + stack push: self topEntity condition. + self assert: self topEntity sourceCode equals: '( foo )'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: '{ + set[ 1 ].apply() +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'set[ 1 ].apply()'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'set[ 1 ].apply()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'set[ 1 ].apply'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'set[ 1 ]'. + self assert: (self topEntity isOfType: FASTTypeScriptSubscriptExpression). + + "Testing value of monovalue relation index" + self assert: self topEntity index isNotNil. + + stack push: self topEntity index. + self assert: self topEntity sourceCode equals: '1'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'set'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'apply'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'if ( foo ) { + set[ 1 ].apply() +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedSuper [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedSuper " + + self parse: 'class A extends B { + constructor(x: number, y: number) { + super(x); + } + public toString() { + return super.toString() + " y=" + this.y; + } +};'. + + self assert: (fast allWithType: FASTTypeScriptAccessibilityModifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptBinaryExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassHeritage) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExtendsClause) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMethodDefinition) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptReturnStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptSuper) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptThis) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class A extends B { + constructor(x: number, y: number) { + super(x); + } + public toString() { + return super.toString() + " y=" + this.y; + } +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class A extends B { + constructor(x: number, y: number) { + super(x); + } + public toString() { + return super.toString() + " y=" + this.y; + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + constructor(x: number, y: number) { + super(x); + } + public toString() { + return super.toString() + " y=" + this.y; + } +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'constructor(x: number, y: number) { + super(x); + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + super(x); + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'super(x);'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'super(x)'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(x)'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'super'. + self assert: (self topEntity isOfType: FASTTypeScriptSuper). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'constructor'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(x: number, y: number)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: number'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'y: number'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'y'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'public toString() { + return super.toString() + " y=" + this.y; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptMethodDefinition). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + return super.toString() + " y=" + this.y; + }' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'return super.toString() + " y=" + this.y;'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'super.toString() + " y=" + this.y'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'super.toString() + " y="'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'super.toString()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'super.toString'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'super'. + self assert: (self topEntity isOfType: FASTTypeScriptSuper). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'toString'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '" y="'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: ' y='. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'this.y'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'this'. + self assert: (self topEntity isOfType: FASTTypeScriptThis). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'y'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'public'. + self assert: (self topEntity isOfType: FASTTypeScriptAccessibilityModifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'toString'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + stack pop. + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'extends B'. + self assert: (self topEntity isOfType: FASTTypeScriptClassHeritage). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'extends B'. + self assert: (self topEntity isOfType: FASTTypeScriptExtendsClause). + + "Testing value of multivalued relation value" + self assert: self topEntity value size equals: 2. + + stack push: (stack top value at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top value at: 2). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class A extends B { + constructor(x: number, y: number) { + super(x); + } + public toString() { + return super.toString() + " y=" + this.y; + } +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedSymbolTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedSymbolTypes " + + self parse: 'const symFoo: unique symbol = Symbol("foo"); +const symBar: symbol = Symbol.for("bar");;'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'const symFoo: unique symbol = Symbol("foo"); +const symBar: symbol = Symbol.for("bar");;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'const symFoo: unique symbol = Symbol("foo");'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'symFoo: unique symbol = Symbol("foo")'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'symFoo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': unique symbol'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'unique symbol'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Symbol("foo")'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '("foo")'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '"foo"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'Symbol'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'const symBar: symbol = Symbol.for("bar");'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'symBar: symbol = Symbol.for("bar")'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'symBar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': symbol'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'symbol'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Symbol.for("bar")'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '("bar")'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '"bar"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'Symbol.for'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'Symbol'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'for'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'const symFoo: unique symbol = Symbol("foo"); +const symBar: symbol = Symbol.for("bar");;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTemplateLiteralTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTemplateLiteralTypes " + + self parse: 'type A = `${B}${C}`; +type A = `${B[0]}-foo-${C}-bar-${D}` +type A = `[${''a''}${0}]` +type A = B extends C + ? C extends string + ? `${C}${"" extends C ? "" : "."}${B}` + : never + : never +type Trim = S extends `${infer R}` ? Trim : S; +type A = `${true & (''foo'' | false)}`; +type StringToNumber = S extends `${infer N extends number}` ? N : never;;'. + + self assert: (fast allWithType: FASTTypeScriptConditionalType) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptConstraint) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFalse) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptInferType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIntersectionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLiteralType) size equals: 9. + self assert: (fast allWithType: FASTTypeScriptLookupType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptParenthesizedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTemplateLiteralType) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTemplateType) size equals: 13. + self assert: (fast allWithType: FASTTypeScriptTrue) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 34. + self assert: (fast allWithType: FASTTypeScriptTypeParameter) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeParameters) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptUnionType) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type A = `${B}${C}`; +type A = `${B[0]}-foo-${C}-bar-${D}` +type A = `[${''a''}${0}]` +type A = B extends C + ? C extends string + ? `${C}${"" extends C ? "" : "."}${B}` + : never + : never +type Trim = S extends `${infer R}` ? Trim : S; +type A = `${true & (''foo'' | false)}`; +type StringToNumber = S extends `${infer N extends number}` ? N : never;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 8. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type A = `${B}${C}`;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '`${B}${C}`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '${B}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '${C}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type A = `${B[0]}-foo-${C}-bar-${D}`'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '`${B[0]}-foo-${C}-bar-${D}`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 5. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '${B[0]}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'B[0]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '0'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '0'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '-foo-'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: '${C}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: '-bar-'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: '${D}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type A = `[${''a''}${0}]`'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '`[${''a''}${0}]`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '['. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '${''a''}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '''a'''. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '''a'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: '${0}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '0'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '0'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ']'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'type A = B extends C + ? C extends string + ? `${C}${"" extends C ? "" : "."}${B}` + : never + : never' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'B extends C + ? C extends string + ? `${C}${"" extends C ? "" : "."}${B}` + : never + : never' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'never'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'C extends string + ? `${C}${"" extends C ? "" : "."}${B}` + : never' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'never'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: '`${C}${"" extends C ? "" : "."}${B}`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '${C}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '${"" extends C ? "" : "."}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"" extends C ? "" : "."'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: '"."'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"."'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '.'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: '""'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '""'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + stack pop. + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: '""'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '""'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: '${B}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'type Trim = S extends `${infer R}` ? Trim : S;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Trim'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'S extends string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation constraint" + self assert: self topEntity constraint isNotNil. + + stack push: self topEntity constraint. + self assert: self topEntity sourceCode equals: 'extends string'. + self assert: (self topEntity isOfType: FASTTypeScriptConstraint). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'S'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'S extends `${infer R}` ? Trim : S'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'S'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'Trim'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Trim'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'R'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'S'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '`${infer R}`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '${infer R}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'infer R'. + self assert: (self topEntity isOfType: FASTTypeScriptInferType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'R'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'type A = `${true & (''foo'' | false)}`;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '`${true & (''foo'' | false)}`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '${true & (''foo'' | false)}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'true & (''foo'' | false)'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptTrue). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '(''foo'' | false)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '''foo'' | false'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '''foo'''. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '''foo'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'false'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'false'. + self assert: (self topEntity isOfType: FASTTypeScriptFalse). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: 'type StringToNumber = S extends `${infer N extends number}` ? N : never;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'StringToNumber'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_parameters" + self assert: self topEntity type_parameters isNotNil. + + stack push: self topEntity type_parameters. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameters). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'S extends string'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeParameter). + + "Testing value of monovalue relation constraint" + self assert: self topEntity constraint isNotNil. + + stack push: self topEntity constraint. + self assert: self topEntity sourceCode equals: 'extends string'. + self assert: (self topEntity isOfType: FASTTypeScriptConstraint). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'S'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'S extends `${infer N extends number}` ? N : never'. + self assert: (self topEntity isOfType: FASTTypeScriptConditionalType). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'never'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'N'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'S'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '`${infer N extends number}`'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateLiteralType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '${infer N extends number}'. + self assert: (self topEntity isOfType: FASTTypeScriptTemplateType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'infer N extends number'. + self assert: (self topEntity isOfType: FASTTypeScriptInferType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'N'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 8). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'type A = `${B}${C}`; +type A = `${B[0]}-foo-${C}-bar-${D}` +type A = `[${''a''}${0}]` +type A = B extends C + ? C extends string + ? `${C}${"" extends C ? "" : "."}${B}` + : never + : never +type Trim = S extends `${infer R}` ? Trim : S; +type A = `${true & (''foo'' | false)}`; +type StringToNumber = S extends `${infer N extends number}` ? N : never;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTernaryExpression [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTernaryExpression " + + self parse: 'a ? function(){ return true } : b;;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFunctionExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptReturnStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTernaryExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTrue) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'a ? function(){ return true } : b;;'. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a ? function(){ return true } : b;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'a ? function(){ return true } : b'. + self assert: (self topEntity isOfType: FASTTypeScriptTernaryExpression). + + "Testing value of monovalue relation alternative" + self assert: self topEntity alternative isNotNil. + + stack push: self topEntity alternative. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation condition" + self assert: self topEntity condition isNotNil. + + stack push: self topEntity condition. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation consequence" + self assert: self topEntity consequence isNotNil. + + stack push: self topEntity consequence. + self assert: self topEntity sourceCode equals: 'function(){ return true }'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionExpression). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ return true }'. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'return true'. + self assert: (self topEntity isOfType: FASTTypeScriptReturnStatement). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'true'. + self assert: (self topEntity isOfType: FASTTypeScriptTrue). + self assert: (self topEntity isOfType: FASTTBooleanLiteral). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'a ? function(){ return true } : b;;' +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTheLessThanOperator [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTheLessThanOperator " + + self parse: 'i < foo.length; +i < type.length; +i < string.length;;'. + + self assert: (fast allWithType: FASTTypeScriptBinaryExpression) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 3. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'i < foo.length; +i < type.length; +i < string.length;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'i < foo.length;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'i < foo.length'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'i'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'foo.length'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'length'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'i < type.length;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'i < type.length'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'i'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'type.length'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'type'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'length'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'i < string.length;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'i < string.length'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'i'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'string.length'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'length'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'i < foo.length; +i < type.length; +i < string.length;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedToplevelExports [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedToplevelExports " + + self parse: 'export default abstract class C { } +export default class C { } +export class C { } +export default interface I { } +export interface I { };'. + + self assert: (fast allWithType: FASTTypeScriptAbstractClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptInterfaceBody) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptInterfaceDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 5. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'export default abstract class C { } +export default class C { } +export class C { } +export default interface I { } +export interface I { };' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 6. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export default abstract class C { }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'abstract class C { }'. + self assert: (self topEntity isOfType: FASTTypeScriptAbstractClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'export default class C { }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'class C { }'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'export class C { }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'class C { }'. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'export default interface I { }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'interface I { }'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'I'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'export interface I { }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of monovalue relation declaration" + self assert: self topEntity declaration isNotNil. + + stack push: self topEntity declaration. + self assert: self topEntity sourceCode equals: 'interface I { }'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ }'. + self assert: (self topEntity isOfType: FASTTypeScriptInterfaceBody). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'I'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'export default abstract class C { } +export default class C { } +export class C { } +export default interface I { } +export interface I { };' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTupleTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTupleTypes " + + self parse: 'type t = [] +type t = [A,] +type t = [A|B, C] +type t = readonly [A[], B.C] + +// special optional and rest type syntax +type t = [string?, ...B] + +// labeled elements +type t = [a: A, b?: B, ...c: C[]];'. + + self assert: (fast allWithType: FASTTypeScriptArrayType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptComment) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptNestedTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptOptionalParameter) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptOptionalType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptReadonlyType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptRestPattern) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRestType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTupleType) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 16. + self assert: (fast allWithType: FASTTypeScriptUnionType) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type t = [] +type t = [A,] +type t = [A|B, C] +type t = readonly [A[], B.C] + +// special optional and rest type syntax +type t = [string?, ...B] + +// labeled elements +type t = [a: A, b?: B, ...c: C[]];' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 8. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type t = []'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTupleType). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type t = [A,]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '[A,]'. + self assert: (self topEntity isOfType: FASTTypeScriptTupleType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type t = [A|B, C]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '[A|B, C]'. + self assert: (self topEntity isOfType: FASTTypeScriptTupleType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A|B'. + self assert: (self topEntity isOfType: FASTTypeScriptUnionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'type t = readonly [A[], B.C]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'readonly [A[], B.C]'. + self assert: (self topEntity isOfType: FASTTypeScriptReadonlyType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '[A[], B.C]'. + self assert: (self topEntity isOfType: FASTTypeScriptTupleType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'B.C'. + self assert: (self topEntity isOfType: FASTTypeScriptNestedTypeIdentifier). + + "Testing value of monovalue relation module" + self assert: self topEntity module isNotNil. + + stack push: self topEntity module. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: '// special optional and rest type syntax'. + self assert: (self topEntity isOfType: FASTTypeScriptComment). + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'type t = [string?, ...B]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '[string?, ...B]'. + self assert: (self topEntity isOfType: FASTTypeScriptTupleType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'string?'. + self assert: (self topEntity isOfType: FASTTypeScriptOptionalType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'string'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '...B'. + self assert: (self topEntity isOfType: FASTTypeScriptRestType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: '// labeled elements'. + self assert: (self topEntity isOfType: FASTTypeScriptComment). + stack pop. + + stack push: (stack top childrenNodes at: 8). + self assert: self topEntity sourceCode equals: 'type t = [a: A, b?: B, ...c: C[]];'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 't'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '[a: A, b?: B, ...c: C[]]'. + self assert: (self topEntity isOfType: FASTTypeScriptTupleType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'a: A'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'a'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'b?: B'. + self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'b'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: '...c: C[]'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: '...c'. + self assert: (self topEntity isOfType: FASTTypeScriptRestPattern). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'c'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': C[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'C[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'type t = [] +type t = [A,] +type t = [A|B, C] +type t = readonly [A[], B.C] + +// special optional and rest type syntax +type t = [string?, ...B] + +// labeled elements +type t = [a: A, b?: B, ...c: C[]];' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeAliasDeclarations [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeAliasDeclarations " + + self parse: 'type FileMergeData = { + document: Doc, + headDocument: Doc, + baseDocument: Doc, + conflicts: ConflictInfo[] +} + +type ConflictInfo = { + start?: LineHandle, + middle?: LineHandle, + end?: LineHandle +};'. + + self assert: (fast allWithType: FASTTypeScriptArrayType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 9. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type FileMergeData = { + document: Doc, + headDocument: Doc, + baseDocument: Doc, + conflicts: ConflictInfo[] +} + +type ConflictInfo = { + start?: LineHandle, + middle?: LineHandle, + end?: LineHandle +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type FileMergeData = { + document: Doc, + headDocument: Doc, + baseDocument: Doc, + conflicts: ConflictInfo[] +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'FileMergeData'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{ + document: Doc, + headDocument: Doc, + baseDocument: Doc, + conflicts: ConflictInfo[] +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'document: Doc'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'document'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Doc'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Doc'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'headDocument: Doc'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'headDocument'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Doc'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Doc'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'baseDocument: Doc'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'baseDocument'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Doc'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Doc'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'conflicts: ConflictInfo[]'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'conflicts'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': ConflictInfo[]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'ConflictInfo[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'ConflictInfo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type ConflictInfo = { + start?: LineHandle, + middle?: LineHandle, + end?: LineHandle +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'ConflictInfo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '{ + start?: LineHandle, + middle?: LineHandle, + end?: LineHandle +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'start?: LineHandle'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'start'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': LineHandle'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'LineHandle'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'middle?: LineHandle'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'middle'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': LineHandle'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'LineHandle'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'end?: LineHandle'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'end'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': LineHandle'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'LineHandle'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'type FileMergeData = { + document: Doc, + headDocument: Doc, + baseDocument: Doc, + conflicts: ConflictInfo[] +} + +type ConflictInfo = { + start?: LineHandle, + middle?: LineHandle, + end?: LineHandle +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeAnnotationsInParenthesizedExpressions [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeAnnotationsInParenthesizedExpressions " + + self parse: 'const range = (document: any).selection.createRange();'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptParenthesizedExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne containedEntities first. + self assert: self topEntity sourceCode equals: 'const range = (document: any).selection.createRange();'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'range = (document: any).selection.createRange()'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'range'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: '(document: any).selection.createRange()'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '()'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: '(document: any).selection.createRange'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: '(document: any).selection'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: '(document: any)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedExpression). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'document'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'selection'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'createRange'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier) +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeCasts [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeCasts " + + self parse: 'foo as any as Array +bar satisfies number[] +"foobar" as const;'. + + self assert: (fast allWithType: FASTTypeScriptArrayType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptAsExpression) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptSatisfiesExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'foo as any as Array +bar satisfies number[] +"foobar" as const;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo as any as Array'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'foo as any as Array'. + self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo as any'. + self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foo'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'Array'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Array'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'bar satisfies number[]'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'bar satisfies number[]'. + self assert: (self topEntity isOfType: FASTTypeScriptSatisfiesExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'number[]'. + self assert: (self topEntity isOfType: FASTTypeScriptArrayType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: '"foobar" as const;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '"foobar" as const'. + self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '"foobar"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'foobar'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'foo as any as Array +bar satisfies number[] +"foobar" as const;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeOfAnAssertionFunction [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeOfAnAssertionFunction " + + self parse: 'declare const f: (x: any) => asserts x; +declare const g: (x: any) => asserts x is number;;'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptAsserts) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFunctionType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptLexicalDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptTypePredicate) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'declare const f: (x: any) => asserts x; +declare const g: (x: any) => asserts x is number;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'declare const f: (x: any) => asserts x;'. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'const f: (x: any) => asserts x;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'f: (x: any) => asserts x'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': (x: any) => asserts x'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(x: any) => asserts x'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(x: any)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: any'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'asserts x'. + self assert: (self topEntity isOfType: FASTTypeScriptAsserts). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'declare const g: (x: any) => asserts x is number;'. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'const g: (x: any) => asserts x is number;'. + self assert: (self topEntity isOfType: FASTTypeScriptLexicalDeclaration). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'g: (x: any) => asserts x is number'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'g'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': (x: any) => asserts x is number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(x: any) => asserts x is number'. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionType). + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(x: any)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'x: any'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': any'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'any'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: 'asserts x is number'. + self assert: (self topEntity isOfType: FASTTypeScriptAsserts). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'x is number'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicate). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'x'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'declare const f: (x: any) => asserts x; +declare const g: (x: any) => asserts x is number;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypePredicateAndPredefinedTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypePredicateAndPredefinedTypes " + + self parse: 'function isFish(pet: Fish): pet is Fish { +} + +function isFish(object: Fish): object is Fish { +};'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptFormalParameters) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptFunctionDeclaration) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptRequiredParameter) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStatementBlock) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptTypePredicate) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypePredicateAnnotation) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'function isFish(pet: Fish): pet is Fish { +} + +function isFish(object: Fish): object is Fish { +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function isFish(pet: Fish): pet is Fish { +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'isFish'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(pet: Fish)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'pet: Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'pet'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': pet is Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicateAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'pet is Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicate). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'pet'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'function isFish(object: Fish): object is Fish { +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptFunctionDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptStatementBlock). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'isFish'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation parameters" + self assert: self topEntity parameters isNotNil. + + stack push: self topEntity parameters. + self assert: self topEntity sourceCode equals: '(object: Fish)'. + self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'object: Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). + + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: 'object'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation return_type" + self assert: self topEntity return_type isNotNil. + + stack push: self topEntity return_type. + self assert: self topEntity sourceCode equals: ': object is Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicateAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'object is Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypePredicate). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'object'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: 'Fish'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'function isFish(pet: Fish): pet is Fish { +} + +function isFish(object: Fish): object is Fish { +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeQueryAndIndexTypeQueryTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeQueryAndIndexTypeQueryTypes " + + self parse: 'type T = keyof Person; +type T = keyof Person.P; +type T = keyof Person

; +type T = keyof (Person); + +type T = typeof Person; +type T = typeof Person.P; +type T = typeof import(''person''); + +type T = keyof typeof Person; + +type T = keyof U[number]; +type T = keyof U & V; + +type T = typeof array[number];;'. + + self assert: (fast allWithType: FASTTypeScriptArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptCallExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptImport) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIndexTypeQuery) size equals: 7. + self assert: (fast allWithType: FASTTypeScriptIntersectionType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLookupType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptNestedTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptParenthesizedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 11. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 19. + self assert: (fast allWithType: FASTTypeScriptTypeQuery) size equals: 5. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type T = keyof Person; +type T = keyof Person.P; +type T = keyof Person

; +type T = keyof (Person); + +type T = typeof Person; +type T = typeof Person.P; +type T = typeof import(''person''); + +type T = keyof typeof Person; + +type T = keyof U[number]; +type T = keyof U & V; + +type T = typeof array[number];;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 12. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type T = keyof Person;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'keyof Person'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Person'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type T = keyof Person.P;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'keyof Person.P'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Person.P'. + self assert: (self topEntity isOfType: FASTTypeScriptNestedTypeIdentifier). + + "Testing value of monovalue relation module" + self assert: self topEntity module isNotNil. + + stack push: self topEntity module. + self assert: self topEntity sourceCode equals: 'Person'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'P'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type T = keyof Person

;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'keyof Person

'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Person

'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Person'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '

'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'P'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: 'type T = keyof (Person);'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'keyof (Person)'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(Person)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Person'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 5). + self assert: self topEntity sourceCode equals: 'type T = typeof Person;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'typeof Person'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Person'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 6). + self assert: self topEntity sourceCode equals: 'type T = typeof Person.P;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'typeof Person.P'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Person.P'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'Person'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'P'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 7). + self assert: self topEntity sourceCode equals: 'type T = typeof import(''person'');'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'typeof import(''person'')'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'import(''person'')'. + self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). + + "Testing value of monovalue relation arguments" + self assert: self topEntity arguments isNotNil. + + stack push: self topEntity arguments. + self assert: self topEntity sourceCode equals: '(''person'')'. + self assert: (self topEntity isOfType: FASTTypeScriptArguments). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '''person'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'person'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'import'. + self assert: (self topEntity isOfType: FASTTypeScriptImport). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 8). + self assert: self topEntity sourceCode equals: 'type T = keyof typeof Person;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'keyof typeof Person'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'typeof Person'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'Person'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 9). + self assert: self topEntity sourceCode equals: 'type T = keyof U[number];'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'keyof U[number]'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'U[number]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 10). + self assert: self topEntity sourceCode equals: 'type T = keyof U & V;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'keyof U & V'. + self assert: (self topEntity isOfType: FASTTypeScriptIntersectionType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'keyof U'. + self assert: (self topEntity isOfType: FASTTypeScriptIndexTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'U'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'V'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 11). + self assert: self topEntity sourceCode equals: 'type T = typeof array[number];'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'typeof array[number]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'typeof array'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'array'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 12). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'type T = keyof Person; +type T = keyof Person.P; +type T = keyof Person

; +type T = keyof (Person); + +type T = typeof Person; +type T = typeof Person.P; +type T = typeof import(''person''); + +type T = keyof typeof Person; + +type T = keyof U[number]; +type T = keyof U & V; + +type T = typeof array[number];;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeofExpressions [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeofExpressions " + + self parse: 'typeof class {} === "function"; + +typeof module === "object" && typeof module.exports === "object";'. + + self assert: (fast allWithType: FASTTypeScriptBinaryExpression) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptClass) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptUnaryExpression) size equals: 3. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'typeof class {} === "function"; + +typeof module === "object" && typeof module.exports === "object";' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'typeof class {} === "function";'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'typeof class {} === "function"'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'typeof class {}'. + self assert: (self topEntity isOfType: FASTTypeScriptUnaryExpression). + + "Testing value of monovalue relation argument" + self assert: self topEntity argument isNotNil. + + stack push: self topEntity argument. + self assert: self topEntity sourceCode equals: 'class {}'. + self assert: (self topEntity isOfType: FASTTypeScriptClass). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{}'. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '"function"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'function'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'typeof module === "object" && typeof module.exports === "object";'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'typeof module === "object" && typeof module.exports === "object"'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'typeof module === "object"'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'typeof module'. + self assert: (self topEntity isOfType: FASTTypeScriptUnaryExpression). + + "Testing value of monovalue relation argument" + self assert: self topEntity argument isNotNil. + + stack push: self topEntity argument. + self assert: self topEntity sourceCode equals: 'module'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '"object"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'object'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: 'typeof module.exports === "object"'. + self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). + + "Testing value of monovalue relation left" + self assert: self topEntity left isNotNil. + + stack push: self topEntity left. + self assert: self topEntity sourceCode equals: 'typeof module.exports'. + self assert: (self topEntity isOfType: FASTTypeScriptUnaryExpression). + + "Testing value of monovalue relation argument" + self assert: self topEntity argument isNotNil. + + stack push: self topEntity argument. + self assert: self topEntity sourceCode equals: 'module.exports'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'module'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'exports'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: '"object"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'object'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'typeof class {} === "function"; + +typeof module === "object" && typeof module.exports === "object";' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeofInGenericArguments [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeofInGenericArguments " + + self parse: 'type T = Foo> +type T = Foo> +type T = Foo>;'. + + self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptLiteralType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLookupType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 9. + self assert: (fast allWithType: FASTTypeScriptTypeQuery) size equals: 3. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'type T = Foo> +type T = Foo> +type T = Foo>;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'type T = Foo>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Foo>'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'typeof bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'type T = Foo>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Foo>'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'typeof bar.baz'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bar.baz'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type T = Foo>;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'Foo>'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Foo'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: '>'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptGenericType). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'typeof bar["baz"]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'typeof bar'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'bar'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '"baz"'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"baz"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'baz'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + self assert: self topEntity source equals: 'type T = Foo> +type T = Foo> +type T = Foo>;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeofInstantiationExpressions [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeofInstantiationExpressions " + + self parse: '// This is a special construct, different from both "typeof (f)" and +// "(typeof f)" (which are both invalid) +type T = typeof f;;'. + + self assert: (fast allWithType: FASTTypeScriptComment) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptInstantiationExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAliasDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTypeQuery) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: '// This is a special construct, different from both "typeof (f)" and +// "(typeof f)" (which are both invalid) +type T = typeof f;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '// This is a special construct, different from both "typeof (f)" and'. + self assert: (self topEntity isOfType: FASTTypeScriptComment). + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: '// "(typeof f)" (which are both invalid)'. + self assert: (self topEntity isOfType: FASTTypeScriptComment). + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'type T = typeof f;'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAliasDeclaration). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'typeof f'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptInstantiationExpression). + + "Testing value of monovalue relation function" + self assert: self topEntity function isNotNil. + + stack push: self topEntity function. + self assert: self topEntity sourceCode equals: 'f'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation type_arguments" + self assert: self topEntity type_arguments isNotNil. + + stack push: self topEntity type_arguments. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'T'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: '// This is a special construct, different from both "typeof (f)" and +// "(typeof f)" (which are both invalid) +type T = typeof f;;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeofThis [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeofThis " + + self parse: 'class A { + colors: [ { color: "green", code: "#E5F8F2" } ] + color: (typeof this.colors)[number] = this.colors[0] +};'. + + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptLiteralType) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptLookupType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptMemberExpression) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptNumber) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptObjectType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptParenthesizedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPredefinedType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptPropertySignature) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptPublicFieldDefinition) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptSubscriptExpression) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptThis) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptTupleType) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 4. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeQuery) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'class A { + colors: [ { color: "green", code: "#E5F8F2" } ] + color: (typeof this.colors)[number] = this.colors[0] +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class A { + colors: [ { color: "green", code: "#E5F8F2" } ] + color: (typeof this.colors)[number] = this.colors[0] +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + colors: [ { color: "green", code: "#E5F8F2" } ] + color: (typeof this.colors)[number] = this.colors[0] +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 2. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'colors: [ { color: "green", code: "#E5F8F2" } ]'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'colors'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': [ { color: "green", code: "#E5F8F2" } ]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '[ { color: "green", code: "#E5F8F2" } ]'. + self assert: (self topEntity isOfType: FASTTypeScriptTupleType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '{ color: "green", code: "#E5F8F2" }'. + self assert: (self topEntity isOfType: FASTTypeScriptObjectType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'color: "green"'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'color'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': "green"'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"green"'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"green"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'green'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'code: "#E5F8F2"'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertySignature). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'code'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': "#E5F8F2"'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"#E5F8F2"'. + self assert: (self topEntity isOfType: FASTTypeScriptLiteralType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '"#E5F8F2"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '#E5F8F2'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top genericChildren at: 2). + self assert: self topEntity sourceCode equals: 'color: (typeof this.colors)[number] = this.colors[0]'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'color'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': (typeof this.colors)[number]'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: '(typeof this.colors)[number]'. + self assert: (self topEntity isOfType: FASTTypeScriptLookupType). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: '(typeof this.colors)'. + self assert: (self topEntity isOfType: FASTTypeScriptParenthesizedType). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'typeof this.colors'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'this.colors'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'this'. + self assert: (self topEntity isOfType: FASTTypeScriptThis). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'colors'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'number'. + self assert: (self topEntity isOfType: FASTTypeScriptPredefinedType). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation value" + self assert: self topEntity value isNotNil. + + stack push: self topEntity value. + self assert: self topEntity sourceCode equals: 'this.colors[0]'. + self assert: (self topEntity isOfType: FASTTypeScriptSubscriptExpression). + + "Testing value of monovalue relation index" + self assert: self topEntity index isNotNil. + + stack push: self topEntity index. + self assert: self topEntity sourceCode equals: '0'. + self assert: (self topEntity isOfType: FASTTypeScriptNumber). + self assert: (self topEntity isOfType: FASTTLiteral). + stack pop. + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'this.colors'. + self assert: (self topEntity isOfType: FASTTypeScriptMemberExpression). + + "Testing value of monovalue relation object" + self assert: self topEntity object isNotNil. + + stack push: self topEntity object. + self assert: self topEntity sourceCode equals: 'this'. + self assert: (self topEntity isOfType: FASTTypeScriptThis). + stack pop. + + "Testing value of monovalue relation property" + self assert: self topEntity property isNotNil. + + stack push: self topEntity property. + self assert: self topEntity sourceCode equals: 'colors'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'class A { + colors: [ { color: "green", code: "#E5F8F2" } ] + color: (typeof this.colors)[number] = this.colors[0] +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeofTypes [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeofTypes " + + self parse: 'declare class Linter { + static findConfiguration: typeof findConfiguration; +};'. + + self assert: (fast allWithType: FASTTypeScriptAmbientDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassBody) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptClassDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPropertyIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptPublicFieldDefinition) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeAnnotation) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptTypeQuery) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'declare class Linter { + static findConfiguration: typeof findConfiguration; +};' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 2. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'declare class Linter { + static findConfiguration: typeof findConfiguration; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptAmbientDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'class Linter { + static findConfiguration: typeof findConfiguration; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassDeclaration). + + "Testing value of monovalue relation body" + self assert: self topEntity body isNotNil. + + stack push: self topEntity body. + self assert: self topEntity sourceCode equals: '{ + static findConfiguration: typeof findConfiguration; +}' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptClassBody). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'static findConfiguration: typeof findConfiguration'. + self assert: (self topEntity isOfType: FASTTypeScriptPublicFieldDefinition). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'findConfiguration'. + self assert: (self topEntity isOfType: FASTTypeScriptPropertyIdentifier). + stack pop. + + "Testing value of monovalue relation type" + self assert: self topEntity type isNotNil. + + stack push: self topEntity type. + self assert: self topEntity sourceCode equals: ': typeof findConfiguration'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeAnnotation). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'typeof findConfiguration'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeQuery). + + "Testing value of monovalue relation childrenNode" + self assert: self topEntity childrenNode isNotNil. + + stack push: self topEntity childrenNode. + self assert: self topEntity sourceCode equals: 'findConfiguration'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'Linter'. + self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'declare class Linter { + static findConfiguration: typeof findConfiguration; +};' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedTypeonlyExport [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedTypeonlyExport " + + self parse: 'export type { UserType } +export type { UserType } from "./User.js"; +export type { A, B, C as D } from ''mymodule'';;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExportClause) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptExportSpecifier) size equals: 5. + self assert: (fast allWithType: FASTTypeScriptExportStatement) size equals: 3. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 6. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptString) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptStringFragment) size equals: 2. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'export type { UserType } +export type { UserType } from "./User.js"; +export type { A, B, C as D } from ''mymodule'';;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 4. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'export type { UserType }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{ UserType }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'UserType'. + self assert: (self topEntity isOfType: FASTTypeScriptExportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'UserType'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'export type { UserType } from "./User.js";'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{ UserType }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'UserType'. + self assert: (self topEntity isOfType: FASTTypeScriptExportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'UserType'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '"./User.js"'. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: './User.js'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'export type { A, B, C as D } from ''mymodule'';'. + self assert: (self topEntity isOfType: FASTTypeScriptExportStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: '{ A, B, C as D }'. + self assert: (self topEntity isOfType: FASTTypeScriptExportClause). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptExportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'A'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptExportSpecifier). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'B'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: 'C as D'. + self assert: (self topEntity isOfType: FASTTypeScriptExportSpecifier). + + "Testing value of monovalue relation alias" + self assert: self topEntity alias isNotNil. + + stack push: self topEntity alias. + self assert: self topEntity sourceCode equals: 'D'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'C'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation source" + self assert: self topEntity source isNotNil. + + stack push: self topEntity source. + self assert: self topEntity sourceCode equals: '''mymodule'''. + self assert: (self topEntity isOfType: FASTTypeScriptString). + self assert: (self topEntity isOfType: FASTTLiteral). + self assert: (self topEntity isOfType: FASTTStringLiteral). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'mymodule'. + self assert: (self topEntity isOfType: FASTTypeScriptStringFragment). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 4). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'export type { UserType } +export type { UserType } from "./User.js"; +export type { A, B, C as D } from ''mymodule'';;' withPlatformLineEndings +] + +{ #category : 'tests' } +FASTTypeScriptImporterTest >> testGeneratedVariableNamedModule [ + + "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: + Regenerate executing: self regenerateTest: #testGeneratedVariableNamedModule " + + self parse: 'var module; +module;;'. + + self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 2. + self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclaration) size equals: 1. + self assert: (fast allWithType: FASTTypeScriptVariableDeclarator) size equals: 1. + + stack push: fast rootEntities anyOne. + self assert: self topEntity sourceCode equals: 'var module; +module;;' withPlatformLineEndings. + self assert: (self topEntity isOfType: FASTTypeScriptProgram). + self assert: (self topEntity isOfType: FamixTHasImmediateSource). + self assert: (self topEntity isOfType: FamixTSourceAnchor). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 3. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'var module;'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclaration). + + "Testing value of multivalued relation childrenNodes" + self assert: self topEntity childrenNodes size equals: 1. + + stack push: (stack top childrenNodes at: 1). + self assert: self topEntity sourceCode equals: 'module'. + self assert: (self topEntity isOfType: FASTTypeScriptVariableDeclarator). + + "Testing value of monovalue relation name" + self assert: self topEntity name isNotNil. + + stack push: self topEntity name. + self assert: self topEntity sourceCode equals: 'module'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: 'module;'. + self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). + + "Testing value of multivalued relation genericChildren" + self assert: self topEntity genericChildren size equals: 1. + + stack push: (stack top genericChildren at: 1). + self assert: self topEntity sourceCode equals: 'module'. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 3). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: 'var module; +module;;' withPlatformLineEndings +] + +{ #category : 'as yet unclassified' } +FASTTypeScriptImporterTest >> topEntity [ + ^ stack top +] diff --git a/FAST-TypeScript-Model-Tests/TypeScriptParsingClassesTest.class.st b/FAST-TypeScript-Model-Tests/TypeScriptParsingClassesTest.class.st index d9fa637..562fb75 100644 --- a/FAST-TypeScript-Model-Tests/TypeScriptParsingClassesTest.class.st +++ b/FAST-TypeScript-Model-Tests/TypeScriptParsingClassesTest.class.st @@ -51,7 +51,7 @@ TypeScriptParsingClassesTest >> testParsingArray [ "Checking if FASTTypescriptArray parsed correctly" self assert: - (res allWithType: FASTTypescriptArray) isNotEmpty. + (res allWithType: FASTTypeScriptArray) isNotEmpty. @@ -69,7 +69,7 @@ const miscArray: ?T[];'. "Checking if FASTTypescriptArray_type parsed correctly" self assert: - (res allWithType: FASTTypescriptArray_type) isNotEmpty. + (res allWithType: FASTTypeScriptArrayType) isNotEmpty. ] { #category : 'tests' } @@ -122,12 +122,12 @@ TypeScriptParsingClassesTest >> testParsingAugmentedAssignmentExpression [ "Checking if FASTTypescriptAugmented_assignment_expression parsed correctly" self assert: - (res allWithType: FASTTypescriptAugmented_assignment_expression) isNotEmpty. + (res allWithType: FASTTypeScriptAugmentedAssignmentExpression) isNotEmpty. "Checking properties of FASTTypescriptAugmented_assignment_expression" - node := (res allWithType: FASTTypescriptAugmented_assignment_expression) first. - self assert: node left class equals: FASTTypescriptNon_null_expression. - self assert: node right class equals: FASTTypescriptIdentifier. + node := (res allWithType: FASTTypeScriptAugmentedAssignmentExpression) first. + self assert: node left class equals: FASTTypeScriptNonNullExpression. + self assert: node right class equals: FASTTypeScriptIdentifier. ] { #category : 'tests' } @@ -140,12 +140,12 @@ TypeScriptParsingClassesTest >> testParsingBinaryExpression [ "Checking if FASTTypescriptBinary_expression parsed correctly" self assert: - (res allWithType: FASTTypescriptBinary_expression) isNotEmpty. + (res allWithType: FASTTypeScriptBinaryExpression) isNotEmpty. "Checking properties of FASTTypescriptBinary_expression" - node := (res allWithType: FASTTypescriptBinary_expression) first. - self assert: node right class equals: FASTTypescriptNumber. - self assert: node left class equals: FASTTypescriptIdentifier. + node := (res allWithType: FASTTypeScriptBinaryExpression) first. + self assert: node right class equals: FASTTypeScriptNumber. + self assert: node left class equals: FASTTypeScriptIdentifier. ] { #category : 'tests' } @@ -158,12 +158,12 @@ TypeScriptParsingClassesTest >> testParsingClassDeclaration [ "Checking if FASTTypescriptClass_declaration parsed correctly" self assert: - (res allWithType: FASTTypescriptClass_declaration) isNotEmpty. + (res allWithType: FASTTypeScriptClassDeclaration ) isNotEmpty. "Checking properties of FASTTypescriptClass_declaration" - node := (res allWithType: FASTTypescriptClass_declaration) first. - self assert: node name class equals: FASTTypescriptType_identifier. - self assert: node body class equals: FASTTypescriptClass_body. + node := (res allWithType: FASTTypeScriptClassDeclaration) first. + self assert: node name class equals: FASTTypeScriptTypeIdentifier. + self assert: node body class equals: FASTTypeScriptClassBody. ] { #category : 'tests' } @@ -178,7 +178,7 @@ TypeScriptParsingClassesTest >> testParsingClassHeritage [ "Checking if FASTTypescriptClass_heritage parsed correctly" self assert: - (res allWithType: FASTTypescriptClass_heritage) isNotEmpty. + (res allWithType: FASTTypeScriptClassHeritage) isNotEmpty. ] { #category : 'tests' } @@ -191,14 +191,14 @@ TypeScriptParsingClassesTest >> testParsingConditionalType [ "Checking if FASTTypescriptConditional_type parsed correctly" self assert: - (res allWithType: FASTTypescriptConditional_type) isNotEmpty. + (res allWithType: FASTTypeScriptConditionalType) isNotEmpty. "Checking properties of FASTTypescriptConditional_type" - node := (res allWithType: FASTTypescriptConditional_type) first. - self assert: node right class equals: FASTTypescriptParenthesized_type. - self assert: node left class equals: FASTTypescriptParenthesized_type. - self assert: node consequence class equals: FASTTypescriptType_identifier. - self assert: node alternative class equals: FASTTypescriptType_identifier. + node := (res allWithType: FASTTypeScriptConditionalType) first. + self assert: node right class equals: FASTTypeScriptParenthesizedType. + self assert: node left class equals: FASTTypeScriptParenthesizedType. + self assert: node consequence class equals: FASTTypeScriptTypeIdentifier. + self assert: node alternative class equals: FASTTypeScriptTypeIdentifier. ] { #category : 'tests' } @@ -211,7 +211,7 @@ TypeScriptParsingClassesTest >> testParsingConstraint [ "Checking if FASTTypescriptConstraint parsed correctly" self assert: - (res allWithType: FASTTypescriptConstraint ) isNotEmpty. + (res allWithType: FASTTypeScriptConstraint ) isNotEmpty. ] { #category : 'tests' } @@ -224,12 +224,12 @@ TypeScriptParsingClassesTest >> testParsingConstructorType [ "Checking if FASTTypescriptConstructor_type parsed correctly" self assert: - (res allWithType: FASTTypescriptConstructor_type) isNotEmpty. + (res allWithType: FASTTypeScriptConstructorType) isNotEmpty. "Checking properties of FASTTypescriptConstructor_type" - node := (res allWithType: FASTTypescriptConstructor_type) first. - self assert: node type class equals: FASTTypescriptType_identifier. - self assert: node parameters class equals: FASTTypescriptFormal_parameters. + node := (res allWithType: FASTTypeScriptConstructorType) first. + self assert: node type class equals: FASTTypeScriptTypeIdentifier. + self assert: node parameters class equals: FASTTypeScriptFormalParameters. ] { #category : 'tests' } @@ -261,7 +261,7 @@ declare module Foo { "Checking if FASTTypescriptEmpty_statement parsed correctly" self assert: - (res allWithType: FASTTypescriptEmpty_statement ) isNotEmpty. + (res allWithType: FASTTypeScriptEmptyStatement ) isNotEmpty. ] @@ -275,7 +275,7 @@ TypeScriptParsingClassesTest >> testParsingExportClause [ "Checking if FASTTypescriptExport_clause parsed correctly" self assert: - (res allWithType: FASTTypescriptExport_clause) isNotEmpty. + (res allWithType: FASTTypeScriptExportClause) isNotEmpty. ] { #category : 'tests' } @@ -289,16 +289,16 @@ export type {A as B } from ''mymodule'';'. "Checking if FASTTypescriptExport_specifier parsed correctly" self assert: - (res allWithType: FASTTypescriptExport_specifier) isNotEmpty. + (res allWithType: FASTTypeScriptExportSpecifier) isNotEmpty. "Checking properties of FASTTypescriptExport_specifier" - node := (res allWithType: FASTTypescriptExport_specifier) first. - self assert: node name class equals: FASTTypescriptIdentifier. + node := (res allWithType: FASTTypeScriptExportSpecifier) first. + self assert: node name class equals: FASTTypeScriptIdentifier. "Checking properties of FASTTypescriptExport_specifier" - node2 := (res allWithType: FASTTypescriptExport_specifier) second. - self assert: node2 name class equals: FASTTypescriptIdentifier. - self assert: node2 alias class equals: FASTTypescriptIdentifier. + node2 := (res allWithType: FASTTypeScriptExportSpecifier) second. + self assert: node2 name class equals: FASTTypeScriptIdentifier. + self assert: node2 alias class equals: FASTTypeScriptIdentifier. ] @@ -330,17 +330,17 @@ class A extends B(D) implements C {}'. "Checking if FASTTypescriptExtends_clause parsed correctly" self assert: - (res allWithType: FASTTypescriptExtends_clause) isNotEmpty. + (res allWithType: FASTTypeScriptExtendsClause) isNotEmpty. "Checking properties of FASTTypescriptExtends_clause" - node := (res allWithType: FASTTypescriptExtends_clause) first. - "self assert: node value class equals: FASTTypescriptCall_expression." + node := (res allWithType: FASTTypeScriptExtendsClause) first. + self assert: node value first class equals: FASTTypeScriptCallExpression. - node2 := (res allWithType: FASTTypescriptExtends_clause) second. - "self assert: node2 value class equals: FASTTypescriptCall_expression." + node2 := (res allWithType: FASTTypeScriptExtendsClause) second. + self assert: node2 value first class equals: FASTTypeScriptCallExpression. self - assert: node2 type_arguments class - equals: FASTTypescriptType_arguments + assert: node2 type_arguments first class + equals: FASTTypeScriptTypeArguments ] { #category : 'tests' } @@ -353,11 +353,11 @@ TypeScriptParsingClassesTest >> testParsingExtendsTypeClause [ "Checking if FASTTypescriptExtends_type_clause parsed correctly" self assert: - (res allWithType: FASTTypescriptExtends_type_clause) isNotEmpty. + (res allWithType: FASTTypeScriptExtendsTypeClause) isNotEmpty. "Checking properties of FASTTypescriptExtends_type_clause" - node := (res allWithType: FASTTypescriptExtends_type_clause) first. - self assert: node type class equals: FASTTypescriptType_identifier. + node := (res allWithType: FASTTypeScriptExtendsTypeClause) first. + self assert: node type class equals: FASTTypeScriptTypeIdentifier. ] { #category : 'tests' } @@ -370,10 +370,10 @@ TypeScriptParsingClassesTest >> testParsingFalse [ "Checking if FASTTypescriptFalse parsed correctly" self assert: - (res allWithType: FASTTypescriptFalse) isNotEmpty. + (res allWithType: FASTTypeScriptFalse) isNotEmpty. "Checking properties of FASTTypescriptFalse" - node := (res allWithType: FASTTypescriptFalse) first. + node := (res allWithType: FASTTypeScriptFalse) first. ] { #category : 'tests' } @@ -388,11 +388,11 @@ finally {console.log("Done")}'. "Checking if FASTTypescriptFinally_clause parsed correctly" self assert: - (res allWithType: FASTTypescriptFinally_clause) isNotEmpty. + (res allWithType: FASTTypeScriptFinallyClause) isNotEmpty. "Checking properties of FASTTypescriptFinally_clause" - node := (res allWithType: FASTTypescriptFinally_clause) first. - self assert: node body class equals: FASTTypescriptStatement_block. + node := (res allWithType: FASTTypeScriptFinallyClause) first. + self assert: node body class equals: FASTTypeScriptStatementBlock. ] { #category : 'tests' } @@ -405,13 +405,13 @@ TypeScriptParsingClassesTest >> testParsingForInStatement [ "Checking if FASTTypescriptFor_in_statement parsed correctly" self assert: - (res allWithType: FASTTypescriptFor_in_statement) isNotEmpty. + (res allWithType: FASTTypeScriptForInStatement) isNotEmpty. "Checking properties of FASTTypescriptFor_in_statement" - forNode := (res allWithType: FASTTypescriptFor_in_statement) first. - self assert: forNode right class equals: FASTTypescriptIdentifier. - self assert: forNode left class equals: FASTTypescriptIdentifier. - self assert: forNode body class equals: FASTTypescriptStatement_block. + forNode := (res allWithType: FASTTypeScriptForInStatement) first. + self assert: forNode right class equals: FASTTypeScriptIdentifier. + self assert: forNode left class equals: FASTTypeScriptIdentifier. + self assert: forNode body class equals: FASTTypeScriptStatementBlock. ] { #category : 'tests' } @@ -423,7 +423,7 @@ TypeScriptParsingClassesTest >> testParsingForStatement [ res := parser parse: string. self assert: (res allWithType: FASTTypeScriptForStatement) isNotEmpty. - self assert: (res allWithType: FASTTypeScriptForStatement) asArray first condition sourceCode equals: 'i < 10'. + self assert: (res allWithType: FASTTypeScriptForStatement) asArray first condition first sourceCode equals: 'i < 10'. self assert: (res allWithType: FASTTypeScriptForStatement) asArray first increment sourceCode equals: 'i++'. self assert: (res allWithType: FASTTypeScriptForStatement) asArray first initializer sourceCode equals: 'let i = 0;'. self assert: (res allWithType: FASTTypeScriptForStatement) asArray first body sourceCode equals: '{ console.log(i); }'. @@ -483,12 +483,12 @@ TypeScriptParsingClassesTest >> testParsingFunctionType [ "Checking if FASTTypescriptFunction_type parsed correctly" self assert: - (res allWithType: FASTTypescriptFunction_type) isNotEmpty. + (res allWithType: FASTTypeScriptFunctionType) isNotEmpty. "Checking properties of FASTTypescriptFunction_type" - forNode := (res allWithType: FASTTypescriptFunction_type) first. - self assert: forNode return_type class equals: FASTTypescriptPredefined_type. - self assert: forNode parameters class equals: FASTTypescriptFormal_parameters. + forNode := (res allWithType: FASTTypeScriptFunctionType) first. + self assert: forNode return_type class equals: FASTTypeScriptPredefinedType. + self assert: forNode parameters class equals: FASTTypeScriptFormalParameters. ] @@ -504,12 +504,12 @@ TypeScriptParsingClassesTest >> testParsingGenericType [ "Checking if FASTTypescriptGeneric_type parsed correctly" self assert: - (res allWithType: FASTTypescriptGeneric_type ) isNotEmpty. + (res allWithType: FASTTypeScriptGenericType ) isNotEmpty. "Checking properties of FASTTypescriptGeneric_type" - node := (res allWithType: FASTTypescriptGeneric_type) first. - self assert: node name class equals: FASTTypescriptType_identifier. - self assert: node type_arguments class equals: FASTTypescriptType_arguments. + node := (res allWithType: FASTTypeScriptGenericType) first. + self assert: node name class equals: FASTTypeScriptTypeIdentifier. + self assert: node type_arguments class equals: FASTTypeScriptTypeArguments. @@ -528,12 +528,12 @@ TypeScriptParsingClassesTest >> testParsingIfStatement [ "Checking if FASTTypescriptIf_statement parsed correctly" self assert: - (res allWithType: FASTTypescriptIf_statement) isNotEmpty. + (res allWithType: FASTTypeScriptIfStatement) isNotEmpty. "Checking properties of FASTTypescriptIf_statement" - node := (res allWithType: FASTTypescriptIf_statement) first. - self assert: node condition class equals: FASTTypescriptParenthesized_expression. - self assert: node consequence class equals: FASTTypescriptStatement_block . + node := (res allWithType: FASTTypeScriptIfStatement) first. + self assert: node condition class equals: FASTTypeScriptParenthesizedExpression. + self assert: node consequence class equals: FASTTypeScriptStatementBlock . self assert: node alternative class equals: FASTTypeScriptElseClause . ] @@ -554,7 +554,7 @@ export class A extends B implements C {}'. "Checking if FASTTypescriptType_predicate_annotation parsed correctly" self assert: - (res allWithType: FASTTypescriptImplements_clause) isNotEmpty. + (res allWithType: FASTTypeScriptImplementsClause) isNotEmpty. ] { #category : 'tests' } @@ -568,7 +568,7 @@ TypeScriptParsingClassesTest >> testParsingImportAlias [ "Checking if FASTTypescriptImport_alias parsed correctly" self assert: - (res allWithType: FASTTypescriptImport_alias) isNotEmpty. + (res allWithType: FASTTypeScriptImportAlias) isNotEmpty. ] { #category : 'tests' } @@ -584,7 +584,7 @@ import type, {addUser, type User} from "./User.js";'. "Checking if FASTTypescriptImport_clause parsed correctly" self assert: - (res allWithType: FASTTypescriptImport_clause ) isNotEmpty. + (res allWithType: FASTTypeScriptImportClause ) isNotEmpty. @@ -603,13 +603,13 @@ TypeScriptParsingClassesTest >> testParsingIndexSignature [ "Checking if FASTTypescriptIndex_signature parsed correctly" self assert: - (res allWithType: FASTTypescriptIndex_signature) isNotEmpty. + (res allWithType: FASTTypeScriptIndexSignature) isNotEmpty. "Checking properties of FASTTypescriptFor_in_statement" - forNode := (res allWithType: FASTTypescriptIndex_signature) first. - self assert: forNode index_type class equals: FASTTypescriptType_identifier. - self assert: forNode type class equals: FASTTypescriptType_annotation. - self assert: forNode name class equals: FASTTypescriptIdentifier. + forNode := (res allWithType: FASTTypeScriptIndexSignature) first. + self assert: forNode index_type class equals: FASTTypeScriptTypeIdentifier. + self assert: forNode type class equals: FASTTypeScriptTypeAnnotation. + self assert: forNode name class equals: FASTTypeScriptIdentifier. ] @@ -626,12 +626,12 @@ TypeScriptParsingClassesTest >> testParsingInterfaceDeclaration [ "Checking if FASTTypescriptInterface_declaration parsed correctly" self assert: - (res allWithType: FASTTypescriptInterface_declaration) isNotEmpty. + (res allWithType: FASTTypeScriptInterfaceDeclaration) isNotEmpty. "Checking properties of FASTTypescriptInterface_declaration" - node := (res allWithType: FASTTypescriptInterface_declaration) first. - self assert: node name class equals: FASTTypescriptType_identifier. - self assert: node body class equals: FASTTypescriptInterface_body. + node := (res allWithType: FASTTypeScriptInterfaceDeclaration) first. + self assert: node name class equals: FASTTypeScriptTypeIdentifier. + self assert: node body class equals: FASTTypeScriptInterfaceBody. ] @@ -653,11 +653,11 @@ TypeScriptParsingClassesTest >> testParsingMemberExpression [ "Checking if FASTTypescriptMember_expression parsed correctly" self assert: - (res allWithType: FASTTypescriptMember_expression) isNotEmpty. + (res allWithType: FASTTypeScriptMemberExpression) isNotEmpty. "Checking properties of FASTTypescriptMember_expression" - node := (res allWithType: FASTTypescriptMember_expression) first. - self assert: node property class equals: FASTTypescriptPrivate_property_identifier. + node := (res allWithType: FASTTypeScriptMemberExpression) first. + self assert: node property class equals: FASTTypeScriptPrivatePropertyIdentifier. self assert: node object class equals: FASTTypeScriptThis. ] @@ -672,14 +672,14 @@ TypeScriptParsingClassesTest >> testParsingMethodDefinition [ "Checking if FASTTypescriptMethod_definition parsed correctly" self assert: - (res allWithType: FASTTypescriptMethod_definition) isNotEmpty. + (res allWithType: FASTTypeScriptMethodDefinition) isNotEmpty. "Checking properties of FASTTypescriptMethod_definition" - node := (res allWithType: FASTTypescriptMethod_definition) first. - self assert: node name class equals: FASTTypescriptProperty_identifier. - self assert: node body class equals: FASTTypescriptStatement_block. - self assert: node return_type class equals: FASTTypescriptType_annotation. - self assert: node parameters class equals: FASTTypescriptFormal_parameters. + node := (res allWithType: FASTTypeScriptMethodDefinition) first. + self assert: node name class equals: FASTTypeScriptPropertyIdentifier. + self assert: node body class equals: FASTTypeScriptStatementBlock. + self assert: node return_type class equals: FASTTypeScriptTypeAnnotation. + self assert: node parameters class equals: FASTTypeScriptFormalParameters. ] @@ -693,12 +693,12 @@ TypeScriptParsingClassesTest >> testParsingNestedIdentifier [ "Checking if FASTTypescriptNested_identifier parsed correctly" self assert: - (res allWithType: FASTTypescriptNested_identifier) isNotEmpty. + (res allWithType: FASTTypeScriptNestedIdentifier) isNotEmpty. "Checking properties of FASTTypescriptNested_identifier" - node := (res allWithType: FASTTypescriptNested_identifier) first. - self assert: node property class equals: FASTTypescriptProperty_identifier. - self assert: node object class equals: FASTTypescriptIdentifier. + node := (res allWithType: FASTTypeScriptNestedIdentifier) first. + self assert: node property class equals: FASTTypeScriptPropertyIdentifier. + self assert: node object class equals: FASTTypeScriptIdentifier. ] { #category : 'tests' } @@ -712,15 +712,15 @@ TypeScriptParsingClassesTest >> testParsingNewExpression [ "Checking if FASTTypescriptNew_expression parsed correctly" self assert: - (res allWithType: FASTTypescriptNew_expression) isNotEmpty. + (res allWithType: FASTTypeScriptNewExpression) isNotEmpty. "Checking properties of FASTTypescriptNew_expression" - node := (res allWithType: FASTTypescriptNew_expression) first. - self assert: node constructor class equals: FASTTypescriptIdentifier. + node := (res allWithType: FASTTypeScriptNewExpression) first. + self assert: node constructor class equals: FASTTypeScriptIdentifier. - node2 := (res allWithType: FASTTypescriptNew_expression) second. - self assert: node2 arguments class equals: FASTTypescriptArguments. - self assert: node2 type_arguments class equals: FASTTypescriptType_arguments. + node2 := (res allWithType: FASTTypeScriptNewExpression) second. + self assert: node2 arguments class equals: FASTTypeScriptArguments. + self assert: node2 type_arguments class equals: FASTTypeScriptTypeArguments. ] @@ -735,7 +735,7 @@ TypeScriptParsingClassesTest >> testParsingObject [ "Checking if FASTTypescriptObject parsed correctly" self assert: - (res allWithType: FASTTypescriptObject ) isNotEmpty. + (res allWithType: FASTTypeScriptObject ) isNotEmpty. @@ -754,7 +754,7 @@ T as {} & { [t: T]: T } & { [g: G]: G }'. "Checking if FASTTypescriptObject_type parsed correctly" self assert: - (res allWithType: FASTTypescriptObject_type ) isNotEmpty. + (res allWithType: FASTTypeScriptObjectType ) isNotEmpty. @@ -771,12 +771,12 @@ TypeScriptParsingClassesTest >> testParsingOptionalParameter [ "Checking if FASTTypescriptOptional_parameter parsed correctly" self assert: - (res allWithType: FASTTypescriptOptional_parameter) isNotEmpty. + (res allWithType: FASTTypeScriptOptionalParameter) isNotEmpty. "Checking properties of FASTTypescriptOptional_parameter" - node := (res allWithType: FASTTypescriptOptional_parameter) first. - self assert: node pattern class equals: FASTTypescriptIdentifier. - self assert: node type class equals: FASTTypescriptType_annotation. + node := (res allWithType: FASTTypeScriptOptionalParameter) first. + self assert: node pattern class equals: FASTTypeScriptIdentifier. + self assert: node type class equals: FASTTypeScriptTypeAnnotation. ] { #category : 'tests' } @@ -790,7 +790,7 @@ var x: ({a: any});'. "Checking if FASTTypescriptParenthesized_type parsed correctly" self assert: - (res allWithType: FASTTypescriptParenthesized_type ) isNotEmpty. + (res allWithType: FASTTypeScriptParenthesizedType ) isNotEmpty. @@ -813,7 +813,7 @@ declare class Linter { "Checking if FASTTypescriptProperty_identifier parsed correctly" self assert: - (res allWithType: FASTTypescriptProperty_identifier) isNotEmpty. + (res allWithType: FASTTypeScriptPropertyIdentifier) isNotEmpty. @@ -833,7 +833,7 @@ type t = readonly (readonly a[]) []'. "Checking if FASTTypescriptReadonly_type parsed correctly" self assert: - (res allWithType: FASTTypescriptReadonly_type) isNotEmpty. + (res allWithType: FASTTypeScriptReadonlyType) isNotEmpty. ] { #category : 'tests' } @@ -867,7 +867,7 @@ TypeScriptParsingClassesTest >> testParsingReturnStatement [ "Checking if FASTTypescriptReturn_statement parsed correctly" self assert: - (res allWithType: FASTTypescriptReturn_statement) isNotEmpty. + (res allWithType: FASTTypeScriptReturnStatement) isNotEmpty. ] { #category : 'tests' } @@ -880,7 +880,7 @@ TypeScriptParsingClassesTest >> testParsingStringFragment [ "Checking if FASTTypescriptString_fragment parsed correctly" self assert: - (res allWithType: FASTTypescriptString_fragment) isNotEmpty. + (res allWithType: FASTTypeScriptStringFragment) isNotEmpty. ] @@ -922,10 +922,10 @@ TypeScriptParsingClassesTest >> testParsingTemplateType [ "Checking if FASTTypescriptTemplate_type parsed correctly" self assert: - (res allWithType: FASTTypescriptTemplate_type) isNotEmpty. + (res allWithType: FASTTypeScriptTemplateType) isNotEmpty. "Checking properties of FASTTypescriptTemplate_type" - node := (res allWithType: FASTTypescriptTemplate_type) first. + node := (res allWithType: FASTTypeScriptTemplateType) first. ] { #category : 'tests' } @@ -946,7 +946,7 @@ TypeScriptParsingClassesTest >> testParsingThis [ "Checking if FASTTypescriptThis parsed correctly" self assert: - (res allWithType: FASTTypescriptThis) isNotEmpty. + (res allWithType: FASTTypeScriptThis) isNotEmpty. ] { #category : 'tests' } @@ -963,7 +963,7 @@ TypeScriptParsingClassesTest >> testParsingThrowStatement [ "Checking if FASTTypescriptThrow_statement parsed correctly" self assert: - (res allWithType: FASTTypescriptThrow_statement) isNotEmpty. + (res allWithType: FASTTypeScriptThrowStatement) isNotEmpty. ] { #category : 'tests' } @@ -976,10 +976,10 @@ TypeScriptParsingClassesTest >> testParsingTrue [ "Checking if FASTTypescriptTrue parsed correctly" self assert: - (res allWithType: FASTTypescriptTrue) isNotEmpty. + (res allWithType: FASTTypeScriptTrue) isNotEmpty. "Checking properties of FASTTypescriptTrue" - node := (res allWithType: FASTTypescriptTrue) first. + node := (res allWithType: FASTTypeScriptTrue) first. ] { #category : 'tests' } @@ -995,13 +995,13 @@ TypeScriptParsingClassesTest >> testParsingTryStatement [ "Checking if FASTTypescriptTry_statement parsed correctly" self assert: - (res allWithType: FASTTypescriptTry_statement) isNotEmpty. + (res allWithType: FASTTypeScriptTryStatement) isNotEmpty. "Checking properties of FASTTypescriptTry_statement" - node := (res allWithType: FASTTypescriptTry_statement) first. - self assert: node handler class equals: FASTTypescriptCatch_clause. - self assert: node finalizer class equals: FASTTypescriptFinally_clause. - self assert: node body class equals: FASTTypescriptStatement_block. + node := (res allWithType: FASTTypeScriptTryStatement) first. + self assert: node handler class equals: FASTTypeScriptCatchClause. + self assert: node finalizer class equals: FASTTypeScriptFinallyClause. + self assert: node body class equals: FASTTypeScriptStatementBlock. ] { #category : 'tests' } @@ -1018,7 +1018,7 @@ TypeScriptParsingClassesTest >> testParsingTypeIdentifier [ "Checking if FASTTypescriptType_identifier parsed correctly" self assert: - (res allWithType: FASTTypescriptType_identifier) isNotEmpty. + (res allWithType: FASTTypeScriptTypeIdentifier) isNotEmpty. ] { #category : 'tests' } @@ -1035,7 +1035,7 @@ function isFish(object: Fish): object is Fish { "Checking if FASTTypescriptType_predicate_annotation parsed correctly" self assert: - (res allWithType: FASTTypescriptType_predicate_annotation) isNotEmpty. + (res allWithType: FASTTypeScriptTypePredicateAnnotation) isNotEmpty. ] { #category : 'tests' } @@ -1048,11 +1048,11 @@ TypeScriptParsingClassesTest >> testParsingUnaryExpression [ "Checking if FASTTypescriptUnary_expression parsed correctly" self assert: - (res allWithType: FASTTypescriptUnary_expression) isNotEmpty. + (res allWithType: FASTTypeScriptUnaryExpression) isNotEmpty. "Checking properties of FASTTypescriptUnary_expression" - node := (res allWithType: FASTTypescriptUnary_expression) first. - self assert: node argument class equals: FASTTypescriptClass. + node := (res allWithType: FASTTypeScriptUnaryExpression) first. + self assert: node argument class equals: FASTTypeScriptClass. ] { #category : 'tests' } @@ -1067,7 +1067,7 @@ type Z = | "foo";'. "Checking if FASTTypescriptUnion_type parsed correctly" self assert: - (res allWithType: FASTTypescriptUnion_type) isNotEmpty. + (res allWithType: FASTTypeScriptUnionType) isNotEmpty. ] { #category : 'tests' } @@ -1128,8 +1128,8 @@ TypeScriptParsingClassesTest >> testParsingWithStatement [ "Checking if FASTTypescriptFalse parsed correctly" self assert: - (res allWithType: FASTTypescriptFalse) isNotEmpty. + (res allWithType: FASTTypeScriptFalse) isNotEmpty. "Checking properties of FASTTypescriptFalse" - node := (res allWithType: FASTTypescriptFalse) first. + node := (res allWithType: FASTTypeScriptFalse) first. ] diff --git a/FAST-TypeScript-Model/FASTTEntity.extension.st b/FAST-TypeScript-Model/FASTTEntity.extension.st index 07a4667..dc68ef0 100644 --- a/FAST-TypeScript-Model/FASTTEntity.extension.st +++ b/FAST-TypeScript-Model/FASTTEntity.extension.st @@ -1,9 +1,10 @@ Extension { #name : 'FASTTEntity' } -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTEntity >> argumentsOwner [ "Relation named: #argumentsOwner type: #FASTTypeScriptArguments opposite: #argumentsList" + @@ -12,17 +13,21 @@ FASTTEntity >> argumentsOwner [ ^ self attributeAt: #argumentsOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTEntity >> argumentsOwner: anObject [ + + + self attributeAt: #argumentsOwner put: (FMMultivalueLink on: self update: #argumentsList from: self argumentsOwner to: anObject). ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTEntity >> arrowFunctionBodyOwner [ "Relation named: #arrowFunctionBodyOwner type: #FASTTypeScriptArrowFunction opposite: #body" + @@ -32,10 +37,13 @@ FASTTEntity >> arrowFunctionBodyOwner [ ^ self attributeAt: #arrowFunctionBodyOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTEntity >> arrowFunctionBodyOwner: anObject [ + + + (self attributeAt: #arrowFunctionBodyOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self arrowFunctionBodyOwner. @@ -46,10 +54,11 @@ FASTTEntity >> arrowFunctionBodyOwner: anObject [ anObject body: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTEntity >> parentFormalParameters [ "Relation named: #parentFormalParameters type: #FASTTypeScriptFormalParameters opposite: #parameters" + @@ -58,9 +67,12 @@ FASTTEntity >> parentFormalParameters [ ^ self attributeAt: #parentFormalParameters ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTEntity >> parentFormalParameters: anObject [ + + + self attributeAt: #parentFormalParameters put: (FMMultivalueLink on: self update: #parameters from: self parentFormalParameters to: anObject). ] diff --git a/FAST-TypeScript-Model/FASTTExpression.extension.st b/FAST-TypeScript-Model/FASTTExpression.extension.st index 8a1072c..9e0fad4 100644 --- a/FAST-TypeScript-Model/FASTTExpression.extension.st +++ b/FAST-TypeScript-Model/FASTTExpression.extension.st @@ -1,9 +1,10 @@ Extension { #name : 'FASTTExpression' } -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> assignmentExpressionLeftOwner [ "Relation named: #assignmentExpressionLeftOwner type: #FASTTypeScriptAssignmentExpression opposite: #left" + @@ -13,10 +14,13 @@ FASTTExpression >> assignmentExpressionLeftOwner [ ^ self attributeAt: #assignmentExpressionLeftOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> assignmentExpressionLeftOwner: anObject [ + + + (self attributeAt: #assignmentExpressionLeftOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self assignmentExpressionLeftOwner. @@ -27,10 +31,11 @@ FASTTExpression >> assignmentExpressionLeftOwner: anObject [ anObject left: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> assignmentExpressionRightOwner [ "Relation named: #assignmentExpressionRightOwner type: #FASTTypeScriptAssignmentExpression opposite: #right" + @@ -40,10 +45,13 @@ FASTTExpression >> assignmentExpressionRightOwner [ ^ self attributeAt: #assignmentExpressionRightOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> assignmentExpressionRightOwner: anObject [ + + + (self attributeAt: #assignmentExpressionRightOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self assignmentExpressionRightOwner. @@ -54,10 +62,41 @@ FASTTExpression >> assignmentExpressionRightOwner: anObject [ anObject right: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> assignmentPatternRightOwner [ + "Relation named: #assignmentPatternRightOwner type: #FASTTypeScriptAssignmentPattern opposite: #right" + + + + + + + + ^ self attributeAt: #assignmentPatternRightOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> assignmentPatternRightOwner: anObject [ + + + + + + (self attributeAt: #assignmentPatternRightOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self assignmentPatternRightOwner. + self attributeAt: #assignmentPatternRightOwner put: anObject. + otherSide right: nil ] + ifNotNil: [ + self attributeAt: #assignmentPatternRightOwner put: anObject. + anObject right: self ] +] + +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> augmentedAssignmentExpressionLeftOwner [ "Relation named: #augmentedAssignmentExpressionLeftOwner type: #FASTTypeScriptAugmentedAssignmentExpression opposite: #left" + @@ -67,10 +106,13 @@ FASTTExpression >> augmentedAssignmentExpressionLeftOwner [ ^ self attributeAt: #augmentedAssignmentExpressionLeftOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> augmentedAssignmentExpressionLeftOwner: anObject [ + + + (self attributeAt: #augmentedAssignmentExpressionLeftOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self augmentedAssignmentExpressionLeftOwner. @@ -81,10 +123,11 @@ FASTTExpression >> augmentedAssignmentExpressionLeftOwner: anObject [ anObject left: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> augmentedAssignmentExpressionRightOwner [ "Relation named: #augmentedAssignmentExpressionRightOwner type: #FASTTypeScriptAugmentedAssignmentExpression opposite: #right" + @@ -94,10 +137,13 @@ FASTTExpression >> augmentedAssignmentExpressionRightOwner [ ^ self attributeAt: #augmentedAssignmentExpressionRightOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> augmentedAssignmentExpressionRightOwner: anObject [ + + + (self attributeAt: #augmentedAssignmentExpressionRightOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self augmentedAssignmentExpressionRightOwner. @@ -108,10 +154,11 @@ FASTTExpression >> augmentedAssignmentExpressionRightOwner: anObject [ anObject right: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> binaryExpressionLeftOwner [ "Relation named: #binaryExpressionLeftOwner type: #FASTTypeScriptBinaryExpression opposite: #left" + @@ -121,10 +168,13 @@ FASTTExpression >> binaryExpressionLeftOwner [ ^ self attributeAt: #binaryExpressionLeftOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> binaryExpressionLeftOwner: anObject [ + + + (self attributeAt: #binaryExpressionLeftOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self binaryExpressionLeftOwner. @@ -135,10 +185,11 @@ FASTTExpression >> binaryExpressionLeftOwner: anObject [ anObject left: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> binaryExpressionRightOwner [ "Relation named: #binaryExpressionRightOwner type: #FASTTypeScriptBinaryExpression opposite: #right" + @@ -148,10 +199,13 @@ FASTTExpression >> binaryExpressionRightOwner [ ^ self attributeAt: #binaryExpressionRightOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> binaryExpressionRightOwner: anObject [ + + + (self attributeAt: #binaryExpressionRightOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self binaryExpressionRightOwner. @@ -162,10 +216,11 @@ FASTTExpression >> binaryExpressionRightOwner: anObject [ anObject right: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> conditionalTypeAlternativeOwner [ "Relation named: #conditionalTypeAlternativeOwner type: #FASTTypeScriptConditionalType opposite: #alternative" + @@ -175,10 +230,13 @@ FASTTExpression >> conditionalTypeAlternativeOwner [ ^ self attributeAt: #conditionalTypeAlternativeOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> conditionalTypeAlternativeOwner: anObject [ + + + (self attributeAt: #conditionalTypeAlternativeOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self conditionalTypeAlternativeOwner. @@ -189,10 +247,11 @@ FASTTExpression >> conditionalTypeAlternativeOwner: anObject [ anObject alternative: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> conditionalTypeConsequenceOwner [ "Relation named: #conditionalTypeConsequenceOwner type: #FASTTypeScriptConditionalType opposite: #consequence" + @@ -202,10 +261,13 @@ FASTTExpression >> conditionalTypeConsequenceOwner [ ^ self attributeAt: #conditionalTypeConsequenceOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> conditionalTypeConsequenceOwner: anObject [ + + + (self attributeAt: #conditionalTypeConsequenceOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self conditionalTypeConsequenceOwner. @@ -216,10 +278,11 @@ FASTTExpression >> conditionalTypeConsequenceOwner: anObject [ anObject consequence: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> conditionalTypeLeftOwner [ "Relation named: #conditionalTypeLeftOwner type: #FASTTypeScriptConditionalType opposite: #left" + @@ -229,10 +292,13 @@ FASTTExpression >> conditionalTypeLeftOwner [ ^ self attributeAt: #conditionalTypeLeftOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> conditionalTypeLeftOwner: anObject [ + + + (self attributeAt: #conditionalTypeLeftOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self conditionalTypeLeftOwner. @@ -243,10 +309,11 @@ FASTTExpression >> conditionalTypeLeftOwner: anObject [ anObject left: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> conditionalTypeRightOwner [ "Relation named: #conditionalTypeRightOwner type: #FASTTypeScriptConditionalType opposite: #right" + @@ -256,10 +323,13 @@ FASTTExpression >> conditionalTypeRightOwner [ ^ self attributeAt: #conditionalTypeRightOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> conditionalTypeRightOwner: anObject [ + + + (self attributeAt: #conditionalTypeRightOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self conditionalTypeRightOwner. @@ -270,64 +340,247 @@ FASTTExpression >> conditionalTypeRightOwner: anObject [ anObject right: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } -FASTTExpression >> forStatementLeftOwner [ - "Relation named: #forStatementLeftOwner type: #FASTTypeScriptForInStatement opposite: #left" +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> constructorTypeTypeOwner [ + "Relation named: #constructorTypeTypeOwner type: #FASTTypeScriptConstructorType opposite: #type" + + + + + + + + + ^ self attributeAt: #constructorTypeTypeOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> constructorTypeTypeOwner: anObject [ + + + + + + (self attributeAt: #constructorTypeTypeOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self constructorTypeTypeOwner. + self attributeAt: #constructorTypeTypeOwner put: anObject. + otherSide type: nil ] + ifNotNil: [ + self attributeAt: #constructorTypeTypeOwner put: anObject. + anObject type: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> enumAssignmentValueOwner [ + "Relation named: #enumAssignmentValueOwner type: #FASTTypeScriptEnumAssignment opposite: #value" + + + + + + + + ^ self attributeAt: #enumAssignmentValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> enumAssignmentValueOwner: anObject [ + + + + + + (self attributeAt: #enumAssignmentValueOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self enumAssignmentValueOwner. + self attributeAt: #enumAssignmentValueOwner put: anObject. + otherSide value: nil ] + ifNotNil: [ + self attributeAt: #enumAssignmentValueOwner put: anObject. + anObject value: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> exportStatementValueOwner [ + "Relation named: #exportStatementValueOwner type: #FASTTypeScriptExportStatement opposite: #value" + + + + + + + + ^ self attributeAt: #exportStatementValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> exportStatementValueOwner: anObject [ + + + + + + (self attributeAt: #exportStatementValueOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self exportStatementValueOwner. + self attributeAt: #exportStatementValueOwner put: anObject. + otherSide value: nil ] + ifNotNil: [ + self attributeAt: #exportStatementValueOwner put: anObject. + anObject value: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> extendsClauseValueOwner [ + "Relation named: #extendsClauseValueOwner type: #FASTTypeScriptExtendsClause opposite: #value" + + + + + + + ^ self attributeAt: #extendsClauseValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> extendsClauseValueOwner: anObject [ + + + + + + self attributeAt: #extendsClauseValueOwner put: (FMMultivalueLink on: self update: #value from: self extendsClauseValueOwner to: anObject). +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> extendsTypeClauseTypeOwner [ + "Relation named: #extendsTypeClauseTypeOwner type: #FASTTypeScriptExtendsTypeClause opposite: #type" + + + + + + + + + ^ self attributeAt: #extendsTypeClauseTypeOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> extendsTypeClauseTypeOwner: anObject [ + + + + + + (self attributeAt: #extendsTypeClauseTypeOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self extendsTypeClauseTypeOwner. + self attributeAt: #extendsTypeClauseTypeOwner put: anObject. + otherSide type: nil ] + ifNotNil: [ + self attributeAt: #extendsTypeClauseTypeOwner put: anObject. + anObject type: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> forInStatementLeftOwner [ + "Relation named: #forInStatementLeftOwner type: #FASTTypeScriptForInStatement opposite: #left" + - + - ^ self attributeAt: #forStatementLeftOwner ifAbsent: [ nil ] + ^ self attributeAt: #forInStatementLeftOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } -FASTTExpression >> forStatementLeftOwner: anObject [ +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> forInStatementLeftOwner: anObject [ + - (self attributeAt: #forStatementLeftOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + + + (self attributeAt: #forInStatementLeftOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | - otherSide := self forStatementLeftOwner. - self attributeAt: #forStatementLeftOwner put: anObject. + otherSide := self forInStatementLeftOwner. + self attributeAt: #forInStatementLeftOwner put: anObject. otherSide left: nil ] ifNotNil: [ - self attributeAt: #forStatementLeftOwner put: anObject. + self attributeAt: #forInStatementLeftOwner put: anObject. anObject left: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } -FASTTExpression >> forStatementRightOwner [ - "Relation named: #forStatementRightOwner type: #FASTTypeScriptForInStatement opposite: #right" +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> forInStatementRightOwner [ + "Relation named: #forInStatementRightOwner type: #FASTTypeScriptForInStatement opposite: #right" + - + - ^ self attributeAt: #forStatementRightOwner ifAbsent: [ nil ] + ^ self attributeAt: #forInStatementRightOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } -FASTTExpression >> forStatementRightOwner: anObject [ +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> forInStatementRightOwner: anObject [ + - (self attributeAt: #forStatementRightOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + + + (self attributeAt: #forInStatementRightOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | - otherSide := self forStatementRightOwner. - self attributeAt: #forStatementRightOwner put: anObject. + otherSide := self forInStatementRightOwner. + self attributeAt: #forInStatementRightOwner put: anObject. otherSide right: nil ] ifNotNil: [ - self attributeAt: #forStatementRightOwner put: anObject. + self attributeAt: #forInStatementRightOwner put: anObject. anObject right: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> forInStatementValueOwner [ + "Relation named: #forInStatementValueOwner type: #FASTTypeScriptForInStatement opposite: #value" + + + + + + + + ^ self attributeAt: #forInStatementValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> forInStatementValueOwner: anObject [ + + + + + + (self attributeAt: #forInStatementValueOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self forInStatementValueOwner. + self attributeAt: #forInStatementValueOwner put: anObject. + otherSide value: nil ] + ifNotNil: [ + self attributeAt: #forInStatementValueOwner put: anObject. + anObject value: self ] +] + +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> functionTypeReturnTypeOwner [ "Relation named: #functionTypeReturnTypeOwner type: #FASTTypeScriptFunctionType opposite: #return_type" + @@ -337,10 +590,13 @@ FASTTExpression >> functionTypeReturnTypeOwner [ ^ self attributeAt: #functionTypeReturnTypeOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> functionTypeReturnTypeOwner: anObject [ + + + (self attributeAt: #functionTypeReturnTypeOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self functionTypeReturnTypeOwner. @@ -351,10 +607,164 @@ FASTTExpression >> functionTypeReturnTypeOwner: anObject [ anObject return_type: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> genericTypeNameOwner [ + "Relation named: #genericTypeNameOwner type: #FASTTypeScriptGenericType opposite: #name" + + + + + + + + + ^ self attributeAt: #genericTypeNameOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> genericTypeNameOwner: anObject [ + + + + + + (self attributeAt: #genericTypeNameOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self genericTypeNameOwner. + self attributeAt: #genericTypeNameOwner put: anObject. + otherSide name: nil ] + ifNotNil: [ + self attributeAt: #genericTypeNameOwner put: anObject. + anObject name: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> indexSignatureIndexTypeOwner [ + "Relation named: #indexSignatureIndexTypeOwner type: #FASTTypeScriptIndexSignature opposite: #index_type" + + + + + + + + + ^ self attributeAt: #indexSignatureIndexTypeOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> indexSignatureIndexTypeOwner: anObject [ + + + + + + (self attributeAt: #indexSignatureIndexTypeOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self indexSignatureIndexTypeOwner. + self attributeAt: #indexSignatureIndexTypeOwner put: anObject. + otherSide index_type: nil ] + ifNotNil: [ + self attributeAt: #indexSignatureIndexTypeOwner put: anObject. + anObject index_type: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> indexSignatureTypeOwner [ + "Relation named: #indexSignatureTypeOwner type: #FASTTypeScriptIndexSignature opposite: #type" + + + + + + + + + ^ self attributeAt: #indexSignatureTypeOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> indexSignatureTypeOwner: anObject [ + + + + + + (self attributeAt: #indexSignatureTypeOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self indexSignatureTypeOwner. + self attributeAt: #indexSignatureTypeOwner put: anObject. + otherSide type: nil ] + ifNotNil: [ + self attributeAt: #indexSignatureTypeOwner put: anObject. + anObject type: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> mappedTypeClauseAliasOwner [ + "Relation named: #mappedTypeClauseAliasOwner type: #FASTTypeScriptMappedTypeClause opposite: #alias" + + + + + + + + ^ self attributeAt: #mappedTypeClauseAliasOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> mappedTypeClauseAliasOwner: anObject [ + + + + + + (self attributeAt: #mappedTypeClauseAliasOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self mappedTypeClauseAliasOwner. + self attributeAt: #mappedTypeClauseAliasOwner put: anObject. + otherSide alias: nil ] + ifNotNil: [ + self attributeAt: #mappedTypeClauseAliasOwner put: anObject. + anObject alias: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> mappedTypeClauseTypeOwner [ + "Relation named: #mappedTypeClauseTypeOwner type: #FASTTypeScriptMappedTypeClause opposite: #type" + + + + + + + + ^ self attributeAt: #mappedTypeClauseTypeOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> mappedTypeClauseTypeOwner: anObject [ + + + + + + (self attributeAt: #mappedTypeClauseTypeOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self mappedTypeClauseTypeOwner. + self attributeAt: #mappedTypeClauseTypeOwner put: anObject. + otherSide type: nil ] + ifNotNil: [ + self attributeAt: #mappedTypeClauseTypeOwner put: anObject. + anObject type: self ] +] + +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> memberExpressionObjectOwner [ "Relation named: #memberExpressionObjectOwner type: #FASTTypeScriptMemberExpression opposite: #object" + @@ -364,10 +774,13 @@ FASTTExpression >> memberExpressionObjectOwner [ ^ self attributeAt: #memberExpressionObjectOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> memberExpressionObjectOwner: anObject [ + + + (self attributeAt: #memberExpressionObjectOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self memberExpressionObjectOwner. @@ -378,10 +791,11 @@ FASTTExpression >> memberExpressionObjectOwner: anObject [ anObject object: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> memberExpressionPropertyOwner [ "Relation named: #memberExpressionPropertyOwner type: #FASTTypeScriptMemberExpression opposite: #property" + @@ -391,10 +805,13 @@ FASTTExpression >> memberExpressionPropertyOwner [ ^ self attributeAt: #memberExpressionPropertyOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> memberExpressionPropertyOwner: anObject [ + + + (self attributeAt: #memberExpressionPropertyOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self memberExpressionPropertyOwner. @@ -405,10 +822,11 @@ FASTTExpression >> memberExpressionPropertyOwner: anObject [ anObject property: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> newExpressionConstructorOwner [ "Relation named: #newExpressionConstructorOwner type: #FASTTypeScriptNewExpression opposite: #constructor" + @@ -418,10 +836,13 @@ FASTTExpression >> newExpressionConstructorOwner [ ^ self attributeAt: #newExpressionConstructorOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> newExpressionConstructorOwner: anObject [ + + + (self attributeAt: #newExpressionConstructorOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self newExpressionConstructorOwner. @@ -432,10 +853,222 @@ FASTTExpression >> newExpressionConstructorOwner: anObject [ anObject constructor: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> objectAssignmentPatternRightOwner [ + "Relation named: #objectAssignmentPatternRightOwner type: #FASTTypeScriptObjectAssignmentPattern opposite: #right" + + + + + + + + ^ self attributeAt: #objectAssignmentPatternRightOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> objectAssignmentPatternRightOwner: anObject [ + + + + + + (self attributeAt: #objectAssignmentPatternRightOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self objectAssignmentPatternRightOwner. + self attributeAt: #objectAssignmentPatternRightOwner put: anObject. + otherSide right: nil ] + ifNotNil: [ + self attributeAt: #objectAssignmentPatternRightOwner put: anObject. + anObject right: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> optionalParameterPatternOwner [ + "Relation named: #optionalParameterPatternOwner type: #FASTTypeScriptOptionalParameter opposite: #pattern" + + + + + + + + + ^ self attributeAt: #optionalParameterPatternOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> optionalParameterPatternOwner: anObject [ + + + + + + (self attributeAt: #optionalParameterPatternOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self optionalParameterPatternOwner. + self attributeAt: #optionalParameterPatternOwner put: anObject. + otherSide pattern: nil ] + ifNotNil: [ + self attributeAt: #optionalParameterPatternOwner put: anObject. + anObject pattern: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> optionalParameterValueOwner [ + "Relation named: #optionalParameterValueOwner type: #FASTTypeScriptOptionalParameter opposite: #value" + + + + + + + + ^ self attributeAt: #optionalParameterValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> optionalParameterValueOwner: anObject [ + + + + + + (self attributeAt: #optionalParameterValueOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self optionalParameterValueOwner. + self attributeAt: #optionalParameterValueOwner put: anObject. + otherSide value: nil ] + ifNotNil: [ + self attributeAt: #optionalParameterValueOwner put: anObject. + anObject value: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> pairValueOwner [ + "Relation named: #pairValueOwner type: #FASTTypeScriptPair opposite: #value" + + + + + + + + ^ self attributeAt: #pairValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> pairValueOwner: anObject [ + + + + + + (self attributeAt: #pairValueOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self pairValueOwner. + self attributeAt: #pairValueOwner put: anObject. + otherSide value: nil ] + ifNotNil: [ + self attributeAt: #pairValueOwner put: anObject. + anObject value: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> publicFieldDefinitionValueOwner [ + "Relation named: #publicFieldDefinitionValueOwner type: #FASTTypeScriptPublicFieldDefinition opposite: #value" + + + + + + + + ^ self attributeAt: #publicFieldDefinitionValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> publicFieldDefinitionValueOwner: anObject [ + + + + + + (self attributeAt: #publicFieldDefinitionValueOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self publicFieldDefinitionValueOwner. + self attributeAt: #publicFieldDefinitionValueOwner put: anObject. + otherSide value: nil ] + ifNotNil: [ + self attributeAt: #publicFieldDefinitionValueOwner put: anObject. + anObject value: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> requiredParameterPatternOwner [ + "Relation named: #requiredParameterPatternOwner type: #FASTTypeScriptRequiredParameter opposite: #pattern" + + + + + + + + ^ self attributeAt: #requiredParameterPatternOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> requiredParameterPatternOwner: anObject [ + + + + + + (self attributeAt: #requiredParameterPatternOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self requiredParameterPatternOwner. + self attributeAt: #requiredParameterPatternOwner put: anObject. + otherSide pattern: nil ] + ifNotNil: [ + self attributeAt: #requiredParameterPatternOwner put: anObject. + anObject pattern: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> requiredParameterValueOwner [ + "Relation named: #requiredParameterValueOwner type: #FASTTypeScriptRequiredParameter opposite: #value" + + + + + + + + ^ self attributeAt: #requiredParameterValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> requiredParameterValueOwner: anObject [ + + + + + + (self attributeAt: #requiredParameterValueOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self requiredParameterValueOwner. + self attributeAt: #requiredParameterValueOwner put: anObject. + otherSide value: nil ] + ifNotNil: [ + self attributeAt: #requiredParameterValueOwner put: anObject. + anObject value: self ] +] + +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> subscriptExpressionIndexOwner [ "Relation named: #subscriptExpressionIndexOwner type: #FASTTypeScriptSubscriptExpression opposite: #index" + @@ -445,10 +1078,13 @@ FASTTExpression >> subscriptExpressionIndexOwner [ ^ self attributeAt: #subscriptExpressionIndexOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> subscriptExpressionIndexOwner: anObject [ + + + (self attributeAt: #subscriptExpressionIndexOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self subscriptExpressionIndexOwner. @@ -459,10 +1095,11 @@ FASTTExpression >> subscriptExpressionIndexOwner: anObject [ anObject index: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> subscriptExpressionObjectOwner [ "Relation named: #subscriptExpressionObjectOwner type: #FASTTypeScriptSubscriptExpression opposite: #object" + @@ -472,10 +1109,13 @@ FASTTExpression >> subscriptExpressionObjectOwner [ ^ self attributeAt: #subscriptExpressionObjectOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> subscriptExpressionObjectOwner: anObject [ + + + (self attributeAt: #subscriptExpressionObjectOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self subscriptExpressionObjectOwner. @@ -486,10 +1126,161 @@ FASTTExpression >> subscriptExpressionObjectOwner: anObject [ anObject object: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> ternaryExpressionAlternativeOwner [ + "Relation named: #ternaryExpressionAlternativeOwner type: #FASTTypeScriptTernaryExpression opposite: #alternative" + + + + + + + + ^ self attributeAt: #ternaryExpressionAlternativeOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> ternaryExpressionAlternativeOwner: anObject [ + + + + + + (self attributeAt: #ternaryExpressionAlternativeOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self ternaryExpressionAlternativeOwner. + self attributeAt: #ternaryExpressionAlternativeOwner put: anObject. + otherSide alternative: nil ] + ifNotNil: [ + self attributeAt: #ternaryExpressionAlternativeOwner put: anObject. + anObject alternative: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> ternaryExpressionConditionOwner [ + "Relation named: #ternaryExpressionConditionOwner type: #FASTTypeScriptTernaryExpression opposite: #condition" + + + + + + + + ^ self attributeAt: #ternaryExpressionConditionOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> ternaryExpressionConditionOwner: anObject [ + + + + + + (self attributeAt: #ternaryExpressionConditionOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self ternaryExpressionConditionOwner. + self attributeAt: #ternaryExpressionConditionOwner put: anObject. + otherSide condition: nil ] + ifNotNil: [ + self attributeAt: #ternaryExpressionConditionOwner put: anObject. + anObject condition: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> ternaryExpressionConsequenceOwner [ + "Relation named: #ternaryExpressionConsequenceOwner type: #FASTTypeScriptTernaryExpression opposite: #consequence" + + + + + + + + ^ self attributeAt: #ternaryExpressionConsequenceOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> ternaryExpressionConsequenceOwner: anObject [ + + + + + + (self attributeAt: #ternaryExpressionConsequenceOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self ternaryExpressionConsequenceOwner. + self attributeAt: #ternaryExpressionConsequenceOwner put: anObject. + otherSide consequence: nil ] + ifNotNil: [ + self attributeAt: #ternaryExpressionConsequenceOwner put: anObject. + anObject consequence: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> typeAliasDeclarationValueOwner [ + "Relation named: #typeAliasDeclarationValueOwner type: #FASTTypeScriptTypeAliasDeclaration opposite: #value" + + + + + + + + ^ self attributeAt: #typeAliasDeclarationValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> typeAliasDeclarationValueOwner: anObject [ + + + + + + (self attributeAt: #typeAliasDeclarationValueOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self typeAliasDeclarationValueOwner. + self attributeAt: #typeAliasDeclarationValueOwner put: anObject. + otherSide value: nil ] + ifNotNil: [ + self attributeAt: #typeAliasDeclarationValueOwner put: anObject. + anObject value: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> typePredicateTypeOwner [ + "Relation named: #typePredicateTypeOwner type: #FASTTypeScriptTypePredicate opposite: #type" + + + + + + + + ^ self attributeAt: #typePredicateTypeOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> typePredicateTypeOwner: anObject [ + + + + + + (self attributeAt: #typePredicateTypeOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self typePredicateTypeOwner. + self attributeAt: #typePredicateTypeOwner put: anObject. + otherSide type: nil ] + ifNotNil: [ + self attributeAt: #typePredicateTypeOwner put: anObject. + anObject type: self ] +] + +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> unaryExpressionArgumentOwner [ "Relation named: #unaryExpressionArgumentOwner type: #FASTTypeScriptUnaryExpression opposite: #argument" + @@ -499,10 +1290,13 @@ FASTTExpression >> unaryExpressionArgumentOwner [ ^ self attributeAt: #unaryExpressionArgumentOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } +{ #category : '*FAST-TypeScript-Model' } FASTTExpression >> unaryExpressionArgumentOwner: anObject [ + + + (self attributeAt: #unaryExpressionArgumentOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self unaryExpressionArgumentOwner. @@ -512,3 +1306,63 @@ FASTTExpression >> unaryExpressionArgumentOwner: anObject [ self attributeAt: #unaryExpressionArgumentOwner put: anObject. anObject argument: self ] ] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> updateExpressionArgumentOwner [ + "Relation named: #updateExpressionArgumentOwner type: #FASTTypeScriptUpdateExpression opposite: #argument" + + + + + + + + ^ self attributeAt: #updateExpressionArgumentOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> updateExpressionArgumentOwner: anObject [ + + + + + + (self attributeAt: #updateExpressionArgumentOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self updateExpressionArgumentOwner. + self attributeAt: #updateExpressionArgumentOwner put: anObject. + otherSide argument: nil ] + ifNotNil: [ + self attributeAt: #updateExpressionArgumentOwner put: anObject. + anObject argument: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> variableDeclaratorValueOwner [ + "Relation named: #variableDeclaratorValueOwner type: #FASTTypeScriptVariableDeclarator opposite: #value" + + + + + + + + ^ self attributeAt: #variableDeclaratorValueOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTExpression >> variableDeclaratorValueOwner: anObject [ + + + + + + (self attributeAt: #variableDeclaratorValueOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self variableDeclaratorValueOwner. + self attributeAt: #variableDeclaratorValueOwner put: anObject. + otherSide value: nil ] + ifNotNil: [ + self attributeAt: #variableDeclaratorValueOwner put: anObject. + anObject value: self ] +] diff --git a/FAST-TypeScript-Model/FASTTStatement.extension.st b/FAST-TypeScript-Model/FASTTStatement.extension.st index 4c42948..07d8dfa 100644 --- a/FAST-TypeScript-Model/FASTTStatement.extension.st +++ b/FAST-TypeScript-Model/FASTTStatement.extension.st @@ -1,53 +1,165 @@ Extension { #name : 'FASTTStatement' } -{ #category : '*FAST-TypeScript-Model-accessing' } -FASTTStatement >> doBodyOwner [ - "Relation named: #doBodyOwner type: #FASTTypeScriptDoStatement opposite: #body" +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> doStatementBodyOwner [ + "Relation named: #doStatementBodyOwner type: #FASTTypeScriptDoStatement opposite: #body" + - + - ^ self attributeAt: #doBodyOwner ifAbsent: [ nil ] + ^ self attributeAt: #doStatementBodyOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } -FASTTStatement >> doBodyOwner: anObject [ +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> doStatementBodyOwner: anObject [ + - (self attributeAt: #doBodyOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + + + (self attributeAt: #doStatementBodyOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self doStatementBodyOwner. + self attributeAt: #doStatementBodyOwner put: anObject. + otherSide body: nil ] + ifNotNil: [ + self attributeAt: #doStatementBodyOwner put: anObject. + anObject body: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> forStatementBodyOwner [ + "Relation named: #forStatementBodyOwner type: #FASTTypeScriptForStatement opposite: #body" + + + + + + + + ^ self attributeAt: #forStatementBodyOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> forStatementBodyOwner: anObject [ + + + + + + (self attributeAt: #forStatementBodyOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self forStatementBodyOwner. + self attributeAt: #forStatementBodyOwner put: anObject. + otherSide body: nil ] + ifNotNil: [ + self attributeAt: #forStatementBodyOwner put: anObject. + anObject body: self ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> labeledStatementBodyOwner [ + "Relation named: #labeledStatementBodyOwner type: #FASTTypeScriptLabeledStatement opposite: #body" + + + + + + + + ^ self attributeAt: #labeledStatementBodyOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> labeledStatementBodyOwner: anObject [ + + + + + + (self attributeAt: #labeledStatementBodyOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | - otherSide := self doBodyOwner. - self attributeAt: #doBodyOwner put: anObject. + otherSide := self labeledStatementBodyOwner. + self attributeAt: #labeledStatementBodyOwner put: anObject. otherSide body: nil ] ifNotNil: [ - self attributeAt: #doBodyOwner put: anObject. + self attributeAt: #labeledStatementBodyOwner put: anObject. anObject body: self ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } -FASTTStatement >> whileBodyOwner [ - "Relation named: #whileBodyOwner type: #FASTTypeScriptWhileStatement opposite: #body" +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> switchCaseBodyOwner [ + "Relation named: #switchCaseBodyOwner type: #FASTTypeScriptSwitchCase opposite: #body" + + + + + + ^ self attributeAt: #switchCaseBodyOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> switchCaseBodyOwner: anObject [ + + + + + + self attributeAt: #switchCaseBodyOwner put: (FMMultivalueLink on: self update: #body from: self switchCaseBodyOwner to: anObject). +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> switchDefaultBodyOwner [ + "Relation named: #switchDefaultBodyOwner type: #FASTTypeScriptSwitchDefault opposite: #body" + + + + + + + ^ self attributeAt: #switchDefaultBodyOwner ifAbsent: [ nil ] +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> switchDefaultBodyOwner: anObject [ + + + + + + self attributeAt: #switchDefaultBodyOwner put: (FMMultivalueLink on: self update: #body from: self switchDefaultBodyOwner to: anObject). +] + +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> whileStatementBodyOwner [ + "Relation named: #whileStatementBodyOwner type: #FASTTypeScriptWhileStatement opposite: #body" + + - + - ^ self attributeAt: #whileBodyOwner ifAbsent: [ nil ] + ^ self attributeAt: #whileStatementBodyOwner ifAbsent: [ nil ] ] -{ #category : '*FAST-TypeScript-Model-accessing' } -FASTTStatement >> whileBodyOwner: anObject [ +{ #category : '*FAST-TypeScript-Model' } +FASTTStatement >> whileStatementBodyOwner: anObject [ + - (self attributeAt: #whileBodyOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + + + (self attributeAt: #whileStatementBodyOwner ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | - otherSide := self whileBodyOwner. - self attributeAt: #whileBodyOwner put: anObject. + otherSide := self whileStatementBodyOwner. + self attributeAt: #whileStatementBodyOwner put: anObject. otherSide body: nil ] ifNotNil: [ - self attributeAt: #whileBodyOwner put: anObject. + self attributeAt: #whileStatementBodyOwner put: anObject. anObject body: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAbstractClassDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptAbstractClassDeclaration.class.st index 826e5cf..e95673e 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAbstractClassDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAbstractClassDeclaration.class.st @@ -9,16 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptAbstractClassDeclaration class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptAbstractClassDeclaration class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptAbstract_class_declaration } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAbstractMethodSignature.class.st b/FAST-TypeScript-Model/FASTTypeScriptAbstractMethodSignature.class.st index 96bba15..22fc7fb 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAbstractMethodSignature.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAbstractMethodSignature.class.st @@ -1,6 +1,27 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `name` | `FASTTypeScriptAbstractMethodSignature` | `abstractMethodSignatureNameOwner` | `FASTTypeScriptEntity` | | +| `parameters` | `FASTTypeScriptAbstractMethodSignature` | `abstractMethodSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | | +| `return_type` | `FASTTypeScriptAbstractMethodSignature` | `abstractMethodSignatureReturnTypeOwner` | `FASTTypeScriptEntity` | | +| `type_parameters` | `FASTTypeScriptAbstractMethodSignature` | `abstractMethodSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | + + + +" Class { #name : 'FASTTypeScriptAbstractMethodSignature', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#name => FMOne type: #FASTTypeScriptEntity opposite: #abstractMethodSignatureNameOwner', + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #abstractMethodSignatureParametersOwner', + '#return_type => FMOne type: #FASTTypeScriptEntity opposite: #abstractMethodSignatureReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #abstractMethodSignatureTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +30,76 @@ Class { { #category : 'meta' } FASTTypeScriptAbstractMethodSignature class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptAbstractMethodSignature class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptAbstractMethodSignature >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #abstractMethodSignatureNameOwner" - self deprecatedAliases: { #FASTTypescriptAbstract_method_signature } - - + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptAbstractMethodSignature >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptAbstractMethodSignature >> parameters [ + "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #abstractMethodSignatureParametersOwner" + + + + ^ parameters +] + +{ #category : 'accessing' } +FASTTypeScriptAbstractMethodSignature >> parameters: anObject [ + + + + parameters := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptAbstractMethodSignature >> return_type [ + "Relation named: #return_type type: #FASTTypeScriptEntity opposite: #abstractMethodSignatureReturnTypeOwner" + + + + ^ return_type +] + +{ #category : 'accessing' } +FASTTypeScriptAbstractMethodSignature >> return_type: anObject [ + + + + return_type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptAbstractMethodSignature >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #abstractMethodSignatureTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptAbstractMethodSignature >> type_parameters: anObject [ + + + + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAccessibilityModifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptAccessibilityModifier.class.st index 2b63dd9..c6061ba 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAccessibilityModifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAccessibilityModifier.class.st @@ -9,17 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptAccessibilityModifier class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptAccessibilityModifier class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptAccessibility_modifier } - - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAddingTypeAnnotation.class.st b/FAST-TypeScript-Model/FASTTypeScriptAddingTypeAnnotation.class.st index c1f73d8..a2251bd 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAddingTypeAnnotation.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAddingTypeAnnotation.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptAddingTypeAnnotation` | `addingTypeAnnotationOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptAddingTypeAnnotation', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #addingTypeAnnotationOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptAddingTypeAnnotation class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptAddingTypeAnnotation class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptAddingTypeAnnotation >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #addingTypeAnnotationOwner" - self deprecatedAliases: { #FASTTypescriptAdding_type_annotation } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptAddingTypeAnnotation >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAmbientDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptAmbientDeclaration.class.st index 1a71250..806b5b9 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAmbientDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAmbientDeclaration.class.st @@ -1,6 +1,47 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptAmbientDeclaration` | `ambientDeclarationOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptAmbientDeclaration', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTDeclaration', + #classTraits : 'FASTTypeScriptTDeclaration classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #ambientDeclarationOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +50,34 @@ Class { { #category : 'meta' } FASTTypeScriptAmbientDeclaration class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptAmbientDeclaration class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptAmbientDeclaration >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptAmbient_declaration } - - + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptAmbientDeclaration >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #ambientDeclarationOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptAmbientDeclaration >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptArguments.class.st b/FAST-TypeScript-Model/FASTTypeScriptArguments.class.st index 763d0f3..261b1cc 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptArguments.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptArguments.class.st @@ -29,20 +29,16 @@ Class { { #category : 'meta' } FASTTypeScriptArguments class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptArguments class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptArguments } ] { #category : 'adding' } FASTTypeScriptArguments >> addArgumentsList: anObject [ + + ^ self argumentsList add: anObject ] @@ -51,31 +47,28 @@ FASTTypeScriptArguments >> addArgumentsList: anObject [ FASTTypeScriptArguments >> argumentsList [ "Relation named: #argumentsList type: #FASTTEntity opposite: #argumentsOwner" + + ^ self attributeAt: #argumentsList ifAbsentPut: [ FMMultivalueLink on: self opposite: #argumentsOwner: ] ] { #category : 'accessing' } FASTTypeScriptArguments >> argumentsList: anObject [ + self argumentsList value: anObject ] -{ #category : 'navigation' } -FASTTypeScriptArguments >> argumentsListGroup [ - - - ^ MooseSpecializedGroup withAll: self argumentsList asSet -] - { #category : 'accessing' } FASTTypeScriptArguments >> newExpressionArgumentsOwner [ "Relation named: #newExpressionArgumentsOwner type: #FASTTypeScriptNewExpression opposite: #arguments" + @@ -86,13 +79,7 @@ FASTTypeScriptArguments >> newExpressionArgumentsOwner [ { #category : 'accessing' } FASTTypeScriptArguments >> newExpressionArgumentsOwner: anObject [ + newExpressionArgumentsOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptArguments >> newExpressionArgumentsOwnerGroup [ - - - ^ MooseSpecializedGroup with: self newExpressionArgumentsOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptArray.class.st b/FAST-TypeScript-Model/FASTTypeScriptArray.class.st index 08b4461..0dcb3ed 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptArray.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptArray.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,54 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptArray` | `arrayOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +82,11 @@ Class { #name : 'FASTTypeScriptArray', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #arrayOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,14 +95,34 @@ Class { { #category : 'meta' } FASTTypeScriptArray class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptArray class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptArray >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptArray >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #arrayOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptArray >> childrenNodes: anObject [ - self deprecatedAliases: { #FASTTypescriptArray } + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptArrayPattern.class.st b/FAST-TypeScript-Model/FASTTypeScriptArrayPattern.class.st index b0e8e07..f81f8e9 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptArrayPattern.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptArrayPattern.class.st @@ -11,6 +11,8 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | `left` | `FASTTypeScriptAssignmentPattern` | | +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +21,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptArrayPattern` | `arrayPatternOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +81,11 @@ Class { #name : 'FASTTypeScriptArrayPattern', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPattern', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPattern classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #arrayPatternOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +94,34 @@ Class { { #category : 'meta' } FASTTypeScriptArrayPattern class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptArrayPattern class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptArrayPattern >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptArrayPattern >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #arrayPatternOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptArrayPattern >> childrenNodes: anObject [ - self deprecatedAliases: { #FASTTypescriptArray_pattern } - - + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptArrayType.class.st b/FAST-TypeScript-Model/FASTTypeScriptArrayType.class.st index 3604999..a8673d8 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptArrayType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptArrayType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptArrayType` | `arrayTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +80,11 @@ Class { #name : 'FASTTypeScriptArrayType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #arrayTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptArrayType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptArrayType class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptArrayType >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #arrayTypeOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptArrayType >> childrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptArray_type } - - + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptArrowFunction.class.st b/FAST-TypeScript-Model/FASTTypeScriptArrowFunction.class.st index eb1a481..39ee56b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptArrowFunction.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptArrowFunction.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,49 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ### Children | Relation | Origin | Opposite | Type | Comment | @@ -42,6 +70,8 @@ | `body` | `FASTTypeScriptArrowFunction` | `arrowFunctionBodyOwner` | `FASTTEntity` | The body of the arrow function| | `parameter` | `FASTTypeScriptArrowFunction` | `arrowFunctionParameterOwner` | `FASTTypeScriptIdentifier` | The single parameter of the arrow function| | `parameters` | `FASTTypeScriptArrowFunction` | `arrowFunctionParametersOwner` | `FASTTypeScriptFormalParameters` | The parameters of the arrow function| +| `return_type` | `FASTTypeScriptArrowFunction` | `arrowFunctionReturnTypeOwner` | `FASTTypeScriptEntity` | | +| `type_parameters` | `FASTTypeScriptArrowFunction` | `arrowFunctionTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | ## Properties @@ -56,11 +86,13 @@ Class { #name : 'FASTTypeScriptArrowFunction', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', #instVars : [ '#parameter => FMOne type: #FASTTypeScriptIdentifier opposite: #arrowFunctionParameterOwner', - '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #arrowFunctionParametersOwner' + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #arrowFunctionParametersOwner', + '#return_type => FMOne type: #FASTTypeScriptEntity opposite: #arrowFunctionReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #arrowFunctionTypeParametersOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -70,24 +102,17 @@ Class { { #category : 'meta' } FASTTypeScriptArrowFunction class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptArrowFunction class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptArrow_function } - - ] { #category : 'accessing' } FASTTypeScriptArrowFunction >> body [ "Relation named: #body type: #FASTTEntity opposite: #arrowFunctionBodyOwner" + @@ -97,6 +122,7 @@ FASTTypeScriptArrowFunction >> body [ { #category : 'accessing' } FASTTypeScriptArrowFunction >> body: anObject [ + (self attributeAt: #body ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -108,17 +134,11 @@ FASTTypeScriptArrowFunction >> body: anObject [ anObject arrowFunctionBodyOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptArrowFunction >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body -] - { #category : 'accessing' } FASTTypeScriptArrowFunction >> parameter [ "Relation named: #parameter type: #FASTTypeScriptIdentifier opposite: #arrowFunctionParameterOwner" + ^ parameter @@ -127,21 +147,16 @@ FASTTypeScriptArrowFunction >> parameter [ { #category : 'accessing' } FASTTypeScriptArrowFunction >> parameter: anObject [ + parameter := anObject ] -{ #category : 'navigation' } -FASTTypeScriptArrowFunction >> parameterGroup [ - - - ^ MooseSpecializedGroup with: self parameter -] - { #category : 'accessing' } FASTTypeScriptArrowFunction >> parameters [ "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #arrowFunctionParametersOwner" + ^ parameters @@ -150,13 +165,41 @@ FASTTypeScriptArrowFunction >> parameters [ { #category : 'accessing' } FASTTypeScriptArrowFunction >> parameters: anObject [ + parameters := anObject ] -{ #category : 'navigation' } -FASTTypeScriptArrowFunction >> parametersGroup [ +{ #category : 'accessing' } +FASTTypeScriptArrowFunction >> return_type [ + "Relation named: #return_type type: #FASTTypeScriptEntity opposite: #arrowFunctionReturnTypeOwner" + + + + ^ return_type +] + +{ #category : 'accessing' } +FASTTypeScriptArrowFunction >> return_type: anObject [ + + + + return_type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptArrowFunction >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #arrowFunctionTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptArrowFunction >> type_parameters: anObject [ + + - - ^ MooseSpecializedGroup with: self parameters + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAsExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptAsExpression.class.st index 0244d35..f342960 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAsExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAsExpression.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptAsExpression` | `asExpressionOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptAsExpression', #superclass : 'FASTTypeScriptExpression', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #asExpressionOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,34 @@ Class { { #category : 'meta' } FASTTypeScriptAsExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptAsExpression class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptAsExpression >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] - self deprecatedAliases: { #FASTTypescriptAs_expression } - - +{ #category : 'accessing' } +FASTTypeScriptAsExpression >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #asExpressionOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptAsExpression >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAsserts.class.st b/FAST-TypeScript-Model/FASTTypeScriptAsserts.class.st index 4bd674f..d9f5d27 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAsserts.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAsserts.class.st @@ -1,6 +1,90 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptAsserts` | `assertsOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptAsserts', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression', + #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #assertsOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptAsserts class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptAsserts class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptAsserts >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #assertsOwner" - self deprecatedAliases: { #FASTTypescriptAsserts } + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptAsserts >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAssertsAnnotation.class.st b/FAST-TypeScript-Model/FASTTypeScriptAssertsAnnotation.class.st index 56941dd..974f743 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAssertsAnnotation.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAssertsAnnotation.class.st @@ -5,16 +5,87 @@ ### Parents | Relation | Origin | Opposite | Type | Comment | |---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionDeclarationReturnTypeOwner` | `FASTTypeScriptTReturnType` | `return_type` | `FASTTypeScriptFunctionDeclaration` | My owner| +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptAssertsAnnotation` | `assertsAnnotationOwner` | `FASTTypeScriptEntity` | | +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | " Class { #name : 'FASTTypeScriptAssertsAnnotation', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTypeScriptTReturnType', - #classTraits : 'FASTTypeScriptTReturnType classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTReturnType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTReturnType classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #assertsAnnotationOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -23,16 +94,25 @@ Class { { #category : 'meta' } FASTTypeScriptAssertsAnnotation class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptAssertsAnnotation class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptAssertsAnnotation >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #assertsAnnotationOwner" - self deprecatedAliases: { #FASTTypescriptAsserts_annotation } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptAssertsAnnotation >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAssignmentExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptAssignmentExpression.class.st index 889bf63..8eafd28 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAssignmentExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAssignmentExpression.class.st @@ -22,22 +22,17 @@ Class { { #category : 'meta' } FASTTypeScriptAssignmentExpression class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptAssignmentExpression class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptAssignment_expression } ] { #category : 'accessing' } FASTTypeScriptAssignmentExpression >> left [ "Relation named: #left type: #FASTTExpression opposite: #assignmentExpressionLeftOwner" + @@ -47,6 +42,7 @@ FASTTypeScriptAssignmentExpression >> left [ { #category : 'accessing' } FASTTypeScriptAssignmentExpression >> left: anObject [ + (self attributeAt: #left ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -58,17 +54,11 @@ FASTTypeScriptAssignmentExpression >> left: anObject [ anObject assignmentExpressionLeftOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptAssignmentExpression >> leftGroup [ - - - ^ MooseSpecializedGroup with: self left -] - { #category : 'accessing' } FASTTypeScriptAssignmentExpression >> right [ "Relation named: #right type: #FASTTExpression opposite: #assignmentExpressionRightOwner" + @@ -78,6 +68,7 @@ FASTTypeScriptAssignmentExpression >> right [ { #category : 'accessing' } FASTTypeScriptAssignmentExpression >> right: anObject [ + (self attributeAt: #right ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -88,10 +79,3 @@ FASTTypeScriptAssignmentExpression >> right: anObject [ self attributeAt: #right put: anObject. anObject assignmentExpressionRightOwner: self ] ] - -{ #category : 'navigation' } -FASTTypeScriptAssignmentExpression >> rightGroup [ - - - ^ MooseSpecializedGroup with: self right -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAssignmentPattern.class.st b/FAST-TypeScript-Model/FASTTypeScriptAssignmentPattern.class.st index c105092..983294c 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAssignmentPattern.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAssignmentPattern.class.st @@ -1,6 +1,22 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `left` | `FASTTypeScriptAssignmentPattern` | `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | | +| `right` | `FASTTypeScriptAssignmentPattern` | `assignmentPatternRightOwner` | `FASTTExpression` | | + + + +" Class { #name : 'FASTTypeScriptAssignmentPattern', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#left => FMOne type: #FASTTypeScriptTPattern opposite: #assignmentPatternLeftOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +25,50 @@ Class { { #category : 'meta' } FASTTypeScriptAssignmentPattern class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptAssignmentPattern class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptAssignmentPattern >> left [ + "Relation named: #left type: #FASTTypeScriptTPattern opposite: #assignmentPatternLeftOwner" - self deprecatedAliases: { #FASTTypescriptAssignment_pattern } - - + + + ^ left +] + +{ #category : 'accessing' } +FASTTypeScriptAssignmentPattern >> left: anObject [ + + + + left := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptAssignmentPattern >> right [ + "Relation named: #right type: #FASTTExpression opposite: #assignmentPatternRightOwner" + + + + + ^ self attributeAt: #right ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptAssignmentPattern >> right: anObject [ + + + + (self attributeAt: #right ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self right. + self attributeAt: #right put: anObject. + otherSide assignmentPatternRightOwner: nil ] + ifNotNil: [ + self attributeAt: #right put: anObject. + anObject assignmentPatternRightOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAugmentedAssignmentExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptAugmentedAssignmentExpression.class.st index c4e7d0f..d62ad31 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAugmentedAssignmentExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAugmentedAssignmentExpression.class.st @@ -6,6 +6,7 @@ | Relation | Origin | Opposite | Type | Comment | |---| | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | left| +| `operator` | `FASTTypeScriptAugmentedAssignmentExpression` | `augmentedAssignmentExpressionOperatorOwner` | `FASTTypeScriptEntity` | | | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | right| @@ -14,6 +15,9 @@ Class { #name : 'FASTTypeScriptAugmentedAssignmentExpression', #superclass : 'FASTTypeScriptExpression', + #instVars : [ + '#operator => FMOne type: #FASTTypeScriptEntity opposite: #augmentedAssignmentExpressionOperatorOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -22,22 +26,17 @@ Class { { #category : 'meta' } FASTTypeScriptAugmentedAssignmentExpression class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptAugmentedAssignmentExpression class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptAugmented_assignment_expression } ] { #category : 'accessing' } FASTTypeScriptAugmentedAssignmentExpression >> left [ "Relation named: #left type: #FASTTExpression opposite: #augmentedAssignmentExpressionLeftOwner" + @@ -47,6 +46,7 @@ FASTTypeScriptAugmentedAssignmentExpression >> left [ { #category : 'accessing' } FASTTypeScriptAugmentedAssignmentExpression >> left: anObject [ + (self attributeAt: #left ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -58,17 +58,28 @@ FASTTypeScriptAugmentedAssignmentExpression >> left: anObject [ anObject augmentedAssignmentExpressionLeftOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptAugmentedAssignmentExpression >> leftGroup [ +{ #category : 'accessing' } +FASTTypeScriptAugmentedAssignmentExpression >> operator [ + "Relation named: #operator type: #FASTTypeScriptEntity opposite: #augmentedAssignmentExpressionOperatorOwner" + + - - ^ MooseSpecializedGroup with: self left + ^ operator +] + +{ #category : 'accessing' } +FASTTypeScriptAugmentedAssignmentExpression >> operator: anObject [ + + + + operator := anObject ] { #category : 'accessing' } FASTTypeScriptAugmentedAssignmentExpression >> right [ "Relation named: #right type: #FASTTExpression opposite: #augmentedAssignmentExpressionRightOwner" + @@ -78,6 +89,7 @@ FASTTypeScriptAugmentedAssignmentExpression >> right [ { #category : 'accessing' } FASTTypeScriptAugmentedAssignmentExpression >> right: anObject [ + (self attributeAt: #right ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -88,10 +100,3 @@ FASTTypeScriptAugmentedAssignmentExpression >> right: anObject [ self attributeAt: #right put: anObject. anObject augmentedAssignmentExpressionRightOwner: self ] ] - -{ #category : 'navigation' } -FASTTypeScriptAugmentedAssignmentExpression >> rightGroup [ - - - ^ MooseSpecializedGroup with: self right -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptAwaitExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptAwaitExpression.class.st index 0dad468..02be766 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptAwaitExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptAwaitExpression.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptAwaitExpression` | `awaitExpressionOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptAwaitExpression', #superclass : 'FASTTypeScriptExpression', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #awaitExpressionOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptAwaitExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptAwaitExpression class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptAwaitExpression >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #awaitExpressionOwner" - self deprecatedAliases: { #FASTTypescriptAwait_expression } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptAwaitExpression >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptBinaryExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptBinaryExpression.class.st index 5c72310..3dc947b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptBinaryExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptBinaryExpression.class.st @@ -2,15 +2,11 @@ ## Relations ====================== -### Parents -| Relation | Origin | Opposite | Type | Comment | -|---| -| `forConditionOwner` | `FASTTypeScriptBinaryExpression` | `condition` | `FASTTypeScriptForStatement` | | - ### Children | Relation | Origin | Opposite | Type | Comment | |---| | `left` | `FASTTypeScriptBinaryExpression` | `binaryExpressionLeftOwner` | `FASTTExpression` | The left operand (if possible)| +| `operator` | `FASTTypeScriptBinaryExpression` | `binaryExpressionOperatorOwner` | `FASTTypeScriptEntity` | | | `right` | `FASTTypeScriptBinaryExpression` | `binaryExpressionRightOwner` | `FASTTExpression` | The right operand (if possible)| @@ -20,7 +16,7 @@ Class { #name : 'FASTTypeScriptBinaryExpression', #superclass : 'FASTTypeScriptExpression', #instVars : [ - '#forConditionOwner => FMOne type: #FASTTypeScriptForStatement opposite: #condition' + '#operator => FMOne type: #FASTTypeScriptEntity opposite: #binaryExpressionOperatorOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -30,49 +26,17 @@ Class { { #category : 'meta' } FASTTypeScriptBinaryExpression class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptBinaryExpression class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptBinary_expression } - - - -] - -{ #category : 'accessing' } -FASTTypeScriptBinaryExpression >> forConditionOwner [ - "Relation named: #forConditionOwner type: #FASTTypeScriptForStatement opposite: #condition" - - - - - ^ forConditionOwner -] - -{ #category : 'accessing' } -FASTTypeScriptBinaryExpression >> forConditionOwner: anObject [ - - - forConditionOwner := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptBinaryExpression >> forConditionOwnerGroup [ - - - ^ MooseSpecializedGroup with: self forConditionOwner ] { #category : 'accessing' } FASTTypeScriptBinaryExpression >> left [ "Relation named: #left type: #FASTTExpression opposite: #binaryExpressionLeftOwner" + @@ -82,6 +46,7 @@ FASTTypeScriptBinaryExpression >> left [ { #category : 'accessing' } FASTTypeScriptBinaryExpression >> left: anObject [ + (self attributeAt: #left ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -93,17 +58,28 @@ FASTTypeScriptBinaryExpression >> left: anObject [ anObject binaryExpressionLeftOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptBinaryExpression >> leftGroup [ +{ #category : 'accessing' } +FASTTypeScriptBinaryExpression >> operator [ + "Relation named: #operator type: #FASTTypeScriptEntity opposite: #binaryExpressionOperatorOwner" + + - - ^ MooseSpecializedGroup with: self left + ^ operator +] + +{ #category : 'accessing' } +FASTTypeScriptBinaryExpression >> operator: anObject [ + + + + operator := anObject ] { #category : 'accessing' } FASTTypeScriptBinaryExpression >> right [ "Relation named: #right type: #FASTTExpression opposite: #binaryExpressionRightOwner" + @@ -113,6 +89,7 @@ FASTTypeScriptBinaryExpression >> right [ { #category : 'accessing' } FASTTypeScriptBinaryExpression >> right: anObject [ + (self attributeAt: #right ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -123,10 +100,3 @@ FASTTypeScriptBinaryExpression >> right: anObject [ self attributeAt: #right put: anObject. anObject binaryExpressionRightOwner: self ] ] - -{ #category : 'navigation' } -FASTTypeScriptBinaryExpression >> rightGroup [ - - - ^ MooseSpecializedGroup with: self right -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptBoolean.class.st b/FAST-TypeScript-Model/FASTTypeScriptBoolean.class.st index 3807b01..6079bec 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptBoolean.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptBoolean.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,47 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -60,14 +86,8 @@ Class { { #category : 'meta' } FASTTypeScriptBoolean class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptBoolean class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptBoolean } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptBreakStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptBreakStatement.class.st index e5617ad..f1f3fa1 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptBreakStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptBreakStatement.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `label` | `FASTTypeScriptBreakStatement` | `breakStatementLabelOwner` | `FASTTypeScriptStatementIdentifier` | | + + + +" Class { #name : 'FASTTypeScriptBreakStatement', #superclass : 'FASTTypeScriptStatement', + #instVars : [ + '#label => FMOne type: #FASTTypeScriptStatementIdentifier opposite: #breakStatementLabelOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptBreakStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptBreakStatement class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptBreakStatement >> label [ + "Relation named: #label type: #FASTTypeScriptStatementIdentifier opposite: #breakStatementLabelOwner" - self deprecatedAliases: { #FASTTypescriptBreak_statement } - - + + + ^ label +] + +{ #category : 'accessing' } +FASTTypeScriptBreakStatement >> label: anObject [ + + + + label := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptCallExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptCallExpression.class.st index 37f88b1..47e0df0 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptCallExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptCallExpression.class.st @@ -1,6 +1,96 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `arguments` | `FASTTypeScriptCallExpression` | `callExpressionArgumentsOwner` | `FASTTypeScriptEntity` | | +| `function` | `FASTTypeScriptCallExpression` | `callExpressionFunctionOwner` | `FASTTypeScriptEntity` | | +| `type_arguments` | `FASTTypeScriptCallExpression` | `callExpressionTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptCallExpression', #superclass : 'FASTTypeScriptExpression', + #traits : 'FASTTypeScriptTPrimaryExpression + FASTTypeScriptTType', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait + FASTTypeScriptTType classTrait', + #instVars : [ + '#arguments => FMOne type: #FASTTypeScriptEntity opposite: #callExpressionArgumentsOwner', + '#function => FMOne type: #FASTTypeScriptEntity opposite: #callExpressionFunctionOwner', + '#type_arguments => FMOne type: #FASTTypeScriptTypeArguments opposite: #callExpressionTypeArgumentsOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +99,59 @@ Class { { #category : 'meta' } FASTTypeScriptCallExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptCallExpression class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptCallExpression >> arguments [ + "Relation named: #arguments type: #FASTTypeScriptEntity opposite: #callExpressionArgumentsOwner" + + + + ^ arguments +] + +{ #category : 'accessing' } +FASTTypeScriptCallExpression >> arguments: anObject [ + + + + arguments := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptCallExpression >> function [ + "Relation named: #function type: #FASTTypeScriptEntity opposite: #callExpressionFunctionOwner" - self deprecatedAliases: { #FASTTypescriptCall_expression } - - + + + ^ function +] + +{ #category : 'accessing' } +FASTTypeScriptCallExpression >> function: anObject [ + + + + function := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptCallExpression >> type_arguments [ + "Relation named: #type_arguments type: #FASTTypeScriptTypeArguments opposite: #callExpressionTypeArgumentsOwner" + + + + ^ type_arguments +] + +{ #category : 'accessing' } +FASTTypeScriptCallExpression >> type_arguments: anObject [ + + + + type_arguments := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptCallSignature.class.st b/FAST-TypeScript-Model/FASTTypeScriptCallSignature.class.st index 748db1c..a8ecdc8 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptCallSignature.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptCallSignature.class.st @@ -1,6 +1,25 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `parameters` | `FASTTypeScriptCallSignature` | `callSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | | +| `return_type` | `FASTTypeScriptCallSignature` | `callSignatureReturnTypeOwner` | `FASTTypeScriptEntity` | | +| `type_parameters` | `FASTTypeScriptCallSignature` | `callSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | + + + +" Class { #name : 'FASTTypeScriptCallSignature', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #callSignatureParametersOwner', + '#return_type => FMOne type: #FASTTypeScriptEntity opposite: #callSignatureReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #callSignatureTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +28,59 @@ Class { { #category : 'meta' } FASTTypeScriptCallSignature class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptCallSignature class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptCallSignature >> parameters [ + "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #callSignatureParametersOwner" + + + + ^ parameters +] - self deprecatedAliases: { #FASTTypescriptCall_signature } - - +{ #category : 'accessing' } +FASTTypeScriptCallSignature >> parameters: anObject [ + + + + parameters := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptCallSignature >> return_type [ + "Relation named: #return_type type: #FASTTypeScriptEntity opposite: #callSignatureReturnTypeOwner" + + + + ^ return_type +] + +{ #category : 'accessing' } +FASTTypeScriptCallSignature >> return_type: anObject [ + + + + return_type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptCallSignature >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #callSignatureTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptCallSignature >> type_parameters: anObject [ + + + + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptCatchClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptCatchClause.class.st index 191b707..e802667 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptCatchClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptCatchClause.class.st @@ -7,6 +7,13 @@ |---| | `tryStatementHandlerOwner` | `FASTTypeScriptCatchClause` | `handler` | `FASTTypeScriptTryStatement` | Try statement owner| +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptCatchClause` | `catchClauseBodyOwner` | `FASTTypeScriptStatementBlock` | | +| `parameter` | `FASTTypeScriptCatchClause` | `catchClauseParameterOwner` | `FASTTypeScriptEntity` | | +| `type` | `FASTTypeScriptCatchClause` | `catchClauseTypeOwner` | `FASTTypeScriptTypeAnnotation` | | + " @@ -14,7 +21,10 @@ Class { #name : 'FASTTypeScriptCatchClause', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#tryStatementHandlerOwner => FMOne type: #FASTTypeScriptTryStatement opposite: #handler' + '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #catchClauseBodyOwner', + '#parameter => FMOne type: #FASTTypeScriptEntity opposite: #catchClauseParameterOwner', + '#tryStatementHandlerOwner => FMOne type: #FASTTypeScriptTryStatement opposite: #handler', + '#type => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #catchClauseTypeOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -24,24 +34,51 @@ Class { { #category : 'meta' } FASTTypeScriptCatchClause class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptCatchClause class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptCatchClause >> body [ + "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #catchClauseBodyOwner" + + + + ^ body +] + +{ #category : 'accessing' } +FASTTypeScriptCatchClause >> body: anObject [ - self deprecatedAliases: { #FASTTypescriptCatch_clause } - - + + + body := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptCatchClause >> parameter [ + "Relation named: #parameter type: #FASTTypeScriptEntity opposite: #catchClauseParameterOwner" + + + + ^ parameter +] + +{ #category : 'accessing' } +FASTTypeScriptCatchClause >> parameter: anObject [ + + + + parameter := anObject ] { #category : 'accessing' } FASTTypeScriptCatchClause >> tryStatementHandlerOwner [ "Relation named: #tryStatementHandlerOwner type: #FASTTypeScriptTryStatement opposite: #handler" + @@ -52,13 +89,24 @@ FASTTypeScriptCatchClause >> tryStatementHandlerOwner [ { #category : 'accessing' } FASTTypeScriptCatchClause >> tryStatementHandlerOwner: anObject [ + tryStatementHandlerOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptCatchClause >> tryStatementHandlerOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptCatchClause >> type [ + "Relation named: #type type: #FASTTypeScriptTypeAnnotation opposite: #catchClauseTypeOwner" + + + + ^ type +] + +{ #category : 'accessing' } +FASTTypeScriptCatchClause >> type: anObject [ + + - - ^ MooseSpecializedGroup with: self tryStatementHandlerOwner + type := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptClass.class.st b/FAST-TypeScript-Model/FASTTypeScriptClass.class.st index 215380c..42a8267 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptClass.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptClass.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,57 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptClass` | `classBodyOwner` | `FASTTypeScriptClassBody` | | +| `decorator` | `FASTTypeScriptClass` | `classDecoratorOwner` | `FASTTypeScriptDecorator` | | +| `name` | `FASTTypeScriptClass` | `classNameOwner` | `FASTTypeScriptTypeIdentifier` | | +| `type_parameters` | `FASTTypeScriptClass` | `classTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | ## Properties @@ -49,8 +85,14 @@ Class { #name : 'FASTTypeScriptClass', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#body => FMOne type: #FASTTypeScriptClassBody opposite: #classBodyOwner', + '#decorator => FMMany type: #FASTTypeScriptDecorator opposite: #classDecoratorOwner', + '#name => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #classNameOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #classTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,14 +101,85 @@ Class { { #category : 'meta' } FASTTypeScriptClass class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptClass class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptClass >> addDecorator: anObject [ + + + + ^ self decorator add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptClass >> body [ + "Relation named: #body type: #FASTTypeScriptClassBody opposite: #classBodyOwner" + + + + ^ body +] + +{ #category : 'accessing' } +FASTTypeScriptClass >> body: anObject [ + + + + body := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptClass >> decorator [ + "Relation named: #decorator type: #FASTTypeScriptDecorator opposite: #classDecoratorOwner" + + + + + ^ decorator +] + +{ #category : 'accessing' } +FASTTypeScriptClass >> decorator: anObject [ + + + + decorator value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptClass >> name [ + "Relation named: #name type: #FASTTypeScriptTypeIdentifier opposite: #classNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptClass >> name: anObject [ - self deprecatedAliases: { #FASTTypescriptClass } + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptClass >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #classTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptClass >> type_parameters: anObject [ + + + + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptClassBody.class.st b/FAST-TypeScript-Model/FASTTypeScriptClassBody.class.st index 3b5151c..3b61b08 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptClassBody.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptClassBody.class.st @@ -5,8 +5,14 @@ ### Parents | Relation | Origin | Opposite | Type | Comment | |---| +| `classBodyOwner` | `FASTTypeScriptClassBody` | `body` | `FASTTypeScriptClass` | | | `classDeclarationBodyOwner` | `FASTTypeScriptClassBody` | `body` | `FASTTypeScriptClassDeclaration` | The class declaration that contains me| +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `decorator` | `FASTTypeScriptClassBody` | `classBodyDecoratorOwner` | `FASTTypeScriptDecorator` | | + " @@ -14,7 +20,9 @@ Class { #name : 'FASTTypeScriptClassBody', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#classDeclarationBodyOwner => FMOne type: #FASTTypeScriptClassDeclaration opposite: #body' + '#classBodyOwner => FMOne type: #FASTTypeScriptClass opposite: #body', + '#classDeclarationBodyOwner => FMOne type: #FASTTypeScriptClassDeclaration opposite: #body', + '#decorator => FMMany type: #FASTTypeScriptDecorator opposite: #classBodyDecoratorOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -24,24 +32,44 @@ Class { { #category : 'meta' } FASTTypeScriptClassBody class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptClassBody class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptClassBody >> addDecorator: anObject [ + + + + ^ self decorator add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptClassBody >> classBodyOwner [ + "Relation named: #classBodyOwner type: #FASTTypeScriptClass opposite: #body" + + + + + + ^ classBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptClassBody >> classBodyOwner: anObject [ - self deprecatedAliases: { #FASTTypescriptClass_body } - - + + + classBodyOwner := anObject ] { #category : 'accessing' } FASTTypeScriptClassBody >> classDeclarationBodyOwner [ "Relation named: #classDeclarationBodyOwner type: #FASTTypeScriptClassDeclaration opposite: #body" + @@ -52,13 +80,25 @@ FASTTypeScriptClassBody >> classDeclarationBodyOwner [ { #category : 'accessing' } FASTTypeScriptClassBody >> classDeclarationBodyOwner: anObject [ + classDeclarationBodyOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptClassBody >> classDeclarationBodyOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptClassBody >> decorator [ + "Relation named: #decorator type: #FASTTypeScriptDecorator opposite: #classBodyDecoratorOwner" + + + + + ^ decorator +] + +{ #category : 'accessing' } +FASTTypeScriptClassBody >> decorator: anObject [ + + - - ^ MooseSpecializedGroup with: self classDeclarationBodyOwner + decorator value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptClassDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptClassDeclaration.class.st index d5c77af..5358447 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptClassDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptClassDeclaration.class.st @@ -7,21 +7,28 @@ |---| | `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| | `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| -| `doBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| | `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| | `programClassDeclarationOwner` | `FASTTypeScriptClassDeclaration` | `classDeclarations` | `FASTTypeScriptProgram` | The program that contains me| | `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | | `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| -| `whileBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | ### Children | Relation | Origin | Opposite | Type | Comment | |---| | `body` | `FASTTypeScriptClassDeclaration` | `classDeclarationBodyOwner` | `FASTTypeScriptClassBody` | The body of the class| | `declarations` | `FASTTypeScriptTWithDeclarations` | `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | The elements I declare| +| `decorator` | `FASTTypeScriptClassDeclaration` | `classDeclarationDecoratorOwner` | `FASTTypeScriptDecorator` | | | `modifiers` | `FASTTypeScriptTWithModifiers` | `tWithModifiersModifiersOwner` | `FASTTypeScriptTModifier` | My modifiers| | `name` | `FASTTypeScriptClassDeclaration` | `classDeclarationNameOwner` | `FASTTypeScriptTypeIdentifier` | The name of the class| +| `type_parameters` | `FASTTypeScriptClassDeclaration` | `classDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | ## Properties @@ -36,12 +43,14 @@ Class { #name : 'FASTTypeScriptClassDeclaration', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTStatement + FASTTypeScriptTDeclaration + FASTTypeScriptTWithDeclarations + FASTTypeScriptTWithModifiers', - #classTraits : 'FASTTStatement classTrait + FASTTypeScriptTDeclaration classTrait + FASTTypeScriptTWithDeclarations classTrait + FASTTypeScriptTWithModifiers classTrait', + #traits : 'FASTTypeScriptTDeclaration + FASTTypeScriptTWithDeclarations + FASTTypeScriptTWithModifiers', + #classTraits : 'FASTTypeScriptTDeclaration classTrait + FASTTypeScriptTWithDeclarations classTrait + FASTTypeScriptTWithModifiers classTrait', #instVars : [ - '#programClassDeclarationOwner => FMOne type: #FASTTypeScriptProgram opposite: #classDeclarations', '#body => FMOne type: #FASTTypeScriptClassBody opposite: #classDeclarationBodyOwner', - '#name => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #classDeclarationNameOwner' + '#decorator => FMMany type: #FASTTypeScriptDecorator opposite: #classDeclarationDecoratorOwner', + '#name => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #classDeclarationNameOwner', + '#programClassDeclarationOwner => FMOne type: #FASTTypeScriptProgram opposite: #classDeclarations', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #classDeclarationTypeParametersOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -51,24 +60,25 @@ Class { { #category : 'meta' } FASTTypeScriptClassDeclaration class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptClassDeclaration class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptClassDeclaration >> addDecorator: anObject [ - self deprecatedAliases: { #FASTTypescriptClass_declaration } - - + + + ^ self decorator add: anObject ] { #category : 'accessing' } FASTTypeScriptClassDeclaration >> body [ "Relation named: #body type: #FASTTypeScriptClassBody opposite: #classDeclarationBodyOwner" + ^ body @@ -77,20 +87,33 @@ FASTTypeScriptClassDeclaration >> body [ { #category : 'accessing' } FASTTypeScriptClassDeclaration >> body: anObject [ + body := anObject ] -{ #category : 'navigation' } -FASTTypeScriptClassDeclaration >> bodyGroup [ +{ #category : 'accessing' } +FASTTypeScriptClassDeclaration >> decorator [ + "Relation named: #decorator type: #FASTTypeScriptDecorator opposite: #classDeclarationDecoratorOwner" + + + + + ^ decorator +] + +{ #category : 'accessing' } +FASTTypeScriptClassDeclaration >> decorator: anObject [ + + - - ^ MooseSpecializedGroup with: self body + decorator value: anObject ] { #category : 'testing' } FASTTypeScriptClassDeclaration >> isClassDeclaration [ + ^ true ] @@ -99,6 +122,7 @@ FASTTypeScriptClassDeclaration >> isClassDeclaration [ FASTTypeScriptClassDeclaration >> name [ "Relation named: #name type: #FASTTypeScriptTypeIdentifier opposite: #classDeclarationNameOwner" + ^ name @@ -107,21 +131,16 @@ FASTTypeScriptClassDeclaration >> name [ { #category : 'accessing' } FASTTypeScriptClassDeclaration >> name: anObject [ + name := anObject ] -{ #category : 'navigation' } -FASTTypeScriptClassDeclaration >> nameGroup [ - - - ^ MooseSpecializedGroup with: self name -] - { #category : 'accessing' } FASTTypeScriptClassDeclaration >> programClassDeclarationOwner [ "Relation named: #programClassDeclarationOwner type: #FASTTypeScriptProgram opposite: #classDeclarations" + @@ -131,13 +150,24 @@ FASTTypeScriptClassDeclaration >> programClassDeclarationOwner [ { #category : 'accessing' } FASTTypeScriptClassDeclaration >> programClassDeclarationOwner: anObject [ + programClassDeclarationOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptClassDeclaration >> programClassDeclarationOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptClassDeclaration >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #classDeclarationTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptClassDeclaration >> type_parameters: anObject [ + + - - ^ MooseSpecializedGroup with: self programClassDeclarationOwner + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptClassHeritage.class.st b/FAST-TypeScript-Model/FASTTypeScriptClassHeritage.class.st index e964583..b5b7931 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptClassHeritage.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptClassHeritage.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptClassHeritage` | `classHeritageOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptClassHeritage', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #classHeritageOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,34 @@ Class { { #category : 'meta' } FASTTypeScriptClassHeritage class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptClassHeritage class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptClassHeritage >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] - self deprecatedAliases: { #FASTTypescriptClass_heritage } - - +{ #category : 'accessing' } +FASTTypeScriptClassHeritage >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #classHeritageOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptClassHeritage >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptClassStaticBlock.class.st b/FAST-TypeScript-Model/FASTTypeScriptClassStaticBlock.class.st index ab37d25..eb21085 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptClassStaticBlock.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptClassStaticBlock.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptClassStaticBlock` | `classStaticBlockBodyOwner` | `FASTTypeScriptStatementBlock` | | + + + +" Class { #name : 'FASTTypeScriptClassStaticBlock', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #classStaticBlockBodyOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptClassStaticBlock class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptClassStaticBlock class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptClassStaticBlock >> body [ + "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #classStaticBlockBodyOwner" - self deprecatedAliases: { #FASTTypescriptClass_static_block } - - + + + ^ body +] + +{ #category : 'accessing' } +FASTTypeScriptClassStaticBlock >> body: anObject [ + + + + body := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptComment.class.st b/FAST-TypeScript-Model/FASTTypeScriptComment.class.st index ba4d244..bbc956d 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptComment.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptComment.class.st @@ -9,14 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptComment class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptComment class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptComment } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptCompilationUnit.class.st b/FAST-TypeScript-Model/FASTTypeScriptCompilationUnit.class.st index 722d8e0..d912f4f 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptCompilationUnit.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptCompilationUnit.class.st @@ -9,21 +9,16 @@ Class { { #category : 'meta' } FASTTypeScriptCompilationUnit class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptCompilationUnit class >> initialize [ - - self deprecatedAliases: { #FASTTypeScriptCompilation_unit } ] { #category : 'testing' } FASTTypeScriptCompilationUnit >> isCompilationUnit [ + ^ true ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptComputedPropertyName.class.st b/FAST-TypeScript-Model/FASTTypeScriptComputedPropertyName.class.st index c36a12c..9603998 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptComputedPropertyName.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptComputedPropertyName.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptComputedPropertyName` | `computedPropertyNameOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptComputedPropertyName', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #computedPropertyNameOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptComputedPropertyName class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptComputedPropertyName class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptComputedPropertyName >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #computedPropertyNameOwner" - self deprecatedAliases: { #FASTTypescriptComputed_property_name } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptComputedPropertyName >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptConditionalType.class.st b/FAST-TypeScript-Model/FASTTypeScriptConditionalType.class.st index 8a96b0b..0d3c265 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptConditionalType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptConditionalType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,47 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ### Children | Relation | Origin | Opposite | Type | Comment | @@ -57,8 +83,8 @@ Class { #name : 'FASTTypeScriptConditionalType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -67,24 +93,17 @@ Class { { #category : 'meta' } FASTTypeScriptConditionalType class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptConditionalType class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptConditional_type } - - ] { #category : 'accessing' } FASTTypeScriptConditionalType >> alternative [ "Relation named: #alternative type: #FASTTExpression opposite: #conditionalTypeAlternativeOwner" + @@ -94,6 +113,7 @@ FASTTypeScriptConditionalType >> alternative [ { #category : 'accessing' } FASTTypeScriptConditionalType >> alternative: anObject [ + (self attributeAt: #alternative ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -105,17 +125,11 @@ FASTTypeScriptConditionalType >> alternative: anObject [ anObject conditionalTypeAlternativeOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptConditionalType >> alternativeGroup [ - - - ^ MooseSpecializedGroup with: self alternative -] - { #category : 'accessing' } FASTTypeScriptConditionalType >> consequence [ "Relation named: #consequence type: #FASTTExpression opposite: #conditionalTypeConsequenceOwner" + @@ -125,6 +139,7 @@ FASTTypeScriptConditionalType >> consequence [ { #category : 'accessing' } FASTTypeScriptConditionalType >> consequence: anObject [ + (self attributeAt: #consequence ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -136,17 +151,11 @@ FASTTypeScriptConditionalType >> consequence: anObject [ anObject conditionalTypeConsequenceOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptConditionalType >> consequenceGroup [ - - - ^ MooseSpecializedGroup with: self consequence -] - { #category : 'accessing' } FASTTypeScriptConditionalType >> left [ "Relation named: #left type: #FASTTExpression opposite: #conditionalTypeLeftOwner" + @@ -156,6 +165,7 @@ FASTTypeScriptConditionalType >> left [ { #category : 'accessing' } FASTTypeScriptConditionalType >> left: anObject [ + (self attributeAt: #left ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -167,17 +177,11 @@ FASTTypeScriptConditionalType >> left: anObject [ anObject conditionalTypeLeftOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptConditionalType >> leftGroup [ - - - ^ MooseSpecializedGroup with: self left -] - { #category : 'accessing' } FASTTypeScriptConditionalType >> right [ "Relation named: #right type: #FASTTExpression opposite: #conditionalTypeRightOwner" + @@ -187,6 +191,7 @@ FASTTypeScriptConditionalType >> right [ { #category : 'accessing' } FASTTypeScriptConditionalType >> right: anObject [ + (self attributeAt: #right ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -197,10 +202,3 @@ FASTTypeScriptConditionalType >> right: anObject [ self attributeAt: #right put: anObject. anObject conditionalTypeRightOwner: self ] ] - -{ #category : 'navigation' } -FASTTypeScriptConditionalType >> rightGroup [ - - - ^ MooseSpecializedGroup with: self right -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptConstraint.class.st b/FAST-TypeScript-Model/FASTTypeScriptConstraint.class.st index eb1029f..7e5f519 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptConstraint.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptConstraint.class.st @@ -1,6 +1,27 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `typeParameterConstraintOwner` | `FASTTypeScriptConstraint` | `constraint` | `FASTTypeScriptTypeParameter` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptConstraint` | `constraintOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptConstraint', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #constraintOwner', + '#typeParameterConstraintOwner => FMOne type: #FASTTypeScriptTypeParameter opposite: #constraint' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +30,44 @@ Class { { #category : 'meta' } FASTTypeScriptConstraint class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptConstraint class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptConstraint >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #constraintOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptConstraint >> childrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptConstraint } + + + childrenNode := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptConstraint >> typeParameterConstraintOwner [ + "Relation named: #typeParameterConstraintOwner type: #FASTTypeScriptTypeParameter opposite: #constraint" + + + + + + ^ typeParameterConstraintOwner +] + +{ #category : 'accessing' } +FASTTypeScriptConstraint >> typeParameterConstraintOwner: anObject [ + + + + typeParameterConstraintOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptConstructSignature.class.st b/FAST-TypeScript-Model/FASTTypeScriptConstructSignature.class.st index 53946ce..9a512ba 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptConstructSignature.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptConstructSignature.class.st @@ -1,6 +1,25 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `parameters` | `FASTTypeScriptConstructSignature` | `constructSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | | +| `type` | `FASTTypeScriptConstructSignature` | `constructSignatureTypeOwner` | `FASTTypeScriptTypeAnnotation` | | +| `type_parameters` | `FASTTypeScriptConstructSignature` | `constructSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | + + + +" Class { #name : 'FASTTypeScriptConstructSignature', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #constructSignatureParametersOwner', + '#type => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #constructSignatureTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #constructSignatureTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +28,59 @@ Class { { #category : 'meta' } FASTTypeScriptConstructSignature class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptConstructSignature class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptConstructSignature >> parameters [ + "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #constructSignatureParametersOwner" + + + + ^ parameters +] - self deprecatedAliases: { #FASTTypescriptConstruct_signature } - - +{ #category : 'accessing' } +FASTTypeScriptConstructSignature >> parameters: anObject [ + + + + parameters := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptConstructSignature >> type [ + "Relation named: #type type: #FASTTypeScriptTypeAnnotation opposite: #constructSignatureTypeOwner" + + + + ^ type +] + +{ #category : 'accessing' } +FASTTypeScriptConstructSignature >> type: anObject [ + + + + type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptConstructSignature >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #constructSignatureTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptConstructSignature >> type_parameters: anObject [ + + + + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptConstructorType.class.st b/FAST-TypeScript-Model/FASTTypeScriptConstructorType.class.st index 043fd2f..c8a73d9 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptConstructorType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptConstructorType.class.st @@ -2,21 +2,91 @@ ## Relations ====================== +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + ### Children | Relation | Origin | Opposite | Type | Comment | |---| | `parameters` | `FASTTypeScriptConstructorType` | `constructorTypeParametersOwner` | `FASTTypeScriptFormalParameters` | My parameters| -| `type` | `FASTTypeScriptConstructorType` | `constructorTypeTypeOwner` | `FASTTypeScriptTypeIdentifier` | My type as type identifier| +| `type` | `FASTTypeScriptConstructorType` | `constructorTypeTypeOwner` | `FASTTExpression` | My type as type identifier| +| `type_parameters` | `FASTTypeScriptConstructorType` | `constructorTypeTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | " Class { #name : 'FASTTypeScriptConstructorType', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTType classTrait', #instVars : [ - '#type => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #constructorTypeTypeOwner', - '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #constructorTypeParametersOwner' + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #constructorTypeParametersOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #constructorTypeTypeParametersOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -26,24 +96,17 @@ Class { { #category : 'meta' } FASTTypeScriptConstructorType class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptConstructorType class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptConstructor_type } - - ] { #category : 'accessing' } FASTTypeScriptConstructorType >> parameters [ "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #constructorTypeParametersOwner" + ^ parameters @@ -52,36 +115,50 @@ FASTTypeScriptConstructorType >> parameters [ { #category : 'accessing' } FASTTypeScriptConstructorType >> parameters: anObject [ + parameters := anObject ] -{ #category : 'navigation' } -FASTTypeScriptConstructorType >> parametersGroup [ - - - ^ MooseSpecializedGroup with: self parameters -] - { #category : 'accessing' } FASTTypeScriptConstructorType >> type [ - "Relation named: #type type: #FASTTypeScriptTypeIdentifier opposite: #constructorTypeTypeOwner" + "Relation named: #type type: #FASTTExpression opposite: #constructorTypeTypeOwner" + - ^ type + + ^ self attributeAt: #type ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptConstructorType >> type: anObject [ + - type := anObject + (self attributeAt: #type ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self type. + self attributeAt: #type put: anObject. + otherSide constructorTypeTypeOwner: nil ] + ifNotNil: [ + self attributeAt: #type put: anObject. + anObject constructorTypeTypeOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptConstructorType >> typeGroup [ +{ #category : 'accessing' } +FASTTypeScriptConstructorType >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #constructorTypeTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptConstructorType >> type_parameters: anObject [ + + - - ^ MooseSpecializedGroup with: self type + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptContinueStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptContinueStatement.class.st index fa1887e..3cb3a0c 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptContinueStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptContinueStatement.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `label` | `FASTTypeScriptContinueStatement` | `continueStatementLabelOwner` | `FASTTypeScriptStatementIdentifier` | | + + + +" Class { #name : 'FASTTypeScriptContinueStatement', #superclass : 'FASTTypeScriptStatement', + #instVars : [ + '#label => FMOne type: #FASTTypeScriptStatementIdentifier opposite: #continueStatementLabelOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptContinueStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptContinueStatement class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptContinueStatement >> label [ + "Relation named: #label type: #FASTTypeScriptStatementIdentifier opposite: #continueStatementLabelOwner" - self deprecatedAliases: { #FASTTypescriptContinue_statement } - - + + + ^ label +] + +{ #category : 'accessing' } +FASTTypeScriptContinueStatement >> label: anObject [ + + + + label := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptDebuggerStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptDebuggerStatement.class.st index 9b8c0fd..4272597 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptDebuggerStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptDebuggerStatement.class.st @@ -9,17 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptDebuggerStatement class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptDebuggerStatement class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptDebugger_statement } - - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptDecorator.class.st b/FAST-TypeScript-Model/FASTTypeScriptDecorator.class.st index ce6e236..de6d718 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptDecorator.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptDecorator.class.st @@ -1,6 +1,39 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `classBodyDecoratorOwner` | `FASTTypeScriptDecorator` | `decorator` | `FASTTypeScriptClassBody` | | +| `classDeclarationDecoratorOwner` | `FASTTypeScriptDecorator` | `decorator` | `FASTTypeScriptClassDeclaration` | | +| `classDecoratorOwner` | `FASTTypeScriptDecorator` | `decorator` | `FASTTypeScriptClass` | | +| `exportStatementDecoratorOwner` | `FASTTypeScriptDecorator` | `decorator` | `FASTTypeScriptExportStatement` | | +| `optionalParameterDecoratorOwner` | `FASTTypeScriptDecorator` | `decorator` | `FASTTypeScriptOptionalParameter` | | +| `publicFieldDefinitionDecoratorOwner` | `FASTTypeScriptDecorator` | `decorator` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterDecoratorOwner` | `FASTTypeScriptDecorator` | `decorator` | `FASTTypeScriptRequiredParameter` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptDecorator` | `decoratorOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptDecorator', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #decoratorOwner', + '#classBodyDecoratorOwner => FMOne type: #FASTTypeScriptClassBody opposite: #decorator', + '#classDeclarationDecoratorOwner => FMOne type: #FASTTypeScriptClassDeclaration opposite: #decorator', + '#classDecoratorOwner => FMOne type: #FASTTypeScriptClass opposite: #decorator', + '#exportStatementDecoratorOwner => FMOne type: #FASTTypeScriptExportStatement opposite: #decorator', + '#optionalParameterDecoratorOwner => FMOne type: #FASTTypeScriptOptionalParameter opposite: #decorator', + '#publicFieldDefinitionDecoratorOwner => FMOne type: #FASTTypeScriptPublicFieldDefinition opposite: #decorator', + '#requiredParameterDecoratorOwner => FMOne type: #FASTTypeScriptRequiredParameter opposite: #decorator' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +42,151 @@ Class { { #category : 'meta' } FASTTypeScriptDecorator class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptDecorator class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptDecorator >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #decoratorOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> childrenNode: anObject [ + + + + childrenNode := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> classBodyDecoratorOwner [ + "Relation named: #classBodyDecoratorOwner type: #FASTTypeScriptClassBody opposite: #decorator" + + + + + ^ classBodyDecoratorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> classBodyDecoratorOwner: anObject [ + + + + classBodyDecoratorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> classDeclarationDecoratorOwner [ + "Relation named: #classDeclarationDecoratorOwner type: #FASTTypeScriptClassDeclaration opposite: #decorator" + + + + + ^ classDeclarationDecoratorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> classDeclarationDecoratorOwner: anObject [ + + + + classDeclarationDecoratorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> classDecoratorOwner [ + "Relation named: #classDecoratorOwner type: #FASTTypeScriptClass opposite: #decorator" + + + + + ^ classDecoratorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> classDecoratorOwner: anObject [ - self deprecatedAliases: { #FASTTypescriptDecorator } + + + classDecoratorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> exportStatementDecoratorOwner [ + "Relation named: #exportStatementDecoratorOwner type: #FASTTypeScriptExportStatement opposite: #decorator" + + + + + ^ exportStatementDecoratorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> exportStatementDecoratorOwner: anObject [ + + + + exportStatementDecoratorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> optionalParameterDecoratorOwner [ + "Relation named: #optionalParameterDecoratorOwner type: #FASTTypeScriptOptionalParameter opposite: #decorator" + + + + + ^ optionalParameterDecoratorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> optionalParameterDecoratorOwner: anObject [ + + + + optionalParameterDecoratorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> publicFieldDefinitionDecoratorOwner [ + "Relation named: #publicFieldDefinitionDecoratorOwner type: #FASTTypeScriptPublicFieldDefinition opposite: #decorator" + + + + + ^ publicFieldDefinitionDecoratorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> publicFieldDefinitionDecoratorOwner: anObject [ + + + + publicFieldDefinitionDecoratorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> requiredParameterDecoratorOwner [ + "Relation named: #requiredParameterDecoratorOwner type: #FASTTypeScriptRequiredParameter opposite: #decorator" + + + + + ^ requiredParameterDecoratorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptDecorator >> requiredParameterDecoratorOwner: anObject [ + + + + requiredParameterDecoratorOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptDefaultType.class.st b/FAST-TypeScript-Model/FASTTypeScriptDefaultType.class.st index 6bc7fce..2f463b2 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptDefaultType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptDefaultType.class.st @@ -1,6 +1,27 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `typeParameterValueOwner` | `FASTTypeScriptDefaultType` | `value` | `FASTTypeScriptTypeParameter` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptDefaultType` | `defaultTypeOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptDefaultType', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #defaultTypeOwner', + '#typeParameterValueOwner => FMOne type: #FASTTypeScriptTypeParameter opposite: #value' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +30,44 @@ Class { { #category : 'meta' } FASTTypeScriptDefaultType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptDefaultType class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptDefaultType >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #defaultTypeOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptDefaultType >> childrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptDefault_type } - - + + + childrenNode := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptDefaultType >> typeParameterValueOwner [ + "Relation named: #typeParameterValueOwner type: #FASTTypeScriptTypeParameter opposite: #value" + + + + + + ^ typeParameterValueOwner +] + +{ #category : 'accessing' } +FASTTypeScriptDefaultType >> typeParameterValueOwner: anObject [ + + + + typeParameterValueOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptDoStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptDoStatement.class.st index 6f4629c..fe5fb52 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptDoStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptDoStatement.class.st @@ -5,8 +5,8 @@ ### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `body` | `FASTTypeScriptDoStatement` | `doBodyOwner` | `FASTTStatement` | | -| `condition` | `FASTTypeScriptDoStatement` | `doConditionOwner` | `FASTTypeScriptParenthesizedExpression` | | +| `body` | `FASTTypeScriptDoStatement` | `doStatementBodyOwner` | `FASTTStatement` | | +| `condition` | `FASTTypeScriptDoStatement` | `doStatementConditionOwner` | `FASTTypeScriptParenthesizedExpression` | | @@ -15,7 +15,7 @@ Class { #name : 'FASTTypeScriptDoStatement', #superclass : 'FASTTypeScriptStatement', #instVars : [ - '#condition => FMOne type: #FASTTypeScriptParenthesizedExpression opposite: #doConditionOwner' + '#condition => FMOne type: #FASTTypeScriptParenthesizedExpression opposite: #doStatementConditionOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -25,54 +25,42 @@ Class { { #category : 'meta' } FASTTypeScriptDoStatement class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptDoStatement class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptDo_statement } - - ] { #category : 'accessing' } FASTTypeScriptDoStatement >> body [ - "Relation named: #body type: #FASTTStatement opposite: #doBodyOwner" + "Relation named: #body type: #FASTTStatement opposite: #doStatementBodyOwner" + - + ^ self attributeAt: #body ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptDoStatement >> body: anObject [ + (self attributeAt: #body ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self body. self attributeAt: #body put: anObject. - otherSide doBodyOwner: nil ] + otherSide doStatementBodyOwner: nil ] ifNotNil: [ self attributeAt: #body put: anObject. - anObject doBodyOwner: self ] -] - -{ #category : 'navigation' } -FASTTypeScriptDoStatement >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body + anObject doStatementBodyOwner: self ] ] { #category : 'accessing' } FASTTypeScriptDoStatement >> condition [ - "Relation named: #condition type: #FASTTypeScriptParenthesizedExpression opposite: #doConditionOwner" + "Relation named: #condition type: #FASTTypeScriptParenthesizedExpression opposite: #doStatementConditionOwner" + ^ condition ] @@ -80,13 +68,7 @@ FASTTypeScriptDoStatement >> condition [ { #category : 'accessing' } FASTTypeScriptDoStatement >> condition: anObject [ + condition := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptDoStatement >> conditionGroup [ - - - ^ MooseSpecializedGroup with: self condition -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptERROR.class.st b/FAST-TypeScript-Model/FASTTypeScriptERROR.class.st index 18fc0d4..3af0418 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptERROR.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptERROR.class.st @@ -29,14 +29,8 @@ Class { { #category : 'meta' } FASTTypeScriptERROR class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptERROR class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptERROR } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptElseClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptElseClause.class.st index 35f2f73..40616e7 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptElseClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptElseClause.class.st @@ -7,6 +7,11 @@ |---| | `ifStatementAlternativeOwner` | `FASTTypeScriptElseClause` | `alternative` | `FASTTypeScriptIfStatement` | | +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptElseClause` | `elseClauseOwner` | `FASTTypeScriptEntity` | | + " @@ -14,6 +19,7 @@ Class { #name : 'FASTTypeScriptElseClause', #superclass : 'FASTTypeScriptEntity', #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #elseClauseOwner', '#ifStatementAlternativeOwner => FMOne type: #FASTTypeScriptIfStatement opposite: #alternative' ], #category : 'FAST-TypeScript-Model-Entities', @@ -24,26 +30,34 @@ Class { { #category : 'meta' } FASTTypeScriptElseClause class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptElseClause class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptElseClause >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #elseClauseOwner" - self deprecatedAliases: { #FASTTypescriptElse_clause} + + + ^ childrenNode +] +{ #category : 'accessing' } +FASTTypeScriptElseClause >> childrenNode: anObject [ - - + + + childrenNode := anObject ] { #category : 'accessing' } FASTTypeScriptElseClause >> ifStatementAlternativeOwner [ "Relation named: #ifStatementAlternativeOwner type: #FASTTypeScriptIfStatement opposite: #alternative" + @@ -53,13 +67,7 @@ FASTTypeScriptElseClause >> ifStatementAlternativeOwner [ { #category : 'accessing' } FASTTypeScriptElseClause >> ifStatementAlternativeOwner: anObject [ + ifStatementAlternativeOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptElseClause >> ifStatementAlternativeOwnerGroup [ - - - ^ MooseSpecializedGroup with: self ifStatementAlternativeOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptEmptyStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptEmptyStatement.class.st index 2ff694b..e7c1e28 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptEmptyStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptEmptyStatement.class.st @@ -9,16 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptEmptyStatement class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptEmptyStatement class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptEmpty_statement } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptEntity.class.st b/FAST-TypeScript-Model/FASTTypeScriptEntity.class.st index c834be1..8255ed8 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptEntity.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptEntity.class.st @@ -5,18 +5,119 @@ ### Parents | Relation | Origin | Opposite | Type | Comment | |---| +| `abstractMethodSignatureNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptAbstractMethodSignature` | | +| `abstractMethodSignatureReturnTypeOwner` | `FASTTypeScriptEntity` | `return_type` | `FASTTypeScriptAbstractMethodSignature` | | +| `addingTypeAnnotationOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptAddingTypeAnnotation` | | +| `ambientDeclarationOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptAmbientDeclaration` | | | `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrayOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptArray` | | +| `arrayPatternOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptArrayPattern` | | +| `arrayTypeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptArrayType` | | | `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `arrowFunctionReturnTypeOwner` | `FASTTypeScriptEntity` | `return_type` | `FASTTypeScriptArrowFunction` | | +| `asExpressionOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptAsExpression` | | +| `assertsAnnotationOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptAssertsAnnotation` | | +| `assertsOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptAsserts` | | +| `augmentedAssignmentExpressionOperatorOwner` | `FASTTypeScriptEntity` | `operator` | `FASTTypeScriptAugmentedAssignmentExpression` | | +| `awaitExpressionOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptAwaitExpression` | | +| `binaryExpressionOperatorOwner` | `FASTTypeScriptEntity` | `operator` | `FASTTypeScriptBinaryExpression` | | +| `callExpressionArgumentsOwner` | `FASTTypeScriptEntity` | `arguments` | `FASTTypeScriptCallExpression` | | +| `callExpressionFunctionOwner` | `FASTTypeScriptEntity` | `function` | `FASTTypeScriptCallExpression` | | +| `callSignatureReturnTypeOwner` | `FASTTypeScriptEntity` | `return_type` | `FASTTypeScriptCallSignature` | | +| `catchClauseParameterOwner` | `FASTTypeScriptEntity` | `parameter` | `FASTTypeScriptCatchClause` | | +| `classHeritageOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptClassHeritage` | | +| `computedPropertyNameOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptComputedPropertyName` | | +| `constraintOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptConstraint` | | +| `decoratorOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptDecorator` | | +| `defaultTypeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptDefaultType` | | +| `elseClauseOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptElseClause` | | +| `enumAssignmentNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptEnumAssignment` | | +| `enumBodyNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptEnumBody` | | +| `exportClauseOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptExportClause` | | +| `expressionStatementOwner` | `FASTTypeScriptEntity` | `expression` | `FASTTypeScriptExpressionStatement` | | +| `flowMaybeTypeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptFlowMaybeType` | | +| `forInStatementKindOwner` | `FASTTypeScriptEntity` | `kind` | `FASTTypeScriptForInStatement` | | +| `forInStatementOperatorOwner` | `FASTTypeScriptEntity` | `operator` | `FASTTypeScriptForInStatement` | | +| `forStatementConditionOwner` | `FASTTypeScriptEntity` | `condition` | `FASTTypeScriptForStatement` | | +| `forStatementIncrementOwner` | `FASTTypeScriptEntity` | `increment` | `FASTTypeScriptForStatement` | | +| `forStatementInitializerOwner` | `FASTTypeScriptEntity` | `initializer` | `FASTTypeScriptForStatement` | | +| `functionExpressionReturnTypeOwner` | `FASTTypeScriptEntity` | `return_type` | `FASTTypeScriptFunctionExpression` | | +| `functionSignatureReturnTypeOwner` | `FASTTypeScriptEntity` | `return_type` | `FASTTypeScriptFunctionSignature` | | +| `generatorFunctionDeclarationReturnTypeOwner` | `FASTTypeScriptEntity` | `return_type` | `FASTTypeScriptGeneratorFunctionDeclaration` | | +| `generatorFunctionReturnTypeOwner` | `FASTTypeScriptEntity` | `return_type` | `FASTTypeScriptGeneratorFunction` | | | `genericParent` | `FASTTypeScriptEntity` | `genericChildren` | `FASTTypeScriptEntity` | | +| `implementsClauseOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptImplementsClause` | | +| `importAliasOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptImportAlias` | | +| `importAttributeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptImportAttribute` | | +| `importClauseOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptImportClause` | | +| `indexSignatureSignOwner` | `FASTTypeScriptEntity` | `sign` | `FASTTypeScriptIndexSignature` | | +| `indexTypeQueryOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptIndexTypeQuery` | | +| `inferTypeOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptInferType` | | +| `instantiationExpressionFunctionOwner` | `FASTTypeScriptEntity` | `function` | `FASTTypeScriptInstantiationExpression` | | +| `interfaceBodyOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptInterfaceBody` | | +| `internalModuleNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptInternalModule` | | +| `intersectionTypeOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptIntersectionType` | | +| `lexicalDeclarationKindOwner` | `FASTTypeScriptEntity` | `kind` | `FASTTypeScriptLexicalDeclaration` | | +| `literalTypeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptLiteralType` | | +| `lookupTypeOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptLookupType` | | +| `methodSignatureNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptMethodSignature` | | +| `methodSignatureReturnTypeOwner` | `FASTTypeScriptEntity` | `return_type` | `FASTTypeScriptMethodSignature` | | +| `moduleNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptModule` | | +| `namedImportsOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptNamedImports` | | +| `namespaceExportOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptNamespaceExport` | | +| `namespaceImportOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptNamespaceImport` | | +| `nestedTypeIdentifierModuleOwner` | `FASTTypeScriptEntity` | `module` | `FASTTypeScriptNestedTypeIdentifier` | | +| `nonNullExpressionOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptNonNullExpression` | | +| `objectAssignmentPatternLeftOwner` | `FASTTypeScriptEntity` | `left` | `FASTTypeScriptObjectAssignmentPattern` | | +| `objectOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptObject` | | +| `objectPatternOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptObjectPattern` | | +| `objectTypeOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptObjectType` | | +| `omittingTypeAnnotationOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptOmittingTypeAnnotation` | | +| `optingTypeAnnotationOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptOptingTypeAnnotation` | | +| `optionalTypeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptOptionalType` | | +| `pairKeyOwner` | `FASTTypeScriptEntity` | `key` | `FASTTypeScriptPair` | | +| `pairPatternKeyOwner` | `FASTTypeScriptEntity` | `key` | `FASTTypeScriptPairPattern` | | +| `pairPatternValueOwner` | `FASTTypeScriptEntity` | `value` | `FASTTypeScriptPairPattern` | | | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| -| `valueParent` | `FASTTypeScriptEntity` | `value` | `FASTTypeScriptEntity` | | +| `parenthesizedTypeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptParenthesizedType` | | +| `programOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptProgram` | | +| `propertySignatureNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptPropertySignature` | | +| `publicFieldDefinitionNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptPublicFieldDefinition` | | +| `readonlyTypeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptReadonlyType` | | +| `requiredParameterNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptRequiredParameter` | | +| `restPatternOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptRestPattern` | | +| `restTypeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptRestType` | | +| `returnStatementOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptReturnStatement` | | +| `satisfiesExpressionOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptSatisfiesExpression` | | +| `sequenceExpressionOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptSequenceExpression` | | +| `spreadElementOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptSpreadElement` | | +| `statementBlockOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptStatementBlock` | | +| `stringOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptString` | | +| `switchBodyOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptSwitchBody` | | +| `switchCaseValueOwner` | `FASTTypeScriptEntity` | `value` | `FASTTypeScriptSwitchCase` | | +| `templateLiteralTypeOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptTemplateLiteralType` | | +| `templateStringOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptTemplateString` | | +| `templateSubstitutionOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptTemplateSubstitution` | | +| `templateTypeOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptTemplateType` | | +| `throwStatementOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptThrowStatement` | | +| `tupleTypeOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptTupleType` | | +| `typeAnnotationOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptTypeAnnotation` | | +| `typeArgumentsOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptTypeArguments` | | +| `typeAssertionOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptTypeAssertion` | | +| `typeParametersOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptTypeParameters` | | +| `typeQueryOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptTypeQuery` | | +| `unaryExpressionOperatorOwner` | `FASTTypeScriptEntity` | `operator` | `FASTTypeScriptUnaryExpression` | | +| `unionTypeOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptUnionType` | | +| `updateExpressionOperatorOwner` | `FASTTypeScriptEntity` | `operator` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclarationOwner` | `FASTTypeScriptEntity` | `childrenNodes` | `FASTTypeScriptVariableDeclaration` | | +| `variableDeclaratorNameOwner` | `FASTTypeScriptEntity` | `name` | `FASTTypeScriptVariableDeclarator` | | +| `yieldExpressionOwner` | `FASTTypeScriptEntity` | `childrenNode` | `FASTTypeScriptYieldExpression` | | ### Children | Relation | Origin | Opposite | Type | Comment | |---| | `comments` | `FASTTWithComments` | `container` | `FASTTComment` | list of comments defined in the entity| | `genericChildren` | `FASTTypeScriptEntity` | `genericParent` | `FASTTypeScriptEntity` | | -| `value` | `FASTTypeScriptEntity` | `valueParent` | `FASTTypeScriptEntity` | | ## Properties @@ -31,13 +132,114 @@ Class { #name : 'FASTTypeScriptEntity', #superclass : 'MooseEntity', - #traits : 'FASTTEntity + FASTTWithComments', - #classTraits : 'FASTTEntity classTrait + FASTTWithComments classTrait', + #traits : 'FASTTEntity + FASTTWithComments + TEntityMetaLevelDependency', + #classTraits : 'FASTTEntity classTrait + FASTTWithComments classTrait + TEntityMetaLevelDependency classTrait', #instVars : [ + '#abstractMethodSignatureNameOwner => FMOne type: #FASTTypeScriptAbstractMethodSignature opposite: #name', + '#abstractMethodSignatureReturnTypeOwner => FMOne type: #FASTTypeScriptAbstractMethodSignature opposite: #return_type', + '#addingTypeAnnotationOwner => FMOne type: #FASTTypeScriptAddingTypeAnnotation opposite: #childrenNode', + '#ambientDeclarationOwner => FMOne type: #FASTTypeScriptAmbientDeclaration opposite: #childrenNodes', + '#arrayOwner => FMOne type: #FASTTypeScriptArray opposite: #childrenNodes', + '#arrayPatternOwner => FMOne type: #FASTTypeScriptArrayPattern opposite: #childrenNodes', + '#arrayTypeOwner => FMOne type: #FASTTypeScriptArrayType opposite: #childrenNode', + '#arrowFunctionReturnTypeOwner => FMOne type: #FASTTypeScriptArrowFunction opposite: #return_type', + '#asExpressionOwner => FMOne type: #FASTTypeScriptAsExpression opposite: #childrenNodes', + '#assertsAnnotationOwner => FMOne type: #FASTTypeScriptAssertsAnnotation opposite: #childrenNode', + '#assertsOwner => FMOne type: #FASTTypeScriptAsserts opposite: #childrenNode', + '#augmentedAssignmentExpressionOperatorOwner => FMOne type: #FASTTypeScriptAugmentedAssignmentExpression opposite: #operator', + '#awaitExpressionOwner => FMOne type: #FASTTypeScriptAwaitExpression opposite: #childrenNode', + '#binaryExpressionOperatorOwner => FMOne type: #FASTTypeScriptBinaryExpression opposite: #operator', + '#callExpressionArgumentsOwner => FMOne type: #FASTTypeScriptCallExpression opposite: #arguments', + '#callExpressionFunctionOwner => FMOne type: #FASTTypeScriptCallExpression opposite: #function', + '#callSignatureReturnTypeOwner => FMOne type: #FASTTypeScriptCallSignature opposite: #return_type', + '#catchClauseParameterOwner => FMOne type: #FASTTypeScriptCatchClause opposite: #parameter', + '#classHeritageOwner => FMOne type: #FASTTypeScriptClassHeritage opposite: #childrenNodes', + '#computedPropertyNameOwner => FMOne type: #FASTTypeScriptComputedPropertyName opposite: #childrenNode', + '#constraintOwner => FMOne type: #FASTTypeScriptConstraint opposite: #childrenNode', + '#decoratorOwner => FMOne type: #FASTTypeScriptDecorator opposite: #childrenNode', + '#defaultTypeOwner => FMOne type: #FASTTypeScriptDefaultType opposite: #childrenNode', + '#elseClauseOwner => FMOne type: #FASTTypeScriptElseClause opposite: #childrenNode', + '#enumAssignmentNameOwner => FMOne type: #FASTTypeScriptEnumAssignment opposite: #name', + '#enumBodyNameOwner => FMOne type: #FASTTypeScriptEnumBody opposite: #name', + '#exportClauseOwner => FMOne type: #FASTTypeScriptExportClause opposite: #childrenNodes', + '#expressionStatementOwner => FMOne type: #FASTTypeScriptExpressionStatement opposite: #expression', + '#flowMaybeTypeOwner => FMOne type: #FASTTypeScriptFlowMaybeType opposite: #childrenNode', + '#forInStatementKindOwner => FMOne type: #FASTTypeScriptForInStatement opposite: #kind', + '#forInStatementOperatorOwner => FMOne type: #FASTTypeScriptForInStatement opposite: #operator', + '#forStatementConditionOwner => FMOne type: #FASTTypeScriptForStatement opposite: #condition', + '#forStatementIncrementOwner => FMOne type: #FASTTypeScriptForStatement opposite: #increment', + '#forStatementInitializerOwner => FMOne type: #FASTTypeScriptForStatement opposite: #initializer', + '#functionExpressionReturnTypeOwner => FMOne type: #FASTTypeScriptFunctionExpression opposite: #return_type', + '#functionSignatureReturnTypeOwner => FMOne type: #FASTTypeScriptFunctionSignature opposite: #return_type', + '#generatorFunctionDeclarationReturnTypeOwner => FMOne type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #return_type', + '#generatorFunctionReturnTypeOwner => FMOne type: #FASTTypeScriptGeneratorFunction opposite: #return_type', '#genericChildren => FMMany type: #FASTTypeScriptEntity opposite: #genericParent', '#genericParent => FMOne type: #FASTTypeScriptEntity opposite: #genericChildren', - '#value => FMMany type: #FASTTypeScriptEntity opposite: #valueParent', - '#valueParent => FMOne type: #FASTTypeScriptEntity opposite: #value' + '#implementsClauseOwner => FMOne type: #FASTTypeScriptImplementsClause opposite: #childrenNodes', + '#importAliasOwner => FMOne type: #FASTTypeScriptImportAlias opposite: #childrenNodes', + '#importAttributeOwner => FMOne type: #FASTTypeScriptImportAttribute opposite: #childrenNode', + '#importClauseOwner => FMOne type: #FASTTypeScriptImportClause opposite: #childrenNodes', + '#indexSignatureSignOwner => FMOne type: #FASTTypeScriptIndexSignature opposite: #sign', + '#indexTypeQueryOwner => FMOne type: #FASTTypeScriptIndexTypeQuery opposite: #childrenNode', + '#inferTypeOwner => FMOne type: #FASTTypeScriptInferType opposite: #childrenNodes', + '#instantiationExpressionFunctionOwner => FMOne type: #FASTTypeScriptInstantiationExpression opposite: #function', + '#interfaceBodyOwner => FMOne type: #FASTTypeScriptInterfaceBody opposite: #childrenNodes', + '#internalModuleNameOwner => FMOne type: #FASTTypeScriptInternalModule opposite: #name', + '#intersectionTypeOwner => FMOne type: #FASTTypeScriptIntersectionType opposite: #childrenNodes', + '#lexicalDeclarationKindOwner => FMOne type: #FASTTypeScriptLexicalDeclaration opposite: #kind', + '#literalTypeOwner => FMOne type: #FASTTypeScriptLiteralType opposite: #childrenNode', + '#lookupTypeOwner => FMOne type: #FASTTypeScriptLookupType opposite: #childrenNodes', + '#methodSignatureNameOwner => FMOne type: #FASTTypeScriptMethodSignature opposite: #name', + '#methodSignatureReturnTypeOwner => FMOne type: #FASTTypeScriptMethodSignature opposite: #return_type', + '#moduleNameOwner => FMOne type: #FASTTypeScriptModule opposite: #name', + '#namedImportsOwner => FMOne type: #FASTTypeScriptNamedImports opposite: #childrenNodes', + '#namespaceExportOwner => FMOne type: #FASTTypeScriptNamespaceExport opposite: #childrenNode', + '#namespaceImportOwner => FMOne type: #FASTTypeScriptNamespaceImport opposite: #childrenNode', + '#nestedTypeIdentifierModuleOwner => FMOne type: #FASTTypeScriptNestedTypeIdentifier opposite: #module', + '#nonNullExpressionOwner => FMOne type: #FASTTypeScriptNonNullExpression opposite: #childrenNode', + '#objectAssignmentPatternLeftOwner => FMOne type: #FASTTypeScriptObjectAssignmentPattern opposite: #left', + '#objectOwner => FMOne type: #FASTTypeScriptObject opposite: #childrenNodes', + '#objectPatternOwner => FMOne type: #FASTTypeScriptObjectPattern opposite: #childrenNodes', + '#objectTypeOwner => FMOne type: #FASTTypeScriptObjectType opposite: #childrenNodes', + '#omittingTypeAnnotationOwner => FMOne type: #FASTTypeScriptOmittingTypeAnnotation opposite: #childrenNode', + '#optingTypeAnnotationOwner => FMOne type: #FASTTypeScriptOptingTypeAnnotation opposite: #childrenNode', + '#optionalTypeOwner => FMOne type: #FASTTypeScriptOptionalType opposite: #childrenNode', + '#pairKeyOwner => FMOne type: #FASTTypeScriptPair opposite: #key', + '#pairPatternKeyOwner => FMOne type: #FASTTypeScriptPairPattern opposite: #key', + '#pairPatternValueOwner => FMOne type: #FASTTypeScriptPairPattern opposite: #value', + '#parenthesizedTypeOwner => FMOne type: #FASTTypeScriptParenthesizedType opposite: #childrenNode', + '#programOwner => FMOne type: #FASTTypeScriptProgram opposite: #childrenNodes', + '#propertySignatureNameOwner => FMOne type: #FASTTypeScriptPropertySignature opposite: #name', + '#publicFieldDefinitionNameOwner => FMOne type: #FASTTypeScriptPublicFieldDefinition opposite: #name', + '#readonlyTypeOwner => FMOne type: #FASTTypeScriptReadonlyType opposite: #childrenNode', + '#requiredParameterNameOwner => FMOne type: #FASTTypeScriptRequiredParameter opposite: #name', + '#restPatternOwner => FMOne type: #FASTTypeScriptRestPattern opposite: #childrenNode', + '#restTypeOwner => FMOne type: #FASTTypeScriptRestType opposite: #childrenNode', + '#returnStatementOwner => FMOne type: #FASTTypeScriptReturnStatement opposite: #childrenNode', + '#satisfiesExpressionOwner => FMOne type: #FASTTypeScriptSatisfiesExpression opposite: #childrenNodes', + '#sequenceExpressionOwner => FMOne type: #FASTTypeScriptSequenceExpression opposite: #childrenNodes', + '#spreadElementOwner => FMOne type: #FASTTypeScriptSpreadElement opposite: #childrenNode', + '#statementBlockOwner => FMOne type: #FASTTypeScriptStatementBlock opposite: #childrenNodes', + '#stringOwner => FMOne type: #FASTTypeScriptString opposite: #childrenNodes', + '#switchBodyOwner => FMOne type: #FASTTypeScriptSwitchBody opposite: #childrenNodes', + '#switchCaseValueOwner => FMOne type: #FASTTypeScriptSwitchCase opposite: #value', + '#templateLiteralTypeOwner => FMOne type: #FASTTypeScriptTemplateLiteralType opposite: #childrenNodes', + '#templateStringOwner => FMOne type: #FASTTypeScriptTemplateString opposite: #childrenNodes', + '#templateSubstitutionOwner => FMOne type: #FASTTypeScriptTemplateSubstitution opposite: #childrenNode', + '#templateTypeOwner => FMOne type: #FASTTypeScriptTemplateType opposite: #childrenNode', + '#throwStatementOwner => FMOne type: #FASTTypeScriptThrowStatement opposite: #childrenNode', + '#tupleTypeOwner => FMOne type: #FASTTypeScriptTupleType opposite: #childrenNodes', + '#typeAnnotationOwner => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #childrenNode', + '#typeArgumentsOwner => FMOne type: #FASTTypeScriptTypeArguments opposite: #childrenNodes', + '#typeAssertionOwner => FMOne type: #FASTTypeScriptTypeAssertion opposite: #childrenNodes', + '#typeParametersOwner => FMOne type: #FASTTypeScriptTypeParameters opposite: #childrenNodes', + '#typeQueryOwner => FMOne type: #FASTTypeScriptTypeQuery opposite: #childrenNode', + '#unaryExpressionOperatorOwner => FMOne type: #FASTTypeScriptUnaryExpression opposite: #operator', + '#unionTypeOwner => FMOne type: #FASTTypeScriptUnionType opposite: #childrenNodes', + '#updateExpressionOperatorOwner => FMOne type: #FASTTypeScriptUpdateExpression opposite: #operator', + '#variableDeclarationOwner => FMOne type: #FASTTypeScriptVariableDeclaration opposite: #childrenNodes', + '#variableDeclaratorNameOwner => FMOne type: #FASTTypeScriptVariableDeclarator opposite: #name', + '#yieldExpressionOwner => FMOne type: #FASTTypeScriptYieldExpression opposite: #childrenNode' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -47,22 +249,17 @@ Class { { #category : 'meta' } FASTTypeScriptEntity class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptEntity class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptEntity } ] { #category : 'testing' } FASTTypeScriptEntity class >> isAbstract [ + ^ self == FASTTypeScriptEntity ] @@ -70,187 +267,2063 @@ FASTTypeScriptEntity class >> isAbstract [ { #category : 'meta' } FASTTypeScriptEntity class >> metamodel [ + ^ FASTTypeScriptModel metamodel ] +{ #category : 'accessing' } +FASTTypeScriptEntity >> abstractMethodSignatureNameOwner [ + "Relation named: #abstractMethodSignatureNameOwner type: #FASTTypeScriptAbstractMethodSignature opposite: #name" + + + + + + ^ abstractMethodSignatureNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> abstractMethodSignatureNameOwner: anObject [ + + + + abstractMethodSignatureNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> abstractMethodSignatureReturnTypeOwner [ + "Relation named: #abstractMethodSignatureReturnTypeOwner type: #FASTTypeScriptAbstractMethodSignature opposite: #return_type" + + + + + + ^ abstractMethodSignatureReturnTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> abstractMethodSignatureReturnTypeOwner: anObject [ + + + + abstractMethodSignatureReturnTypeOwner := anObject +] + { #category : 'adding' } -FASTTypeScriptEntity >> addGenericChildren: anObject [ +FASTTypeScriptEntity >> addGenericChild: anObject [ + + ^ self genericChildren add: anObject ] -{ #category : 'adding' } -FASTTypeScriptEntity >> addValue: anObject [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> addingTypeAnnotationOwner [ + "Relation named: #addingTypeAnnotationOwner type: #FASTTypeScriptAddingTypeAnnotation opposite: #childrenNode" + + + + + + ^ addingTypeAnnotationOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> addingTypeAnnotationOwner: anObject [ + + - ^ self value add: anObject + addingTypeAnnotationOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptEntity >> genericChildren [ - "Relation named: #genericChildren type: #FASTTypeScriptEntity opposite: #genericParent" +FASTTypeScriptEntity >> ambientDeclarationOwner [ + "Relation named: #ambientDeclarationOwner type: #FASTTypeScriptAmbientDeclaration opposite: #childrenNodes" + + + + + ^ ambientDeclarationOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> ambientDeclarationOwner: anObject [ + + + + ambientDeclarationOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> arrayOwner [ + "Relation named: #arrayOwner type: #FASTTypeScriptArray opposite: #childrenNodes" + + + + + ^ arrayOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> arrayOwner: anObject [ + + + + arrayOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> arrayPatternOwner [ + "Relation named: #arrayPatternOwner type: #FASTTypeScriptArrayPattern opposite: #childrenNodes" + + + + + ^ arrayPatternOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> arrayPatternOwner: anObject [ + + + + arrayPatternOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> arrayTypeOwner [ + "Relation named: #arrayTypeOwner type: #FASTTypeScriptArrayType opposite: #childrenNode" + + - ^ genericChildren + ^ arrayTypeOwner ] { #category : 'accessing' } -FASTTypeScriptEntity >> genericChildren: anObject [ +FASTTypeScriptEntity >> arrayTypeOwner: anObject [ + - genericChildren value: anObject + arrayTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> arrowFunctionReturnTypeOwner [ + "Relation named: #arrowFunctionReturnTypeOwner type: #FASTTypeScriptArrowFunction opposite: #return_type" + + + + + + ^ arrowFunctionReturnTypeOwner ] -{ #category : 'navigation' } -FASTTypeScriptEntity >> genericChildrenGroup [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> arrowFunctionReturnTypeOwner: anObject [ + + - - ^ MooseSpecializedGroup withAll: self genericChildren asSet + arrowFunctionReturnTypeOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptEntity >> genericParent [ - "Relation named: #genericParent type: #FASTTypeScriptEntity opposite: #genericChildren" +FASTTypeScriptEntity >> asExpressionOwner [ + "Relation named: #asExpressionOwner type: #FASTTypeScriptAsExpression opposite: #childrenNodes" + - ^ genericParent + ^ asExpressionOwner ] { #category : 'accessing' } -FASTTypeScriptEntity >> genericParent: anObject [ +FASTTypeScriptEntity >> asExpressionOwner: anObject [ + - genericParent := anObject + asExpressionOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptEntity >> genericParentGroup [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> assertsAnnotationOwner [ + "Relation named: #assertsAnnotationOwner type: #FASTTypeScriptAssertsAnnotation opposite: #childrenNode" + + - - ^ MooseSpecializedGroup with: self genericParent + + + ^ assertsAnnotationOwner ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isBooleanLiteral [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> assertsAnnotationOwner: anObject [ + - ^ false + assertsAnnotationOwner := anObject ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isClassDeclaration [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> assertsOwner [ + "Relation named: #assertsOwner type: #FASTTypeScriptAsserts opposite: #childrenNode" + - ^ false + + + ^ assertsOwner ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isCompilationUnit [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> assertsOwner: anObject [ + - ^ false + assertsOwner := anObject ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isEnumDeclaration [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> augmentedAssignmentExpressionOperatorOwner [ + "Relation named: #augmentedAssignmentExpressionOperatorOwner type: #FASTTypeScriptAugmentedAssignmentExpression opposite: #operator" + - ^ false + + + ^ augmentedAssignmentExpressionOperatorOwner ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isExpression [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> augmentedAssignmentExpressionOperatorOwner: anObject [ + - ^ false + augmentedAssignmentExpressionOperatorOwner := anObject ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isExpressionStatement [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> awaitExpressionOwner [ + "Relation named: #awaitExpressionOwner type: #FASTTypeScriptAwaitExpression opposite: #childrenNode" + - ^ false + + + ^ awaitExpressionOwner ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isLiteral [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> awaitExpressionOwner: anObject [ + - ^ false + awaitExpressionOwner := anObject ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isNullPointerLiteral [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> binaryExpressionOperatorOwner [ + "Relation named: #binaryExpressionOperatorOwner type: #FASTTypeScriptBinaryExpression opposite: #operator" + - ^ false + + + ^ binaryExpressionOperatorOwner ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isQueryable [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> binaryExpressionOperatorOwner: anObject [ + - ^ false + binaryExpressionOperatorOwner := anObject ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isStatement [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> callExpressionArgumentsOwner [ + "Relation named: #callExpressionArgumentsOwner type: #FASTTypeScriptCallExpression opposite: #arguments" + - ^ false + + + ^ callExpressionArgumentsOwner ] -{ #category : 'testing' } -FASTTypeScriptEntity >> isStringLiteral [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> callExpressionArgumentsOwner: anObject [ + - ^ false + callExpressionArgumentsOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> callExpressionFunctionOwner [ + "Relation named: #callExpressionFunctionOwner type: #FASTTypeScriptCallExpression opposite: #function" + + + + + + ^ callExpressionFunctionOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> callExpressionFunctionOwner: anObject [ + + + + callExpressionFunctionOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> callSignatureReturnTypeOwner [ + "Relation named: #callSignatureReturnTypeOwner type: #FASTTypeScriptCallSignature opposite: #return_type" + + + + + + ^ callSignatureReturnTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> callSignatureReturnTypeOwner: anObject [ + + + + callSignatureReturnTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> catchClauseParameterOwner [ + "Relation named: #catchClauseParameterOwner type: #FASTTypeScriptCatchClause opposite: #parameter" + + + + + + ^ catchClauseParameterOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> catchClauseParameterOwner: anObject [ + + + + catchClauseParameterOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> classHeritageOwner [ + "Relation named: #classHeritageOwner type: #FASTTypeScriptClassHeritage opposite: #childrenNodes" + + + + + ^ classHeritageOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> classHeritageOwner: anObject [ + + + + classHeritageOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> computedPropertyNameOwner [ + "Relation named: #computedPropertyNameOwner type: #FASTTypeScriptComputedPropertyName opposite: #childrenNode" + + + + + + ^ computedPropertyNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> computedPropertyNameOwner: anObject [ + + + + computedPropertyNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> constraintOwner [ + "Relation named: #constraintOwner type: #FASTTypeScriptConstraint opposite: #childrenNode" + + + + + + ^ constraintOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> constraintOwner: anObject [ + + + + constraintOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> decoratorOwner [ + "Relation named: #decoratorOwner type: #FASTTypeScriptDecorator opposite: #childrenNode" + + + + + + ^ decoratorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> decoratorOwner: anObject [ + + + + decoratorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> defaultTypeOwner [ + "Relation named: #defaultTypeOwner type: #FASTTypeScriptDefaultType opposite: #childrenNode" + + + + + + ^ defaultTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> defaultTypeOwner: anObject [ + + + + defaultTypeOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptEntity >> value [ - "Relation named: #value type: #FASTTypeScriptEntity opposite: #valueParent" +FASTTypeScriptEntity >> elseClauseOwner [ + "Relation named: #elseClauseOwner type: #FASTTypeScriptElseClause opposite: #childrenNode" + + - ^ value + ^ elseClauseOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> elseClauseOwner: anObject [ + + + + elseClauseOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptEntity >> value: anObject [ +FASTTypeScriptEntity >> enumAssignmentNameOwner [ + "Relation named: #enumAssignmentNameOwner type: #FASTTypeScriptEnumAssignment opposite: #name" + - value value: anObject + + + ^ enumAssignmentNameOwner ] -{ #category : 'navigation' } -FASTTypeScriptEntity >> valueGroup [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> enumAssignmentNameOwner: anObject [ + + - - ^ MooseSpecializedGroup withAll: self value asSet + enumAssignmentNameOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptEntity >> valueParent [ - "Relation named: #valueParent type: #FASTTypeScriptEntity opposite: #value" +FASTTypeScriptEntity >> enumBodyNameOwner [ + "Relation named: #enumBodyNameOwner type: #FASTTypeScriptEnumBody opposite: #name" + - ^ valueParent + ^ enumBodyNameOwner ] { #category : 'accessing' } -FASTTypeScriptEntity >> valueParent: anObject [ +FASTTypeScriptEntity >> enumBodyNameOwner: anObject [ + - valueParent := anObject + enumBodyNameOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptEntity >> valueParentGroup [ +{ #category : 'accessing' } +FASTTypeScriptEntity >> exportClauseOwner [ + "Relation named: #exportClauseOwner type: #FASTTypeScriptExportClause opposite: #childrenNodes" + + + + + ^ exportClauseOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> exportClauseOwner: anObject [ + + + + exportClauseOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> expressionStatementOwner [ + "Relation named: #expressionStatementOwner type: #FASTTypeScriptExpressionStatement opposite: #expression" + + + + + + ^ expressionStatementOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> expressionStatementOwner: anObject [ + + + + expressionStatementOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> flowMaybeTypeOwner [ + "Relation named: #flowMaybeTypeOwner type: #FASTTypeScriptFlowMaybeType opposite: #childrenNode" + + + + + + ^ flowMaybeTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> flowMaybeTypeOwner: anObject [ + + + + flowMaybeTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forInStatementKindOwner [ + "Relation named: #forInStatementKindOwner type: #FASTTypeScriptForInStatement opposite: #kind" + + + + + + ^ forInStatementKindOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forInStatementKindOwner: anObject [ + + + + forInStatementKindOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forInStatementOperatorOwner [ + "Relation named: #forInStatementOperatorOwner type: #FASTTypeScriptForInStatement opposite: #operator" + + + + + + ^ forInStatementOperatorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forInStatementOperatorOwner: anObject [ + + + + forInStatementOperatorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forStatementConditionOwner [ + "Relation named: #forStatementConditionOwner type: #FASTTypeScriptForStatement opposite: #condition" + + + + + ^ forStatementConditionOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forStatementConditionOwner: anObject [ + + + + forStatementConditionOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forStatementIncrementOwner [ + "Relation named: #forStatementIncrementOwner type: #FASTTypeScriptForStatement opposite: #increment" + + + + + + ^ forStatementIncrementOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forStatementIncrementOwner: anObject [ + + + + forStatementIncrementOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forStatementInitializerOwner [ + "Relation named: #forStatementInitializerOwner type: #FASTTypeScriptForStatement opposite: #initializer" + + + + + + ^ forStatementInitializerOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> forStatementInitializerOwner: anObject [ + + + + forStatementInitializerOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> functionExpressionReturnTypeOwner [ + "Relation named: #functionExpressionReturnTypeOwner type: #FASTTypeScriptFunctionExpression opposite: #return_type" + + + + + + ^ functionExpressionReturnTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> functionExpressionReturnTypeOwner: anObject [ + + + + functionExpressionReturnTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> functionSignatureReturnTypeOwner [ + "Relation named: #functionSignatureReturnTypeOwner type: #FASTTypeScriptFunctionSignature opposite: #return_type" + + + + + + ^ functionSignatureReturnTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> functionSignatureReturnTypeOwner: anObject [ + + + + functionSignatureReturnTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> generatorFunctionDeclarationReturnTypeOwner [ + "Relation named: #generatorFunctionDeclarationReturnTypeOwner type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #return_type" + + + + + + ^ generatorFunctionDeclarationReturnTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> generatorFunctionDeclarationReturnTypeOwner: anObject [ + + + + generatorFunctionDeclarationReturnTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> generatorFunctionReturnTypeOwner [ + "Relation named: #generatorFunctionReturnTypeOwner type: #FASTTypeScriptGeneratorFunction opposite: #return_type" + + + + + + ^ generatorFunctionReturnTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> generatorFunctionReturnTypeOwner: anObject [ + + + + generatorFunctionReturnTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> genericChildren [ + "Relation named: #genericChildren type: #FASTTypeScriptEntity opposite: #genericParent" + + + + + ^ genericChildren +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> genericChildren: anObject [ + + + + genericChildren value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> genericParent [ + "Relation named: #genericParent type: #FASTTypeScriptEntity opposite: #genericChildren" + + + + + ^ genericParent +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> genericParent: anObject [ + + + + genericParent := anObject +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> hasImmediateSource [ + + + + ^ false +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> implementsClauseOwner [ + "Relation named: #implementsClauseOwner type: #FASTTypeScriptImplementsClause opposite: #childrenNodes" + + + + + ^ implementsClauseOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> implementsClauseOwner: anObject [ + + + + implementsClauseOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> importAliasOwner [ + "Relation named: #importAliasOwner type: #FASTTypeScriptImportAlias opposite: #childrenNodes" + + + + + ^ importAliasOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> importAliasOwner: anObject [ + + + + importAliasOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> importAttributeOwner [ + "Relation named: #importAttributeOwner type: #FASTTypeScriptImportAttribute opposite: #childrenNode" + + + + + + ^ importAttributeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> importAttributeOwner: anObject [ + + + + importAttributeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> importClauseOwner [ + "Relation named: #importClauseOwner type: #FASTTypeScriptImportClause opposite: #childrenNodes" + + + + + ^ importClauseOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> importClauseOwner: anObject [ + + + + importClauseOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> indexSignatureSignOwner [ + "Relation named: #indexSignatureSignOwner type: #FASTTypeScriptIndexSignature opposite: #sign" + + + + + + ^ indexSignatureSignOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> indexSignatureSignOwner: anObject [ + + + + indexSignatureSignOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> indexTypeQueryOwner [ + "Relation named: #indexTypeQueryOwner type: #FASTTypeScriptIndexTypeQuery opposite: #childrenNode" + + + + + + ^ indexTypeQueryOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> indexTypeQueryOwner: anObject [ + + + + indexTypeQueryOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> inferTypeOwner [ + "Relation named: #inferTypeOwner type: #FASTTypeScriptInferType opposite: #childrenNodes" + + + + + ^ inferTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> inferTypeOwner: anObject [ + + + + inferTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> instantiationExpressionFunctionOwner [ + "Relation named: #instantiationExpressionFunctionOwner type: #FASTTypeScriptInstantiationExpression opposite: #function" + + + + + + ^ instantiationExpressionFunctionOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> instantiationExpressionFunctionOwner: anObject [ + + + + instantiationExpressionFunctionOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> interfaceBodyOwner [ + "Relation named: #interfaceBodyOwner type: #FASTTypeScriptInterfaceBody opposite: #childrenNodes" + + + + + ^ interfaceBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> interfaceBodyOwner: anObject [ + + + + interfaceBodyOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> internalModuleNameOwner [ + "Relation named: #internalModuleNameOwner type: #FASTTypeScriptInternalModule opposite: #name" + + + + + + ^ internalModuleNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> internalModuleNameOwner: anObject [ + + + + internalModuleNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> intersectionTypeOwner [ + "Relation named: #intersectionTypeOwner type: #FASTTypeScriptIntersectionType opposite: #childrenNodes" + + + + + ^ intersectionTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> intersectionTypeOwner: anObject [ + + + + intersectionTypeOwner := anObject +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isBooleanLiteral [ + + + + ^ false +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isClassDeclaration [ + + + + ^ false +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isCompilationUnit [ + + + + ^ false +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isEnumDeclaration [ + + + + ^ false +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isExpression [ + + + + ^ false +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isExpressionStatement [ + + + + ^ false +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isLiteral [ + + + + ^ false +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isNullPointerLiteral [ + + + + ^ false +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isStatement [ + + + + ^ false +] + +{ #category : 'testing' } +FASTTypeScriptEntity >> isStringLiteral [ + + + + ^ false +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> lexicalDeclarationKindOwner [ + "Relation named: #lexicalDeclarationKindOwner type: #FASTTypeScriptLexicalDeclaration opposite: #kind" + + + + + + ^ lexicalDeclarationKindOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> lexicalDeclarationKindOwner: anObject [ + + + + lexicalDeclarationKindOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> literalTypeOwner [ + "Relation named: #literalTypeOwner type: #FASTTypeScriptLiteralType opposite: #childrenNode" + + + + + + ^ literalTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> literalTypeOwner: anObject [ + + + + literalTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> lookupTypeOwner [ + "Relation named: #lookupTypeOwner type: #FASTTypeScriptLookupType opposite: #childrenNodes" + + + + + ^ lookupTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> lookupTypeOwner: anObject [ + + + + lookupTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> methodSignatureNameOwner [ + "Relation named: #methodSignatureNameOwner type: #FASTTypeScriptMethodSignature opposite: #name" + + + + + + ^ methodSignatureNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> methodSignatureNameOwner: anObject [ + + + + methodSignatureNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> methodSignatureReturnTypeOwner [ + "Relation named: #methodSignatureReturnTypeOwner type: #FASTTypeScriptMethodSignature opposite: #return_type" + + + + + + ^ methodSignatureReturnTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> methodSignatureReturnTypeOwner: anObject [ + + + + methodSignatureReturnTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> moduleNameOwner [ + "Relation named: #moduleNameOwner type: #FASTTypeScriptModule opposite: #name" + + + + + + ^ moduleNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> moduleNameOwner: anObject [ + + + + moduleNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> namedImportsOwner [ + "Relation named: #namedImportsOwner type: #FASTTypeScriptNamedImports opposite: #childrenNodes" + + + + + ^ namedImportsOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> namedImportsOwner: anObject [ + + + + namedImportsOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> namespaceExportOwner [ + "Relation named: #namespaceExportOwner type: #FASTTypeScriptNamespaceExport opposite: #childrenNode" + + + + + + ^ namespaceExportOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> namespaceExportOwner: anObject [ + + + + namespaceExportOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> namespaceImportOwner [ + "Relation named: #namespaceImportOwner type: #FASTTypeScriptNamespaceImport opposite: #childrenNode" + + + + + + ^ namespaceImportOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> namespaceImportOwner: anObject [ + + + + namespaceImportOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> nestedTypeIdentifierModuleOwner [ + "Relation named: #nestedTypeIdentifierModuleOwner type: #FASTTypeScriptNestedTypeIdentifier opposite: #module" + + + + + + ^ nestedTypeIdentifierModuleOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> nestedTypeIdentifierModuleOwner: anObject [ + + + + nestedTypeIdentifierModuleOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> nonNullExpressionOwner [ + "Relation named: #nonNullExpressionOwner type: #FASTTypeScriptNonNullExpression opposite: #childrenNode" + + + + + + ^ nonNullExpressionOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> nonNullExpressionOwner: anObject [ + + + + nonNullExpressionOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> objectAssignmentPatternLeftOwner [ + "Relation named: #objectAssignmentPatternLeftOwner type: #FASTTypeScriptObjectAssignmentPattern opposite: #left" + + + + + + ^ objectAssignmentPatternLeftOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> objectAssignmentPatternLeftOwner: anObject [ + + + + objectAssignmentPatternLeftOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> objectOwner [ + "Relation named: #objectOwner type: #FASTTypeScriptObject opposite: #childrenNodes" + + + + + ^ objectOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> objectOwner: anObject [ + + + + objectOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> objectPatternOwner [ + "Relation named: #objectPatternOwner type: #FASTTypeScriptObjectPattern opposite: #childrenNodes" + + + + + ^ objectPatternOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> objectPatternOwner: anObject [ + + + + objectPatternOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> objectTypeOwner [ + "Relation named: #objectTypeOwner type: #FASTTypeScriptObjectType opposite: #childrenNodes" + + + + + ^ objectTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> objectTypeOwner: anObject [ + + + + objectTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> omittingTypeAnnotationOwner [ + "Relation named: #omittingTypeAnnotationOwner type: #FASTTypeScriptOmittingTypeAnnotation opposite: #childrenNode" + + + + + + ^ omittingTypeAnnotationOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> omittingTypeAnnotationOwner: anObject [ + + + + omittingTypeAnnotationOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> optingTypeAnnotationOwner [ + "Relation named: #optingTypeAnnotationOwner type: #FASTTypeScriptOptingTypeAnnotation opposite: #childrenNode" + + + + + + ^ optingTypeAnnotationOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> optingTypeAnnotationOwner: anObject [ + + + + optingTypeAnnotationOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> optionalTypeOwner [ + "Relation named: #optionalTypeOwner type: #FASTTypeScriptOptionalType opposite: #childrenNode" + + + + + + ^ optionalTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> optionalTypeOwner: anObject [ + + + + optionalTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> pairKeyOwner [ + "Relation named: #pairKeyOwner type: #FASTTypeScriptPair opposite: #key" + + + + + + ^ pairKeyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> pairKeyOwner: anObject [ + + + + pairKeyOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> pairPatternKeyOwner [ + "Relation named: #pairPatternKeyOwner type: #FASTTypeScriptPairPattern opposite: #key" + + + + + + ^ pairPatternKeyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> pairPatternKeyOwner: anObject [ + + + + pairPatternKeyOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> pairPatternValueOwner [ + "Relation named: #pairPatternValueOwner type: #FASTTypeScriptPairPattern opposite: #value" + + + + + + ^ pairPatternValueOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> pairPatternValueOwner: anObject [ + + + + pairPatternValueOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> parenthesizedTypeOwner [ + "Relation named: #parenthesizedTypeOwner type: #FASTTypeScriptParenthesizedType opposite: #childrenNode" + + + + + + ^ parenthesizedTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> parenthesizedTypeOwner: anObject [ + + + + parenthesizedTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> programOwner [ + "Relation named: #programOwner type: #FASTTypeScriptProgram opposite: #childrenNodes" + + + + + ^ programOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> programOwner: anObject [ + + + + programOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> propertySignatureNameOwner [ + "Relation named: #propertySignatureNameOwner type: #FASTTypeScriptPropertySignature opposite: #name" + + + + + + ^ propertySignatureNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> propertySignatureNameOwner: anObject [ + + + + propertySignatureNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> publicFieldDefinitionNameOwner [ + "Relation named: #publicFieldDefinitionNameOwner type: #FASTTypeScriptPublicFieldDefinition opposite: #name" + + + + + + ^ publicFieldDefinitionNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> publicFieldDefinitionNameOwner: anObject [ + + + + publicFieldDefinitionNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> readonlyTypeOwner [ + "Relation named: #readonlyTypeOwner type: #FASTTypeScriptReadonlyType opposite: #childrenNode" + + + + + + ^ readonlyTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> readonlyTypeOwner: anObject [ + + + + readonlyTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> requiredParameterNameOwner [ + "Relation named: #requiredParameterNameOwner type: #FASTTypeScriptRequiredParameter opposite: #name" + + + + + + ^ requiredParameterNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> requiredParameterNameOwner: anObject [ + + + + requiredParameterNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> restPatternOwner [ + "Relation named: #restPatternOwner type: #FASTTypeScriptRestPattern opposite: #childrenNode" + + + + + + ^ restPatternOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> restPatternOwner: anObject [ + + + + restPatternOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> restTypeOwner [ + "Relation named: #restTypeOwner type: #FASTTypeScriptRestType opposite: #childrenNode" + + + + + + ^ restTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> restTypeOwner: anObject [ + + + + restTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> returnStatementOwner [ + "Relation named: #returnStatementOwner type: #FASTTypeScriptReturnStatement opposite: #childrenNode" + + + + + + ^ returnStatementOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> returnStatementOwner: anObject [ + + + + returnStatementOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> satisfiesExpressionOwner [ + "Relation named: #satisfiesExpressionOwner type: #FASTTypeScriptSatisfiesExpression opposite: #childrenNodes" + + + + + ^ satisfiesExpressionOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> satisfiesExpressionOwner: anObject [ + + + + satisfiesExpressionOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> sequenceExpressionOwner [ + "Relation named: #sequenceExpressionOwner type: #FASTTypeScriptSequenceExpression opposite: #childrenNodes" + + + + + ^ sequenceExpressionOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> sequenceExpressionOwner: anObject [ + + + + sequenceExpressionOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> spreadElementOwner [ + "Relation named: #spreadElementOwner type: #FASTTypeScriptSpreadElement opposite: #childrenNode" + + + + + + ^ spreadElementOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> spreadElementOwner: anObject [ + + + + spreadElementOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> statementBlockOwner [ + "Relation named: #statementBlockOwner type: #FASTTypeScriptStatementBlock opposite: #childrenNodes" + + + + + ^ statementBlockOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> statementBlockOwner: anObject [ + + + + statementBlockOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> stringOwner [ + "Relation named: #stringOwner type: #FASTTypeScriptString opposite: #childrenNodes" + + + + + ^ stringOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> stringOwner: anObject [ + + + + stringOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> switchBodyOwner [ + "Relation named: #switchBodyOwner type: #FASTTypeScriptSwitchBody opposite: #childrenNodes" + + + + + ^ switchBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> switchBodyOwner: anObject [ + + + + switchBodyOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> switchCaseValueOwner [ + "Relation named: #switchCaseValueOwner type: #FASTTypeScriptSwitchCase opposite: #value" + + + + + + ^ switchCaseValueOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> switchCaseValueOwner: anObject [ + + + + switchCaseValueOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> templateLiteralTypeOwner [ + "Relation named: #templateLiteralTypeOwner type: #FASTTypeScriptTemplateLiteralType opposite: #childrenNodes" + + + + + ^ templateLiteralTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> templateLiteralTypeOwner: anObject [ + + + + templateLiteralTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> templateStringOwner [ + "Relation named: #templateStringOwner type: #FASTTypeScriptTemplateString opposite: #childrenNodes" + + + + + ^ templateStringOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> templateStringOwner: anObject [ + + + + templateStringOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> templateSubstitutionOwner [ + "Relation named: #templateSubstitutionOwner type: #FASTTypeScriptTemplateSubstitution opposite: #childrenNode" + + + + + + ^ templateSubstitutionOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> templateSubstitutionOwner: anObject [ + + + + templateSubstitutionOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> templateTypeOwner [ + "Relation named: #templateTypeOwner type: #FASTTypeScriptTemplateType opposite: #childrenNode" + + + + + + ^ templateTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> templateTypeOwner: anObject [ + + + + templateTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> throwStatementOwner [ + "Relation named: #throwStatementOwner type: #FASTTypeScriptThrowStatement opposite: #childrenNode" + + + + + + ^ throwStatementOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> throwStatementOwner: anObject [ + + + + throwStatementOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> tupleTypeOwner [ + "Relation named: #tupleTypeOwner type: #FASTTypeScriptTupleType opposite: #childrenNodes" + + + + + ^ tupleTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> tupleTypeOwner: anObject [ + + + + tupleTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeAnnotationOwner [ + "Relation named: #typeAnnotationOwner type: #FASTTypeScriptTypeAnnotation opposite: #childrenNode" + + + + + + ^ typeAnnotationOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeAnnotationOwner: anObject [ + + + + typeAnnotationOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeArgumentsOwner [ + "Relation named: #typeArgumentsOwner type: #FASTTypeScriptTypeArguments opposite: #childrenNodes" + + + + + ^ typeArgumentsOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeArgumentsOwner: anObject [ + + + + typeArgumentsOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeAssertionOwner [ + "Relation named: #typeAssertionOwner type: #FASTTypeScriptTypeAssertion opposite: #childrenNodes" + + + + + ^ typeAssertionOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeAssertionOwner: anObject [ + + + + typeAssertionOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeParametersOwner [ + "Relation named: #typeParametersOwner type: #FASTTypeScriptTypeParameters opposite: #childrenNodes" + + + + + ^ typeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeParametersOwner: anObject [ + + + + typeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeQueryOwner [ + "Relation named: #typeQueryOwner type: #FASTTypeScriptTypeQuery opposite: #childrenNode" + + + + + + ^ typeQueryOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> typeQueryOwner: anObject [ + + + + typeQueryOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> unaryExpressionOperatorOwner [ + "Relation named: #unaryExpressionOperatorOwner type: #FASTTypeScriptUnaryExpression opposite: #operator" + + + + + + ^ unaryExpressionOperatorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> unaryExpressionOperatorOwner: anObject [ + + + + unaryExpressionOperatorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> unionTypeOwner [ + "Relation named: #unionTypeOwner type: #FASTTypeScriptUnionType opposite: #childrenNodes" + + + + + ^ unionTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> unionTypeOwner: anObject [ + + + + unionTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> updateExpressionOperatorOwner [ + "Relation named: #updateExpressionOperatorOwner type: #FASTTypeScriptUpdateExpression opposite: #operator" + + + + + + ^ updateExpressionOperatorOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> updateExpressionOperatorOwner: anObject [ + + + + updateExpressionOperatorOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> variableDeclarationOwner [ + "Relation named: #variableDeclarationOwner type: #FASTTypeScriptVariableDeclaration opposite: #childrenNodes" + + + + + ^ variableDeclarationOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> variableDeclarationOwner: anObject [ + + + + variableDeclarationOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> variableDeclaratorNameOwner [ + "Relation named: #variableDeclaratorNameOwner type: #FASTTypeScriptVariableDeclarator opposite: #name" + + + + + + ^ variableDeclaratorNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> variableDeclaratorNameOwner: anObject [ + + + + variableDeclaratorNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> yieldExpressionOwner [ + "Relation named: #yieldExpressionOwner type: #FASTTypeScriptYieldExpression opposite: #childrenNode" + + + + + + ^ yieldExpressionOwner +] + +{ #category : 'accessing' } +FASTTypeScriptEntity >> yieldExpressionOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self valueParent + yieldExpressionOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptEnumAssignment.class.st b/FAST-TypeScript-Model/FASTTypeScriptEnumAssignment.class.st index 902bb6c..561b515 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptEnumAssignment.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptEnumAssignment.class.st @@ -1,6 +1,22 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `name` | `FASTTypeScriptEnumAssignment` | `enumAssignmentNameOwner` | `FASTTypeScriptEntity` | | +| `value` | `FASTTypeScriptEnumAssignment` | `enumAssignmentValueOwner` | `FASTTExpression` | | + + + +" Class { #name : 'FASTTypeScriptEnumAssignment', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#name => FMOne type: #FASTTypeScriptEntity opposite: #enumAssignmentNameOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +25,50 @@ Class { { #category : 'meta' } FASTTypeScriptEnumAssignment class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptEnumAssignment class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptEnumAssignment >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #enumAssignmentNameOwner" - self deprecatedAliases: { #FASTTypescriptEnum_assignment } - - + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptEnumAssignment >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptEnumAssignment >> value [ + "Relation named: #value type: #FASTTExpression opposite: #enumAssignmentValueOwner" + + + + + ^ self attributeAt: #value ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptEnumAssignment >> value: anObject [ + + + + (self attributeAt: #value ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self value. + self attributeAt: #value put: anObject. + otherSide enumAssignmentValueOwner: nil ] + ifNotNil: [ + self attributeAt: #value put: anObject. + anObject enumAssignmentValueOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptEnumBody.class.st b/FAST-TypeScript-Model/FASTTypeScriptEnumBody.class.st index f27c05f..9ab442b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptEnumBody.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptEnumBody.class.st @@ -7,6 +7,11 @@ |---| | `enumDeclarationBodyOwner` | `FASTTypeScriptEnumBody` | `body` | `FASTTypeScriptEnumDeclaration` | The enum declaration that contains me| +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `name` | `FASTTypeScriptEnumBody` | `enumBodyNameOwner` | `FASTTypeScriptEntity` | | + " @@ -14,7 +19,8 @@ Class { #name : 'FASTTypeScriptEnumBody', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#enumDeclarationBodyOwner => FMOne type: #FASTTypeScriptEnumDeclaration opposite: #body' + '#enumDeclarationBodyOwner => FMOne type: #FASTTypeScriptEnumDeclaration opposite: #body', + '#name => FMMany type: #FASTTypeScriptEntity opposite: #enumBodyNameOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -24,25 +30,25 @@ Class { { #category : 'meta' } FASTTypeScriptEnumBody class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptEnumBody class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptEnumBody >> addName: anObject [ - self deprecatedAliases: { #FASTTypescriptEnum_body } - - - + + + ^ self name add: anObject ] { #category : 'accessing' } FASTTypeScriptEnumBody >> enumDeclarationBodyOwner [ "Relation named: #enumDeclarationBodyOwner type: #FASTTypeScriptEnumDeclaration opposite: #body" + @@ -53,13 +59,25 @@ FASTTypeScriptEnumBody >> enumDeclarationBodyOwner [ { #category : 'accessing' } FASTTypeScriptEnumBody >> enumDeclarationBodyOwner: anObject [ + enumDeclarationBodyOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptEnumBody >> enumDeclarationBodyOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptEnumBody >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #enumBodyNameOwner" + + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptEnumBody >> name: anObject [ + + - - ^ MooseSpecializedGroup with: self enumDeclarationBodyOwner + name value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptEnumDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptEnumDeclaration.class.st index 3952591..ca9544a 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptEnumDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptEnumDeclaration.class.st @@ -7,13 +7,18 @@ |---| | `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| | `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| -| `doBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| | `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| | `programEnumDeclarationOwner` | `FASTTypeScriptEnumDeclaration` | `enumDeclarations` | `FASTTypeScriptProgram` | The program that contains me| | `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | | `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| -| `whileBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | ### Children | Relation | Origin | Opposite | Type | Comment | @@ -36,8 +41,8 @@ Class { #name : 'FASTTypeScriptEnumDeclaration', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTStatement + FASTTypeScriptTDeclaration + FASTTypeScriptTWithDeclarations + FASTTypeScriptTWithModifiers', - #classTraits : 'FASTTStatement classTrait + FASTTypeScriptTDeclaration classTrait + FASTTypeScriptTWithDeclarations classTrait + FASTTypeScriptTWithModifiers classTrait', + #traits : 'FASTTypeScriptTDeclaration + FASTTypeScriptTWithDeclarations + FASTTypeScriptTWithModifiers', + #classTraits : 'FASTTypeScriptTDeclaration classTrait + FASTTypeScriptTWithDeclarations classTrait + FASTTypeScriptTWithModifiers classTrait', #instVars : [ '#body => FMOne type: #FASTTypeScriptEnumBody opposite: #enumDeclarationBodyOwner', '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #enumDeclarationNameOwner', @@ -51,25 +56,17 @@ Class { { #category : 'meta' } FASTTypeScriptEnumDeclaration class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptEnumDeclaration class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptEnum_declaration } - - - ] { #category : 'accessing' } FASTTypeScriptEnumDeclaration >> body [ "Relation named: #body type: #FASTTypeScriptEnumBody opposite: #enumDeclarationBodyOwner" + ^ body @@ -78,20 +75,15 @@ FASTTypeScriptEnumDeclaration >> body [ { #category : 'accessing' } FASTTypeScriptEnumDeclaration >> body: anObject [ + body := anObject ] -{ #category : 'navigation' } -FASTTypeScriptEnumDeclaration >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body -] - { #category : 'testing' } FASTTypeScriptEnumDeclaration >> isEnumDeclaration [ + ^ true ] @@ -100,6 +92,7 @@ FASTTypeScriptEnumDeclaration >> isEnumDeclaration [ FASTTypeScriptEnumDeclaration >> name [ "Relation named: #name type: #FASTTypeScriptIdentifier opposite: #enumDeclarationNameOwner" + ^ name @@ -108,21 +101,16 @@ FASTTypeScriptEnumDeclaration >> name [ { #category : 'accessing' } FASTTypeScriptEnumDeclaration >> name: anObject [ + name := anObject ] -{ #category : 'navigation' } -FASTTypeScriptEnumDeclaration >> nameGroup [ - - - ^ MooseSpecializedGroup with: self name -] - { #category : 'accessing' } FASTTypeScriptEnumDeclaration >> programEnumDeclarationOwner [ "Relation named: #programEnumDeclarationOwner type: #FASTTypeScriptProgram opposite: #enumDeclarations" + @@ -132,13 +120,7 @@ FASTTypeScriptEnumDeclaration >> programEnumDeclarationOwner [ { #category : 'accessing' } FASTTypeScriptEnumDeclaration >> programEnumDeclarationOwner: anObject [ + programEnumDeclarationOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptEnumDeclaration >> programEnumDeclarationOwnerGroup [ - - - ^ MooseSpecializedGroup with: self programEnumDeclarationOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptEscapeSequence.class.st b/FAST-TypeScript-Model/FASTTypeScriptEscapeSequence.class.st index 25746aa..b925e47 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptEscapeSequence.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptEscapeSequence.class.st @@ -9,17 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptEscapeSequence class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptEscapeSequence class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptEscape_sequence } - - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptExistentialType.class.st b/FAST-TypeScript-Model/FASTTypeScriptExistentialType.class.st index 956c777..de7824f 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptExistentialType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptExistentialType.class.st @@ -1,6 +1,82 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptExistentialType', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +85,8 @@ Class { { #category : 'meta' } FASTTypeScriptExistentialType class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptExistentialType class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptExistential_type } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptExportClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptExportClause.class.st index 705e4a6..4a94f84 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptExportClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptExportClause.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptExportClause` | `exportClauseOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptExportClause', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #exportClauseOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,17 +24,34 @@ Class { { #category : 'meta' } FASTTypeScriptExportClause class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptExportClause class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptExportClause >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptExportClause >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #exportClauseOwner" + + + + + ^ childrenNodes +] - self deprecatedAliases: { #FASTTypescriptExport_clause } +{ #category : 'accessing' } +FASTTypeScriptExportClause >> childrenNodes: anObject [ - - + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptExportSpecifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptExportSpecifier.class.st index 64b3223..fcfa800 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptExportSpecifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptExportSpecifier.class.st @@ -15,8 +15,8 @@ Class { #name : 'FASTTypeScriptExportSpecifier', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #exportSpecifierNameOwner', - '#alias => FMOne type: #FASTTypeScriptTOptionalField opposite: #exportSpecifierAliasOwner' + '#alias => FMOne type: #FASTTypeScriptTOptionalField opposite: #exportSpecifierAliasOwner', + '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #exportSpecifierNameOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -26,24 +26,17 @@ Class { { #category : 'meta' } FASTTypeScriptExportSpecifier class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptExportSpecifier class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptExport_specifier } - - ] { #category : 'accessing' } FASTTypeScriptExportSpecifier >> alias [ "Relation named: #alias type: #FASTTypeScriptTOptionalField opposite: #exportSpecifierAliasOwner" + ^ alias @@ -52,21 +45,16 @@ FASTTypeScriptExportSpecifier >> alias [ { #category : 'accessing' } FASTTypeScriptExportSpecifier >> alias: anObject [ + alias := anObject ] -{ #category : 'navigation' } -FASTTypeScriptExportSpecifier >> aliasGroup [ - - - ^ MooseSpecializedGroup with: self alias -] - { #category : 'accessing' } FASTTypeScriptExportSpecifier >> name [ "Relation named: #name type: #FASTTypeScriptIdentifier opposite: #exportSpecifierNameOwner" + ^ name @@ -75,13 +63,7 @@ FASTTypeScriptExportSpecifier >> name [ { #category : 'accessing' } FASTTypeScriptExportSpecifier >> name: anObject [ + name := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptExportSpecifier >> nameGroup [ - - - ^ MooseSpecializedGroup with: self name -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptExportStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptExportStatement.class.st index c751c85..ba347c6 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptExportStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptExportStatement.class.st @@ -1,6 +1,26 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `declaration` | `FASTTypeScriptExportStatement` | `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | | +| `decorator` | `FASTTypeScriptExportStatement` | `exportStatementDecoratorOwner` | `FASTTypeScriptDecorator` | | +| `source` | `FASTTypeScriptExportStatement` | `exportStatementSourceOwner` | `FASTTypeScriptString` | | +| `value` | `FASTTypeScriptExportStatement` | `exportStatementValueOwner` | `FASTTExpression` | | + + + +" Class { #name : 'FASTTypeScriptExportStatement', #superclass : 'FASTTypeScriptStatement', + #instVars : [ + '#declaration => FMOne type: #FASTTypeScriptTDeclaration opposite: #exportStatementDeclarationOwner', + '#decorator => FMMany type: #FASTTypeScriptDecorator opposite: #exportStatementDecoratorOwner', + '#source => FMOne type: #FASTTypeScriptString opposite: #exportStatementSourceOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +29,93 @@ Class { { #category : 'meta' } FASTTypeScriptExportStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptExportStatement class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptExportStatement >> addDecorator: anObject [ + + + + ^ self decorator add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptExportStatement >> declaration [ + "Relation named: #declaration type: #FASTTypeScriptTDeclaration opposite: #exportStatementDeclarationOwner" + + + + ^ declaration +] + +{ #category : 'accessing' } +FASTTypeScriptExportStatement >> declaration: anObject [ + + + + declaration := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptExportStatement >> decorator [ + "Relation named: #decorator type: #FASTTypeScriptDecorator opposite: #exportStatementDecoratorOwner" + + + + + ^ decorator +] - self deprecatedAliases: { #FASTTypescriptExport_statement } - - +{ #category : 'accessing' } +FASTTypeScriptExportStatement >> decorator: anObject [ + + + + decorator value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptExportStatement >> source [ + "Relation named: #source type: #FASTTypeScriptString opposite: #exportStatementSourceOwner" + + + + ^ source +] + +{ #category : 'accessing' } +FASTTypeScriptExportStatement >> source: anObject [ + + + + source := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptExportStatement >> value [ + "Relation named: #value type: #FASTTExpression opposite: #exportStatementValueOwner" + + + + + ^ self attributeAt: #value ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptExportStatement >> value: anObject [ + + + + (self attributeAt: #value ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self value. + self attributeAt: #value put: anObject. + otherSide exportStatementValueOwner: nil ] + ifNotNil: [ + self attributeAt: #value put: anObject. + anObject exportStatementValueOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptExpression.class.st index 588f759..7552c85 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptExpression.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,47 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -59,14 +85,8 @@ Class { { #category : 'meta' } FASTTypeScriptExpression class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptExpression class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptExpression } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptExpressionStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptExpressionStatement.class.st index eae3314..218bbd3 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptExpressionStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptExpressionStatement.class.st @@ -7,16 +7,21 @@ |---| | `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| | `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| -| `doBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| | `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| | `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| -| `whileBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | ### Children | Relation | Origin | Opposite | Type | Comment | |---| | `expression` | `FASTTExpressionStatement` | `expressionStatementOwner` | `FASTTExpression` | The expression of the statement| +| `expression` | `FASTTypeScriptExpressionStatement` | `expressionStatementOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -33,6 +38,9 @@ Class { #superclass : 'FASTTypeScriptStatement', #traits : 'FASTTExpressionStatement', #classTraits : 'FASTTExpressionStatement classTrait', + #instVars : [ + '#expression => FMOne type: #FASTTypeScriptEntity opposite: #expressionStatementOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -41,16 +49,25 @@ Class { { #category : 'meta' } FASTTypeScriptExpressionStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptExpressionStatement class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptExpressionStatement >> expression [ + "Relation named: #expression type: #FASTTypeScriptEntity opposite: #expressionStatementOwner" - self deprecatedAliases: { #FASTTypescriptExpression_statement } - - + + + ^ expression +] + +{ #category : 'accessing' } +FASTTypeScriptExpressionStatement >> expression: anObject [ + + + + expression := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptExtendsClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptExtendsClause.class.st index b5e0c01..2f3f80f 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptExtendsClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptExtendsClause.class.st @@ -6,6 +6,7 @@ | Relation | Origin | Opposite | Type | Comment | |---| | `type_arguments` | `FASTTypeScriptExtendsClause` | `extendsClauseTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | My type arguments| +| `value` | `FASTTypeScriptExtendsClause` | `extendsClauseValueOwner` | `FASTTExpression` | | @@ -14,7 +15,7 @@ Class { #name : 'FASTTypeScriptExtendsClause', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#type_arguments => FMOne type: #FASTTypeScriptTypeArguments opposite: #extendsClauseTypeArgumentsOwner' + '#type_arguments => FMMany type: #FASTTypeScriptTypeArguments opposite: #extendsClauseTypeArgumentsOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -24,39 +25,63 @@ Class { { #category : 'meta' } FASTTypeScriptExtendsClause class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptExtendsClause class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptExtendsClause >> addType_argument: anObject [ - self deprecatedAliases: { #FASTTypescriptExtends_clause } - - + + + ^ self type_arguments add: anObject +] + +{ #category : 'adding' } +FASTTypeScriptExtendsClause >> addValue: anObject [ + + + + ^ self value add: anObject ] { #category : 'accessing' } FASTTypeScriptExtendsClause >> type_arguments [ "Relation named: #type_arguments type: #FASTTypeScriptTypeArguments opposite: #extendsClauseTypeArgumentsOwner" + + ^ type_arguments ] { #category : 'accessing' } FASTTypeScriptExtendsClause >> type_arguments: anObject [ + + + type_arguments value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptExtendsClause >> value [ + "Relation named: #value type: #FASTTExpression opposite: #extendsClauseValueOwner" + + - type_arguments := anObject + + + + ^ self attributeAt: #value ifAbsentPut: [ FMMultivalueLink on: self opposite: #extendsClauseValueOwner: ] ] -{ #category : 'navigation' } -FASTTypeScriptExtendsClause >> type_argumentsGroup [ +{ #category : 'accessing' } +FASTTypeScriptExtendsClause >> value: anObject [ + + - - ^ MooseSpecializedGroup with: self type_arguments + self value value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptExtendsTypeClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptExtendsTypeClause.class.st index 3248256..40c3c4b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptExtendsTypeClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptExtendsTypeClause.class.st @@ -5,7 +5,7 @@ ### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `type` | `FASTTypeScriptExtendsTypeClause` | `extendsTypeClauseTypeOwner` | `FASTTypeScriptTypeIdentifier` | My type identifier| +| `type` | `FASTTypeScriptExtendsTypeClause` | `extendsTypeClauseTypeOwner` | `FASTTExpression` | My type identifier| @@ -13,9 +13,6 @@ Class { #name : 'FASTTypeScriptExtendsTypeClause', #superclass : 'FASTTypeScriptEntity', - #instVars : [ - '#type => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #extendsTypeClauseTypeOwner' - ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -24,39 +21,34 @@ Class { { #category : 'meta' } FASTTypeScriptExtendsTypeClause class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptExtendsTypeClause class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptExtends_type_clause } - - ] { #category : 'accessing' } FASTTypeScriptExtendsTypeClause >> type [ - "Relation named: #type type: #FASTTypeScriptTypeIdentifier opposite: #extendsTypeClauseTypeOwner" + "Relation named: #type type: #FASTTExpression opposite: #extendsTypeClauseTypeOwner" + - ^ type + + ^ self attributeAt: #type ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptExtendsTypeClause >> type: anObject [ + - type := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptExtendsTypeClause >> typeGroup [ - - - ^ MooseSpecializedGroup with: self type + (self attributeAt: #type ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self type. + self attributeAt: #type put: anObject. + otherSide extendsTypeClauseTypeOwner: nil ] + ifNotNil: [ + self attributeAt: #type put: anObject. + anObject extendsTypeClauseTypeOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptFalse.class.st b/FAST-TypeScript-Model/FASTTypeScriptFalse.class.st index 36738b4..b668021 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptFalse.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptFalse.class.st @@ -1,6 +1,84 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptFalse', #superclass : 'FASTTypeScriptBoolean', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +87,8 @@ Class { { #category : 'meta' } FASTTypeScriptFalse class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptFalse class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptFalse } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptFinallyClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptFinallyClause.class.st index 7b95655..dae659c 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptFinallyClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptFinallyClause.class.st @@ -19,8 +19,8 @@ Class { #name : 'FASTTypeScriptFinallyClause', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#tryStatementFinalizerOwner => FMOne type: #FASTTypeScriptTryStatement opposite: #finalizer', - '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #finallyClauseBodyOwner' + '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #finallyClauseBodyOwner', + '#tryStatementFinalizerOwner => FMOne type: #FASTTypeScriptTryStatement opposite: #finalizer' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -30,24 +30,17 @@ Class { { #category : 'meta' } FASTTypeScriptFinallyClause class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptFinallyClause class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptFinally_clause } - - ] { #category : 'accessing' } FASTTypeScriptFinallyClause >> body [ "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #finallyClauseBodyOwner" + ^ body @@ -56,21 +49,16 @@ FASTTypeScriptFinallyClause >> body [ { #category : 'accessing' } FASTTypeScriptFinallyClause >> body: anObject [ + body := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFinallyClause >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body -] - { #category : 'accessing' } FASTTypeScriptFinallyClause >> tryStatementFinalizerOwner [ "Relation named: #tryStatementFinalizerOwner type: #FASTTypeScriptTryStatement opposite: #finalizer" + @@ -81,13 +69,7 @@ FASTTypeScriptFinallyClause >> tryStatementFinalizerOwner [ { #category : 'accessing' } FASTTypeScriptFinallyClause >> tryStatementFinalizerOwner: anObject [ + tryStatementFinalizerOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptFinallyClause >> tryStatementFinalizerOwnerGroup [ - - - ^ MooseSpecializedGroup with: self tryStatementFinalizerOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptFlowMaybeType.class.st b/FAST-TypeScript-Model/FASTTypeScriptFlowMaybeType.class.st index c914fc0..d4fffc2 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptFlowMaybeType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptFlowMaybeType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptFlowMaybeType` | `flowMaybeTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +80,11 @@ Class { #name : 'FASTTypeScriptFlowMaybeType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #flowMaybeTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptFlowMaybeType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptFlowMaybeType class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptFlowMaybeType >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #flowMaybeTypeOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptFlowMaybeType >> childrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptFlow_maybe_type } - - + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptForInStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptForInStatement.class.st index 9076905..7848816 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptForInStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptForInStatement.class.st @@ -6,8 +6,11 @@ | Relation | Origin | Opposite | Type | Comment | |---| | `body` | `FASTTypeScriptForInStatement` | `forInStatementBodyOwner` | `FASTTypeScriptStatementBlock` | My body| -| `left` | `FASTTypeScriptForInStatement` | `forStatementLeftOwner` | `FASTTExpression` | The left operand (if possible)| -| `right` | `FASTTypeScriptForInStatement` | `forStatementRightOwner` | `FASTTExpression` | The right operand (if possible)| +| `kind` | `FASTTypeScriptForInStatement` | `forInStatementKindOwner` | `FASTTypeScriptEntity` | | +| `left` | `FASTTypeScriptForInStatement` | `forInStatementLeftOwner` | `FASTTExpression` | The left operand (if possible)| +| `operator` | `FASTTypeScriptForInStatement` | `forInStatementOperatorOwner` | `FASTTypeScriptEntity` | | +| `right` | `FASTTypeScriptForInStatement` | `forInStatementRightOwner` | `FASTTExpression` | The right operand (if possible)| +| `value` | `FASTTypeScriptForInStatement` | `forInStatementValueOwner` | `FASTTExpression` | | @@ -16,7 +19,9 @@ Class { #name : 'FASTTypeScriptForInStatement', #superclass : 'FASTTypeScriptStatement', #instVars : [ - '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #forInStatementBodyOwner' + '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #forInStatementBodyOwner', + '#kind => FMOne type: #FASTTypeScriptEntity opposite: #forInStatementKindOwner', + '#operator => FMOne type: #FASTTypeScriptEntity opposite: #forInStatementOperatorOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -26,24 +31,17 @@ Class { { #category : 'meta' } FASTTypeScriptForInStatement class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptForInStatement class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptFor_in_statement } - - ] { #category : 'accessing' } FASTTypeScriptForInStatement >> body [ "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #forInStatementBodyOwner" + ^ body @@ -52,75 +50,118 @@ FASTTypeScriptForInStatement >> body [ { #category : 'accessing' } FASTTypeScriptForInStatement >> body: anObject [ + body := anObject ] -{ #category : 'navigation' } -FASTTypeScriptForInStatement >> bodyGroup [ +{ #category : 'accessing' } +FASTTypeScriptForInStatement >> kind [ + "Relation named: #kind type: #FASTTypeScriptEntity opposite: #forInStatementKindOwner" + + - - ^ MooseSpecializedGroup with: self body + ^ kind +] + +{ #category : 'accessing' } +FASTTypeScriptForInStatement >> kind: anObject [ + + + + kind := anObject ] { #category : 'accessing' } FASTTypeScriptForInStatement >> left [ - "Relation named: #left type: #FASTTExpression opposite: #forStatementLeftOwner" + "Relation named: #left type: #FASTTExpression opposite: #forInStatementLeftOwner" + - + ^ self attributeAt: #left ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptForInStatement >> left: anObject [ + (self attributeAt: #left ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self left. self attributeAt: #left put: anObject. - otherSide forStatementLeftOwner: nil ] + otherSide forInStatementLeftOwner: nil ] ifNotNil: [ self attributeAt: #left put: anObject. - anObject forStatementLeftOwner: self ] + anObject forInStatementLeftOwner: self ] +] + +{ #category : 'accessing' } +FASTTypeScriptForInStatement >> operator [ + "Relation named: #operator type: #FASTTypeScriptEntity opposite: #forInStatementOperatorOwner" + + + + ^ operator ] -{ #category : 'navigation' } -FASTTypeScriptForInStatement >> leftGroup [ +{ #category : 'accessing' } +FASTTypeScriptForInStatement >> operator: anObject [ + + - - ^ MooseSpecializedGroup with: self left + operator := anObject ] { #category : 'accessing' } FASTTypeScriptForInStatement >> right [ - "Relation named: #right type: #FASTTExpression opposite: #forStatementRightOwner" + "Relation named: #right type: #FASTTExpression opposite: #forInStatementRightOwner" + - + ^ self attributeAt: #right ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptForInStatement >> right: anObject [ + (self attributeAt: #right ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self right. self attributeAt: #right put: anObject. - otherSide forStatementRightOwner: nil ] + otherSide forInStatementRightOwner: nil ] ifNotNil: [ self attributeAt: #right put: anObject. - anObject forStatementRightOwner: self ] + anObject forInStatementRightOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptForInStatement >> rightGroup [ +{ #category : 'accessing' } +FASTTypeScriptForInStatement >> value [ + "Relation named: #value type: #FASTTExpression opposite: #forInStatementValueOwner" + + - - ^ MooseSpecializedGroup with: self right + + ^ self attributeAt: #value ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptForInStatement >> value: anObject [ + + + + (self attributeAt: #value ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self value. + self attributeAt: #value put: anObject. + otherSide forInStatementValueOwner: nil ] + ifNotNil: [ + self attributeAt: #value put: anObject. + anObject forInStatementValueOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptForStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptForStatement.class.st index 66565b8..c81f8e3 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptForStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptForStatement.class.st @@ -5,10 +5,10 @@ ### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `body` | `FASTTypeScriptForStatement` | `forBodyOwner` | `FASTTypeScriptStatementBlock` | | -| `condition` | `FASTTypeScriptForStatement` | `forConditionOwner` | `FASTTypeScriptBinaryExpression` | | -| `increment` | `FASTTypeScriptForStatement` | `forIncrementOwner` | `FASTTypeScriptUpdateExpression` | | -| `initializer` | `FASTTypeScriptForStatement` | `forInitializerOwner` | `FASTTypeScriptLexicalDeclaration` | | +| `body` | `FASTTypeScriptForStatement` | `forStatementBodyOwner` | `FASTTStatement` | | +| `condition` | `FASTTypeScriptForStatement` | `forStatementConditionOwner` | `FASTTypeScriptEntity` | | +| `increment` | `FASTTypeScriptForStatement` | `forStatementIncrementOwner` | `FASTTypeScriptEntity` | | +| `initializer` | `FASTTypeScriptForStatement` | `forStatementInitializerOwner` | `FASTTypeScriptEntity` | | @@ -17,10 +17,9 @@ Class { #name : 'FASTTypeScriptForStatement', #superclass : 'FASTTypeScriptStatement', #instVars : [ - '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #forBodyOwner', - '#condition => FMOne type: #FASTTypeScriptBinaryExpression opposite: #forConditionOwner', - '#increment => FMOne type: #FASTTypeScriptUpdateExpression opposite: #forIncrementOwner', - '#initializer => FMOne type: #FASTTypeScriptLexicalDeclaration opposite: #forInitializerOwner' + '#condition => FMMany type: #FASTTypeScriptEntity opposite: #forStatementConditionOwner', + '#increment => FMOne type: #FASTTypeScriptEntity opposite: #forStatementIncrementOwner', + '#initializer => FMOne type: #FASTTypeScriptEntity opposite: #forStatementInitializerOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -30,69 +29,68 @@ Class { { #category : 'meta' } FASTTypeScriptForStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptForStatement class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptForStatement >> addCondition: anObject [ - self deprecatedAliases: { #FASTTypescriptFor_statement } - - - + + + ^ self condition add: anObject ] { #category : 'accessing' } FASTTypeScriptForStatement >> body [ - "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #forBodyOwner" + "Relation named: #body type: #FASTTStatement opposite: #forStatementBodyOwner" + - ^ body + + ^ self attributeAt: #body ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptForStatement >> body: anObject [ + - body := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptForStatement >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body + (self attributeAt: #body ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self body. + self attributeAt: #body put: anObject. + otherSide forStatementBodyOwner: nil ] + ifNotNil: [ + self attributeAt: #body put: anObject. + anObject forStatementBodyOwner: self ] ] { #category : 'accessing' } FASTTypeScriptForStatement >> condition [ - "Relation named: #condition type: #FASTTypeScriptBinaryExpression opposite: #forConditionOwner" + "Relation named: #condition type: #FASTTypeScriptEntity opposite: #forStatementConditionOwner" + + ^ condition ] { #category : 'accessing' } FASTTypeScriptForStatement >> condition: anObject [ + - condition := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptForStatement >> conditionGroup [ - - - ^ MooseSpecializedGroup with: self condition + condition value: anObject ] { #category : 'accessing' } FASTTypeScriptForStatement >> increment [ - "Relation named: #increment type: #FASTTypeScriptUpdateExpression opposite: #forIncrementOwner" + "Relation named: #increment type: #FASTTypeScriptEntity opposite: #forStatementIncrementOwner" + ^ increment ] @@ -100,21 +98,16 @@ FASTTypeScriptForStatement >> increment [ { #category : 'accessing' } FASTTypeScriptForStatement >> increment: anObject [ + increment := anObject ] -{ #category : 'navigation' } -FASTTypeScriptForStatement >> incrementGroup [ - - - ^ MooseSpecializedGroup with: self increment -] - { #category : 'accessing' } FASTTypeScriptForStatement >> initializer [ - "Relation named: #initializer type: #FASTTypeScriptLexicalDeclaration opposite: #forInitializerOwner" + "Relation named: #initializer type: #FASTTypeScriptEntity opposite: #forStatementInitializerOwner" + ^ initializer ] @@ -122,13 +115,7 @@ FASTTypeScriptForStatement >> initializer [ { #category : 'accessing' } FASTTypeScriptForStatement >> initializer: anObject [ + initializer := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptForStatement >> initializerGroup [ - - - ^ MooseSpecializedGroup with: self initializer -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptFormalParameters.class.st b/FAST-TypeScript-Model/FASTTypeScriptFormalParameters.class.st index da0b887..ffe59e5 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptFormalParameters.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptFormalParameters.class.st @@ -5,11 +5,19 @@ ### Parents | Relation | Origin | Opposite | Type | Comment | |---| +| `abstractMethodSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptAbstractMethodSignature` | | | `arrowFunctionParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptArrowFunction` | My owner| +| `callSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptCallSignature` | | +| `constructSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptConstructSignature` | | | `constructorTypeParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptConstructorType` | The owner of these formal parameters| | `functionDeclarationParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptFunctionDeclaration` | My owner| +| `functionExpressionParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptFunctionExpression` | | +| `functionSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptFunctionSignature` | | | `functionTypeParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptFunctionType` | My owner| +| `generatorFunctionDeclarationParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptGeneratorFunctionDeclaration` | | +| `generatorFunctionParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptGeneratorFunction` | | | `methodDefinitionParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptMethodDefinition` | My owner| +| `methodSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | `parameters` | `FASTTypeScriptMethodSignature` | | ### Children | Relation | Origin | Opposite | Type | Comment | @@ -23,11 +31,19 @@ Class { #name : 'FASTTypeScriptFormalParameters', #superclass : 'FASTTypeScriptEntity', #instVars : [ + '#abstractMethodSignatureParametersOwner => FMOne type: #FASTTypeScriptAbstractMethodSignature opposite: #parameters', '#arrowFunctionParametersOwner => FMOne type: #FASTTypeScriptArrowFunction opposite: #parameters', + '#callSignatureParametersOwner => FMOne type: #FASTTypeScriptCallSignature opposite: #parameters', + '#constructSignatureParametersOwner => FMOne type: #FASTTypeScriptConstructSignature opposite: #parameters', '#constructorTypeParametersOwner => FMOne type: #FASTTypeScriptConstructorType opposite: #parameters', '#functionDeclarationParametersOwner => FMOne type: #FASTTypeScriptFunctionDeclaration opposite: #parameters', + '#functionExpressionParametersOwner => FMOne type: #FASTTypeScriptFunctionExpression opposite: #parameters', + '#functionSignatureParametersOwner => FMOne type: #FASTTypeScriptFunctionSignature opposite: #parameters', '#functionTypeParametersOwner => FMOne type: #FASTTypeScriptFunctionType opposite: #parameters', - '#methodDefinitionParametersOwner => FMOne type: #FASTTypeScriptMethodDefinition opposite: #parameters' + '#generatorFunctionDeclarationParametersOwner => FMOne type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #parameters', + '#generatorFunctionParametersOwner => FMOne type: #FASTTypeScriptGeneratorFunction opposite: #parameters', + '#methodDefinitionParametersOwner => FMOne type: #FASTTypeScriptMethodDefinition opposite: #parameters', + '#methodSignatureParametersOwner => FMOne type: #FASTTypeScriptMethodSignature opposite: #parameters' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -37,22 +53,35 @@ Class { { #category : 'meta' } FASTTypeScriptFormalParameters class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptFormalParameters class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> abstractMethodSignatureParametersOwner [ + "Relation named: #abstractMethodSignatureParametersOwner type: #FASTTypeScriptAbstractMethodSignature opposite: #parameters" - self deprecatedAliases: { #FASTTypescriptFormal_parameters } - - + + + + + ^ abstractMethodSignatureParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> abstractMethodSignatureParametersOwner: anObject [ + + + + abstractMethodSignatureParametersOwner := anObject ] { #category : 'adding' } FASTTypeScriptFormalParameters >> addParameter: anObject [ + + ^ self parameters add: anObject ] @@ -61,6 +90,7 @@ FASTTypeScriptFormalParameters >> addParameter: anObject [ FASTTypeScriptFormalParameters >> arrowFunctionParametersOwner [ "Relation named: #arrowFunctionParametersOwner type: #FASTTypeScriptArrowFunction opposite: #parameters" + @@ -71,21 +101,54 @@ FASTTypeScriptFormalParameters >> arrowFunctionParametersOwner [ { #category : 'accessing' } FASTTypeScriptFormalParameters >> arrowFunctionParametersOwner: anObject [ + arrowFunctionParametersOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFormalParameters >> arrowFunctionParametersOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> callSignatureParametersOwner [ + "Relation named: #callSignatureParametersOwner type: #FASTTypeScriptCallSignature opposite: #parameters" + + + + + + ^ callSignatureParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> callSignatureParametersOwner: anObject [ + + + + callSignatureParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> constructSignatureParametersOwner [ + "Relation named: #constructSignatureParametersOwner type: #FASTTypeScriptConstructSignature opposite: #parameters" + + - - ^ MooseSpecializedGroup with: self arrowFunctionParametersOwner + + + ^ constructSignatureParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> constructSignatureParametersOwner: anObject [ + + + + constructSignatureParametersOwner := anObject ] { #category : 'accessing' } FASTTypeScriptFormalParameters >> constructorTypeParametersOwner [ "Relation named: #constructorTypeParametersOwner type: #FASTTypeScriptConstructorType opposite: #parameters" + @@ -96,21 +159,16 @@ FASTTypeScriptFormalParameters >> constructorTypeParametersOwner [ { #category : 'accessing' } FASTTypeScriptFormalParameters >> constructorTypeParametersOwner: anObject [ + constructorTypeParametersOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFormalParameters >> constructorTypeParametersOwnerGroup [ - - - ^ MooseSpecializedGroup with: self constructorTypeParametersOwner -] - { #category : 'accessing' } FASTTypeScriptFormalParameters >> functionDeclarationParametersOwner [ "Relation named: #functionDeclarationParametersOwner type: #FASTTypeScriptFunctionDeclaration opposite: #parameters" + @@ -121,21 +179,54 @@ FASTTypeScriptFormalParameters >> functionDeclarationParametersOwner [ { #category : 'accessing' } FASTTypeScriptFormalParameters >> functionDeclarationParametersOwner: anObject [ + functionDeclarationParametersOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFormalParameters >> functionDeclarationParametersOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> functionExpressionParametersOwner [ + "Relation named: #functionExpressionParametersOwner type: #FASTTypeScriptFunctionExpression opposite: #parameters" + + + + + + ^ functionExpressionParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> functionExpressionParametersOwner: anObject [ + + + + functionExpressionParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> functionSignatureParametersOwner [ + "Relation named: #functionSignatureParametersOwner type: #FASTTypeScriptFunctionSignature opposite: #parameters" + + + + + + ^ functionSignatureParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> functionSignatureParametersOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self functionDeclarationParametersOwner + functionSignatureParametersOwner := anObject ] { #category : 'accessing' } FASTTypeScriptFormalParameters >> functionTypeParametersOwner [ "Relation named: #functionTypeParametersOwner type: #FASTTypeScriptFunctionType opposite: #parameters" + @@ -146,21 +237,54 @@ FASTTypeScriptFormalParameters >> functionTypeParametersOwner [ { #category : 'accessing' } FASTTypeScriptFormalParameters >> functionTypeParametersOwner: anObject [ + functionTypeParametersOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFormalParameters >> functionTypeParametersOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> generatorFunctionDeclarationParametersOwner [ + "Relation named: #generatorFunctionDeclarationParametersOwner type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #parameters" + + + + + + ^ generatorFunctionDeclarationParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> generatorFunctionDeclarationParametersOwner: anObject [ + + + + generatorFunctionDeclarationParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> generatorFunctionParametersOwner [ + "Relation named: #generatorFunctionParametersOwner type: #FASTTypeScriptGeneratorFunction opposite: #parameters" + + - - ^ MooseSpecializedGroup with: self functionTypeParametersOwner + + + ^ generatorFunctionParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> generatorFunctionParametersOwner: anObject [ + + + + generatorFunctionParametersOwner := anObject ] { #category : 'accessing' } FASTTypeScriptFormalParameters >> methodDefinitionParametersOwner [ "Relation named: #methodDefinitionParametersOwner type: #FASTTypeScriptMethodDefinition opposite: #parameters" + @@ -171,38 +295,47 @@ FASTTypeScriptFormalParameters >> methodDefinitionParametersOwner [ { #category : 'accessing' } FASTTypeScriptFormalParameters >> methodDefinitionParametersOwner: anObject [ + methodDefinitionParametersOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFormalParameters >> methodDefinitionParametersOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> methodSignatureParametersOwner [ + "Relation named: #methodSignatureParametersOwner type: #FASTTypeScriptMethodSignature opposite: #parameters" + + + + + + ^ methodSignatureParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptFormalParameters >> methodSignatureParametersOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self methodDefinitionParametersOwner + methodSignatureParametersOwner := anObject ] { #category : 'accessing' } FASTTypeScriptFormalParameters >> parameters [ "Relation named: #parameters type: #FASTTEntity opposite: #parentFormalParameters" + + ^ self attributeAt: #parameters ifAbsentPut: [ FMMultivalueLink on: self opposite: #parentFormalParameters: ] ] { #category : 'accessing' } FASTTypeScriptFormalParameters >> parameters: anObject [ + self parameters value: anObject ] - -{ #category : 'navigation' } -FASTTypeScriptFormalParameters >> parametersGroup [ - - - ^ MooseSpecializedGroup withAll: self parameters asSet -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptFunctionDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptFunctionDeclaration.class.st index 97bba7f..1a47726 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptFunctionDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptFunctionDeclaration.class.st @@ -2,6 +2,23 @@ ## Relations ====================== +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + ### Children | Relation | Origin | Opposite | Type | Comment | |---| @@ -9,18 +26,29 @@ | `name` | `FASTTypeScriptFunctionDeclaration` | `functionDeclarationNameOwner` | `FASTTypeScriptIdentifier` | The name of the function| | `parameters` | `FASTTypeScriptFunctionDeclaration` | `functionDeclarationParametersOwner` | `FASTTypeScriptFormalParameters` | The parameters of the function| | `return_type` | `FASTTypeScriptFunctionDeclaration` | `functionDeclarationReturnTypeOwner` | `FASTTypeScriptTReturnType` | The return type of the function (in case it exists)| +| `type_parameters` | `FASTTypeScriptFunctionDeclaration` | `functionDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | " Class { #name : 'FASTTypeScriptFunctionDeclaration', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTDeclaration', + #classTraits : 'FASTTypeScriptTDeclaration classTrait', #instVars : [ '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #functionDeclarationBodyOwner', '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #functionDeclarationNameOwner', '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #functionDeclarationParametersOwner', - '#return_type => FMOne type: #FASTTypeScriptTReturnType opposite: #functionDeclarationReturnTypeOwner' + '#return_type => FMOne type: #FASTTypeScriptTReturnType opposite: #functionDeclarationReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #functionDeclarationTypeParametersOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -30,22 +58,17 @@ Class { { #category : 'meta' } FASTTypeScriptFunctionDeclaration class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptFunctionDeclaration class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptFunction_declaration } ] { #category : 'accessing' } FASTTypeScriptFunctionDeclaration >> body [ "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #functionDeclarationBodyOwner" + ^ body @@ -54,21 +77,16 @@ FASTTypeScriptFunctionDeclaration >> body [ { #category : 'accessing' } FASTTypeScriptFunctionDeclaration >> body: anObject [ + body := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFunctionDeclaration >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body -] - { #category : 'accessing' } FASTTypeScriptFunctionDeclaration >> name [ "Relation named: #name type: #FASTTypeScriptIdentifier opposite: #functionDeclarationNameOwner" + ^ name @@ -77,21 +95,16 @@ FASTTypeScriptFunctionDeclaration >> name [ { #category : 'accessing' } FASTTypeScriptFunctionDeclaration >> name: anObject [ + name := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFunctionDeclaration >> nameGroup [ - - - ^ MooseSpecializedGroup with: self name -] - { #category : 'accessing' } FASTTypeScriptFunctionDeclaration >> parameters [ "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #functionDeclarationParametersOwner" + ^ parameters @@ -100,21 +113,16 @@ FASTTypeScriptFunctionDeclaration >> parameters [ { #category : 'accessing' } FASTTypeScriptFunctionDeclaration >> parameters: anObject [ + parameters := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFunctionDeclaration >> parametersGroup [ - - - ^ MooseSpecializedGroup with: self parameters -] - { #category : 'accessing' } FASTTypeScriptFunctionDeclaration >> return_type [ "Relation named: #return_type type: #FASTTypeScriptTReturnType opposite: #functionDeclarationReturnTypeOwner" + ^ return_type @@ -123,13 +131,24 @@ FASTTypeScriptFunctionDeclaration >> return_type [ { #category : 'accessing' } FASTTypeScriptFunctionDeclaration >> return_type: anObject [ + return_type := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFunctionDeclaration >> return_typeGroup [ +{ #category : 'accessing' } +FASTTypeScriptFunctionDeclaration >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #functionDeclarationTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionDeclaration >> type_parameters: anObject [ + + - - ^ MooseSpecializedGroup with: self return_type + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptFunctionExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptFunctionExpression.class.st index efbdb33..083c967 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptFunctionExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptFunctionExpression.class.st @@ -1,6 +1,100 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptFunctionExpression` | `functionExpressionBodyOwner` | `FASTTypeScriptStatementBlock` | | +| `name` | `FASTTypeScriptFunctionExpression` | `functionExpressionNameOwner` | `FASTTypeScriptIdentifier` | | +| `parameters` | `FASTTypeScriptFunctionExpression` | `functionExpressionParametersOwner` | `FASTTypeScriptFormalParameters` | | +| `return_type` | `FASTTypeScriptFunctionExpression` | `functionExpressionReturnTypeOwner` | `FASTTypeScriptEntity` | | +| `type_parameters` | `FASTTypeScriptFunctionExpression` | `functionExpressionTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptFunctionExpression', #superclass : 'FASTTypeScriptExpression', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #functionExpressionBodyOwner', + '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #functionExpressionNameOwner', + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #functionExpressionParametersOwner', + '#return_type => FMOne type: #FASTTypeScriptEntity opposite: #functionExpressionReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #functionExpressionTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,17 +103,93 @@ Class { { #category : 'meta' } FASTTypeScriptFunctionExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptFunctionExpression class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> body [ + "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #functionExpressionBodyOwner" + + + + ^ body +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> body: anObject [ + + + + body := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> name [ + "Relation named: #name type: #FASTTypeScriptIdentifier opposite: #functionExpressionNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> parameters [ + "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #functionExpressionParametersOwner" + + + + ^ parameters +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> parameters: anObject [ - self deprecatedAliases: { #FASTTypescriptFunction_expression } + + + parameters := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> return_type [ + "Relation named: #return_type type: #FASTTypeScriptEntity opposite: #functionExpressionReturnTypeOwner" + + + + ^ return_type +] - - +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> return_type: anObject [ + + + + return_type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #functionExpressionTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionExpression >> type_parameters: anObject [ + + + + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptFunctionSignature.class.st b/FAST-TypeScript-Model/FASTTypeScriptFunctionSignature.class.st index f6c281d..fff62fb 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptFunctionSignature.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptFunctionSignature.class.st @@ -1,6 +1,53 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `name` | `FASTTypeScriptFunctionSignature` | `functionSignatureNameOwner` | `FASTTypeScriptIdentifier` | | +| `parameters` | `FASTTypeScriptFunctionSignature` | `functionSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | | +| `return_type` | `FASTTypeScriptFunctionSignature` | `functionSignatureReturnTypeOwner` | `FASTTypeScriptEntity` | | +| `type_parameters` | `FASTTypeScriptFunctionSignature` | `functionSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptFunctionSignature', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTDeclaration', + #classTraits : 'FASTTypeScriptTDeclaration classTrait', + #instVars : [ + '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #functionSignatureNameOwner', + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #functionSignatureParametersOwner', + '#return_type => FMOne type: #FASTTypeScriptEntity opposite: #functionSignatureReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #functionSignatureTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +56,76 @@ Class { { #category : 'meta' } FASTTypeScriptFunctionSignature class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptFunctionSignature class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptFunctionSignature >> name [ + "Relation named: #name type: #FASTTypeScriptIdentifier opposite: #functionSignatureNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionSignature >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionSignature >> parameters [ + "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #functionSignatureParametersOwner" + + + + ^ parameters +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionSignature >> parameters: anObject [ - self deprecatedAliases: { #FASTTypescriptFunction_signature } - - + + + parameters := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionSignature >> return_type [ + "Relation named: #return_type type: #FASTTypeScriptEntity opposite: #functionSignatureReturnTypeOwner" + + + + ^ return_type +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionSignature >> return_type: anObject [ + + + + return_type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionSignature >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #functionSignatureTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionSignature >> type_parameters: anObject [ + + + + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptFunctionType.class.st b/FAST-TypeScript-Model/FASTTypeScriptFunctionType.class.st index 70fd5f6..25d5011 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptFunctionType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptFunctionType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,28 +20,54 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ### Children | Relation | Origin | Opposite | Type | Comment | |---| | `parameters` | `FASTTypeScriptFunctionType` | `functionTypeParametersOwner` | `FASTTypeScriptFormalParameters` | My parameters| | `return_type` | `FASTTypeScriptFunctionType` | `functionTypeReturnTypeOwner` | `FASTTExpression` | My return type| +| `type_parameters` | `FASTTypeScriptFunctionType` | `functionTypeTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | ## Properties @@ -55,10 +82,11 @@ Class { #name : 'FASTTypeScriptFunctionType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTType classTrait', #instVars : [ - '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #functionTypeParametersOwner' + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #functionTypeParametersOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #functionTypeTypeParametersOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -68,25 +96,17 @@ Class { { #category : 'meta' } FASTTypeScriptFunctionType class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptFunctionType class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptFunction_type } - - - ] { #category : 'accessing' } FASTTypeScriptFunctionType >> parameters [ "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #functionTypeParametersOwner" + ^ parameters @@ -95,21 +115,16 @@ FASTTypeScriptFunctionType >> parameters [ { #category : 'accessing' } FASTTypeScriptFunctionType >> parameters: anObject [ + parameters := anObject ] -{ #category : 'navigation' } -FASTTypeScriptFunctionType >> parametersGroup [ - - - ^ MooseSpecializedGroup with: self parameters -] - { #category : 'accessing' } FASTTypeScriptFunctionType >> return_type [ "Relation named: #return_type type: #FASTTExpression opposite: #functionTypeReturnTypeOwner" + @@ -119,6 +134,7 @@ FASTTypeScriptFunctionType >> return_type [ { #category : 'accessing' } FASTTypeScriptFunctionType >> return_type: anObject [ + (self attributeAt: #return_type ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -130,9 +146,19 @@ FASTTypeScriptFunctionType >> return_type: anObject [ anObject functionTypeReturnTypeOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptFunctionType >> return_typeGroup [ +{ #category : 'accessing' } +FASTTypeScriptFunctionType >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #functionTypeTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptFunctionType >> type_parameters: anObject [ + + - - ^ MooseSpecializedGroup with: self return_type + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunction.class.st b/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunction.class.st index 67e4994..1966967 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunction.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunction.class.st @@ -1,6 +1,100 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptGeneratorFunction` | `generatorFunctionBodyOwner` | `FASTTypeScriptStatementBlock` | | +| `name` | `FASTTypeScriptGeneratorFunction` | `generatorFunctionNameOwner` | `FASTTypeScriptIdentifier` | | +| `parameters` | `FASTTypeScriptGeneratorFunction` | `generatorFunctionParametersOwner` | `FASTTypeScriptFormalParameters` | | +| `return_type` | `FASTTypeScriptGeneratorFunction` | `generatorFunctionReturnTypeOwner` | `FASTTypeScriptEntity` | | +| `type_parameters` | `FASTTypeScriptGeneratorFunction` | `generatorFunctionTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptGeneratorFunction', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #generatorFunctionBodyOwner', + '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #generatorFunctionNameOwner', + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #generatorFunctionParametersOwner', + '#return_type => FMOne type: #FASTTypeScriptEntity opposite: #generatorFunctionReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #generatorFunctionTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +103,93 @@ Class { { #category : 'meta' } FASTTypeScriptGeneratorFunction class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptGeneratorFunction class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> body [ + "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #generatorFunctionBodyOwner" + + + + ^ body +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> body: anObject [ + + + + body := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> name [ + "Relation named: #name type: #FASTTypeScriptIdentifier opposite: #generatorFunctionNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> parameters [ + "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #generatorFunctionParametersOwner" - self deprecatedAliases: { #FASTTypescriptGenerator_function } - - + + + ^ parameters +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> parameters: anObject [ + + + + parameters := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> return_type [ + "Relation named: #return_type type: #FASTTypeScriptEntity opposite: #generatorFunctionReturnTypeOwner" + + + + ^ return_type +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> return_type: anObject [ + + + + return_type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #generatorFunctionTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunction >> type_parameters: anObject [ + + + + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunctionDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunctionDeclaration.class.st index 32a9118..180c973 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunctionDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunctionDeclaration.class.st @@ -1,6 +1,55 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptGeneratorFunctionDeclaration` | `generatorFunctionDeclarationBodyOwner` | `FASTTypeScriptStatementBlock` | | +| `name` | `FASTTypeScriptGeneratorFunctionDeclaration` | `generatorFunctionDeclarationNameOwner` | `FASTTypeScriptIdentifier` | | +| `parameters` | `FASTTypeScriptGeneratorFunctionDeclaration` | `generatorFunctionDeclarationParametersOwner` | `FASTTypeScriptFormalParameters` | | +| `return_type` | `FASTTypeScriptGeneratorFunctionDeclaration` | `generatorFunctionDeclarationReturnTypeOwner` | `FASTTypeScriptEntity` | | +| `type_parameters` | `FASTTypeScriptGeneratorFunctionDeclaration` | `generatorFunctionDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptGeneratorFunctionDeclaration', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTDeclaration', + #classTraits : 'FASTTypeScriptTDeclaration classTrait', + #instVars : [ + '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #generatorFunctionDeclarationBodyOwner', + '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #generatorFunctionDeclarationNameOwner', + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #generatorFunctionDeclarationParametersOwner', + '#return_type => FMOne type: #FASTTypeScriptEntity opposite: #generatorFunctionDeclarationReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #generatorFunctionDeclarationTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,17 +58,93 @@ Class { { #category : 'meta' } FASTTypeScriptGeneratorFunctionDeclaration class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptGeneratorFunctionDeclaration class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> body [ + "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #generatorFunctionDeclarationBodyOwner" + + + + ^ body +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> body: anObject [ + + + + body := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> name [ + "Relation named: #name type: #FASTTypeScriptIdentifier opposite: #generatorFunctionDeclarationNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> parameters [ + "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #generatorFunctionDeclarationParametersOwner" + + + + ^ parameters +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> parameters: anObject [ - self deprecatedAliases: { #FASTTypescriptGenerator_function_declaration } + + + parameters := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> return_type [ + "Relation named: #return_type type: #FASTTypeScriptEntity opposite: #generatorFunctionDeclarationReturnTypeOwner" + + + + ^ return_type +] - - +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> return_type: anObject [ + + + + return_type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #generatorFunctionDeclarationTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptGeneratorFunctionDeclaration >> type_parameters: anObject [ + + + + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptGenericType.class.st b/FAST-TypeScript-Model/FASTTypeScriptGenericType.class.st index 05d9de4..d389c8e 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptGenericType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptGenericType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,28 +20,53 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `name` | `FASTTypeScriptGenericType` | `genericTypeNameOwner` | `FASTTypeScriptTypeIdentifier` | My name as type identifier| -| `type_arguments` | `FASTTypeScriptGenericType` | `genericTypeTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | My name as type identifier| +| `name` | `FASTTypeScriptGenericType` | `genericTypeNameOwner` | `FASTTExpression` | My name as type identifier| +| `type_arguments` | `FASTTypeScriptGenericType` | `genericTypeTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | My type arguments| ## Properties @@ -55,10 +81,9 @@ Class { #name : 'FASTTypeScriptGenericType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', #instVars : [ - '#name => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #genericTypeNameOwner', '#type_arguments => FMOne type: #FASTTypeScriptTypeArguments opposite: #genericTypeTypeArgumentsOwner' ], #category : 'FAST-TypeScript-Model-Entities', @@ -69,62 +94,52 @@ Class { { #category : 'meta' } FASTTypeScriptGenericType class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptGenericType class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptGeneric_type } - - ] { #category : 'accessing' } FASTTypeScriptGenericType >> name [ - "Relation named: #name type: #FASTTypeScriptTypeIdentifier opposite: #genericTypeNameOwner" + "Relation named: #name type: #FASTTExpression opposite: #genericTypeNameOwner" + - ^ name + + ^ self attributeAt: #name ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptGenericType >> name: anObject [ + - name := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptGenericType >> nameGroup [ - - - ^ MooseSpecializedGroup with: self name + (self attributeAt: #name ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self name. + self attributeAt: #name put: anObject. + otherSide genericTypeNameOwner: nil ] + ifNotNil: [ + self attributeAt: #name put: anObject. + anObject genericTypeNameOwner: self ] ] { #category : 'accessing' } FASTTypeScriptGenericType >> type_arguments [ "Relation named: #type_arguments type: #FASTTypeScriptTypeArguments opposite: #genericTypeTypeArgumentsOwner" + - + ^ type_arguments ] { #category : 'accessing' } FASTTypeScriptGenericType >> type_arguments: anObject [ + type_arguments := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptGenericType >> type_argumentsGroup [ - - - ^ MooseSpecializedGroup with: self type_arguments -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptHashBangLine.class.st b/FAST-TypeScript-Model/FASTTypeScriptHashBangLine.class.st index 65026c4..6650e57 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptHashBangLine.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptHashBangLine.class.st @@ -9,16 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptHashBangLine class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptHashBangLine class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptHash_bang_line } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptHtmlComment.class.st b/FAST-TypeScript-Model/FASTTypeScriptHtmlComment.class.st index f7c1180..c5a929a 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptHtmlComment.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptHtmlComment.class.st @@ -9,14 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptHtmlComment class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptHtmlComment class >> initialize [ - - self deprecatedAliases: { #FASTTypeScriptHtml_comment } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptIdentifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptIdentifier.class.st index 8a591bb..1b0fcaa 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptIdentifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptIdentifier.class.st @@ -12,6 +12,8 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | `left` | `FASTTypeScriptAssignmentPattern` | | +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -20,32 +22,63 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | | `enumDeclarationNameOwner` | `FASTTypeScriptIdentifier` | `name` | `FASTTypeScriptEnumDeclaration` | My owner| | `exportSpecifierAliasOwner` | `FASTTypeScriptTOptionalField` | `alias` | `FASTTypeScriptExportSpecifier` | My owner| | `exportSpecifierNameOwner` | `FASTTypeScriptIdentifier` | `name` | `FASTTypeScriptExportSpecifier` | My owner| +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionDeclarationNameOwner` | `FASTTypeScriptIdentifier` | `name` | `FASTTypeScriptFunctionDeclaration` | My owner| +| `functionExpressionNameOwner` | `FASTTypeScriptIdentifier` | `name` | `FASTTypeScriptFunctionExpression` | | +| `functionSignatureNameOwner` | `FASTTypeScriptIdentifier` | `name` | `FASTTypeScriptFunctionSignature` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `generatorFunctionDeclarationNameOwner` | `FASTTypeScriptIdentifier` | `name` | `FASTTypeScriptGeneratorFunctionDeclaration` | | +| `generatorFunctionNameOwner` | `FASTTypeScriptIdentifier` | `name` | `FASTTypeScriptGeneratorFunction` | | +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierAliasOwner` | `FASTTypeScriptIdentifier` | `alias` | `FASTTypeScriptImportSpecifier` | | +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| | `indexSignatureNameOwner` | `FASTTypeScriptIdentifier` | `name` | `FASTTypeScriptIndexSignature` | The owner of this identifier| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `methodDefinitionReturnTypeOwner` | `FASTTypeScriptTOptionalField` | `return_type` | `FASTTypeScriptMethodDefinition` | My owner| | `nestedIdentifierObjectOwner` | `FASTTypeScriptIdentifier` | `object` | `FASTTypeScriptNestedIdentifier` | The owner of this identifier| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `optionalParameterPatternOwner` | `FASTTypeScriptIdentifier` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterNameOwner` | `FASTTypeScriptIdentifier` | `name` | `FASTTypeScriptOptionalParameter` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| -| `requiredParameterPatternOwner` | `FASTTypeScriptIdentifier` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | | `requiredParameterTypeOwner` | `FASTTypeScriptTOptionalField` | `type` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -60,17 +93,21 @@ Class { #name : 'FASTTypeScriptIdentifier', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression + FASTTypeScriptTOptionalField', - #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTOptionalField classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTOptionalField + FASTTypeScriptTPattern + FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTOptionalField classTrait + FASTTypeScriptTPattern classTrait + FASTTypeScriptTPrimaryExpression classTrait', #instVars : [ '#arrowFunctionParameterOwner => FMOne type: #FASTTypeScriptArrowFunction opposite: #parameter', '#enumDeclarationNameOwner => FMOne type: #FASTTypeScriptEnumDeclaration opposite: #name', '#exportSpecifierNameOwner => FMOne type: #FASTTypeScriptExportSpecifier opposite: #name', '#functionDeclarationNameOwner => FMOne type: #FASTTypeScriptFunctionDeclaration opposite: #name', + '#functionExpressionNameOwner => FMOne type: #FASTTypeScriptFunctionExpression opposite: #name', + '#functionSignatureNameOwner => FMOne type: #FASTTypeScriptFunctionSignature opposite: #name', + '#generatorFunctionDeclarationNameOwner => FMOne type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #name', + '#generatorFunctionNameOwner => FMOne type: #FASTTypeScriptGeneratorFunction opposite: #name', + '#importSpecifierAliasOwner => FMOne type: #FASTTypeScriptImportSpecifier opposite: #alias', '#indexSignatureNameOwner => FMOne type: #FASTTypeScriptIndexSignature opposite: #name', '#nestedIdentifierObjectOwner => FMOne type: #FASTTypeScriptNestedIdentifier opposite: #object', - '#optionalParameterPatternOwner => FMOne type: #FASTTypeScriptOptionalParameter opposite: #pattern', - '#requiredParameterPatternOwner => FMOne type: #FASTTypeScriptRequiredParameter opposite: #pattern' + '#optionalParameterNameOwner => FMOne type: #FASTTypeScriptOptionalParameter opposite: #name' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -80,22 +117,17 @@ Class { { #category : 'meta' } FASTTypeScriptIdentifier class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptIdentifier class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptIdentifier } ] { #category : 'accessing' } FASTTypeScriptIdentifier >> arrowFunctionParameterOwner [ "Relation named: #arrowFunctionParameterOwner type: #FASTTypeScriptArrowFunction opposite: #parameter" + @@ -106,21 +138,16 @@ FASTTypeScriptIdentifier >> arrowFunctionParameterOwner [ { #category : 'accessing' } FASTTypeScriptIdentifier >> arrowFunctionParameterOwner: anObject [ + arrowFunctionParameterOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptIdentifier >> arrowFunctionParameterOwnerGroup [ - - - ^ MooseSpecializedGroup with: self arrowFunctionParameterOwner -] - { #category : 'accessing' } FASTTypeScriptIdentifier >> enumDeclarationNameOwner [ "Relation named: #enumDeclarationNameOwner type: #FASTTypeScriptEnumDeclaration opposite: #name" + @@ -131,21 +158,16 @@ FASTTypeScriptIdentifier >> enumDeclarationNameOwner [ { #category : 'accessing' } FASTTypeScriptIdentifier >> enumDeclarationNameOwner: anObject [ + enumDeclarationNameOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptIdentifier >> enumDeclarationNameOwnerGroup [ - - - ^ MooseSpecializedGroup with: self enumDeclarationNameOwner -] - { #category : 'accessing' } FASTTypeScriptIdentifier >> exportSpecifierNameOwner [ "Relation named: #exportSpecifierNameOwner type: #FASTTypeScriptExportSpecifier opposite: #name" + @@ -156,21 +178,16 @@ FASTTypeScriptIdentifier >> exportSpecifierNameOwner [ { #category : 'accessing' } FASTTypeScriptIdentifier >> exportSpecifierNameOwner: anObject [ + exportSpecifierNameOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptIdentifier >> exportSpecifierNameOwnerGroup [ - - - ^ MooseSpecializedGroup with: self exportSpecifierNameOwner -] - { #category : 'accessing' } FASTTypeScriptIdentifier >> functionDeclarationNameOwner [ "Relation named: #functionDeclarationNameOwner type: #FASTTypeScriptFunctionDeclaration opposite: #name" + @@ -181,112 +198,161 @@ FASTTypeScriptIdentifier >> functionDeclarationNameOwner [ { #category : 'accessing' } FASTTypeScriptIdentifier >> functionDeclarationNameOwner: anObject [ + functionDeclarationNameOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptIdentifier >> functionDeclarationNameOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptIdentifier >> functionExpressionNameOwner [ + "Relation named: #functionExpressionNameOwner type: #FASTTypeScriptFunctionExpression opposite: #name" + + - - ^ MooseSpecializedGroup with: self functionDeclarationNameOwner + + + ^ functionExpressionNameOwner ] { #category : 'accessing' } -FASTTypeScriptIdentifier >> indexSignatureNameOwner [ - "Relation named: #indexSignatureNameOwner type: #FASTTypeScriptIndexSignature opposite: #name" +FASTTypeScriptIdentifier >> functionExpressionNameOwner: anObject [ + + + functionExpressionNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptIdentifier >> functionSignatureNameOwner [ + "Relation named: #functionSignatureNameOwner type: #FASTTypeScriptFunctionSignature opposite: #name" + + - - ^ indexSignatureNameOwner + ^ functionSignatureNameOwner ] { #category : 'accessing' } -FASTTypeScriptIdentifier >> indexSignatureNameOwner: anObject [ +FASTTypeScriptIdentifier >> functionSignatureNameOwner: anObject [ + - indexSignatureNameOwner := anObject + functionSignatureNameOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptIdentifier >> indexSignatureNameOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptIdentifier >> generatorFunctionDeclarationNameOwner [ + "Relation named: #generatorFunctionDeclarationNameOwner type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #name" + + - - ^ MooseSpecializedGroup with: self indexSignatureNameOwner + + + ^ generatorFunctionDeclarationNameOwner ] { #category : 'accessing' } -FASTTypeScriptIdentifier >> nestedIdentifierObjectOwner [ - "Relation named: #nestedIdentifierObjectOwner type: #FASTTypeScriptNestedIdentifier opposite: #object" +FASTTypeScriptIdentifier >> generatorFunctionDeclarationNameOwner: anObject [ + + + generatorFunctionDeclarationNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptIdentifier >> generatorFunctionNameOwner [ + "Relation named: #generatorFunctionNameOwner type: #FASTTypeScriptGeneratorFunction opposite: #name" + + - - ^ nestedIdentifierObjectOwner + ^ generatorFunctionNameOwner ] { #category : 'accessing' } -FASTTypeScriptIdentifier >> nestedIdentifierObjectOwner: anObject [ +FASTTypeScriptIdentifier >> generatorFunctionNameOwner: anObject [ + - nestedIdentifierObjectOwner := anObject + generatorFunctionNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptIdentifier >> importSpecifierAliasOwner [ + "Relation named: #importSpecifierAliasOwner type: #FASTTypeScriptImportSpecifier opposite: #alias" + + + + + + ^ importSpecifierAliasOwner ] -{ #category : 'navigation' } -FASTTypeScriptIdentifier >> nestedIdentifierObjectOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptIdentifier >> importSpecifierAliasOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self nestedIdentifierObjectOwner + importSpecifierAliasOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptIdentifier >> optionalParameterPatternOwner [ - "Relation named: #optionalParameterPatternOwner type: #FASTTypeScriptOptionalParameter opposite: #pattern" +FASTTypeScriptIdentifier >> indexSignatureNameOwner [ + "Relation named: #indexSignatureNameOwner type: #FASTTypeScriptIndexSignature opposite: #name" + - ^ optionalParameterPatternOwner + ^ indexSignatureNameOwner ] { #category : 'accessing' } -FASTTypeScriptIdentifier >> optionalParameterPatternOwner: anObject [ +FASTTypeScriptIdentifier >> indexSignatureNameOwner: anObject [ + - optionalParameterPatternOwner := anObject + indexSignatureNameOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptIdentifier >> optionalParameterPatternOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptIdentifier >> nestedIdentifierObjectOwner [ + "Relation named: #nestedIdentifierObjectOwner type: #FASTTypeScriptNestedIdentifier opposite: #object" + + - - ^ MooseSpecializedGroup with: self optionalParameterPatternOwner + + + + ^ nestedIdentifierObjectOwner ] { #category : 'accessing' } -FASTTypeScriptIdentifier >> requiredParameterPatternOwner [ - "Relation named: #requiredParameterPatternOwner type: #FASTTypeScriptRequiredParameter opposite: #pattern" +FASTTypeScriptIdentifier >> nestedIdentifierObjectOwner: anObject [ + - - - ^ requiredParameterPatternOwner + nestedIdentifierObjectOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptIdentifier >> requiredParameterPatternOwner: anObject [ +FASTTypeScriptIdentifier >> optionalParameterNameOwner [ + "Relation named: #optionalParameterNameOwner type: #FASTTypeScriptOptionalParameter opposite: #name" + - requiredParameterPatternOwner := anObject + + + ^ optionalParameterNameOwner ] -{ #category : 'navigation' } -FASTTypeScriptIdentifier >> requiredParameterPatternOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptIdentifier >> optionalParameterNameOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self requiredParameterPatternOwner + optionalParameterNameOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptIfStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptIfStatement.class.st index 75f5858..20f3e1b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptIfStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptIfStatement.class.st @@ -28,24 +28,17 @@ Class { { #category : 'meta' } FASTTypeScriptIfStatement class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptIfStatement class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptIf_statement } - - ] { #category : 'accessing' } FASTTypeScriptIfStatement >> alternative [ "Relation named: #alternative type: #FASTTypeScriptElseClause opposite: #ifStatementAlternativeOwner" + ^ alternative ] @@ -53,21 +46,16 @@ FASTTypeScriptIfStatement >> alternative [ { #category : 'accessing' } FASTTypeScriptIfStatement >> alternative: anObject [ + alternative := anObject ] -{ #category : 'navigation' } -FASTTypeScriptIfStatement >> alternativeGroup [ - - - ^ MooseSpecializedGroup with: self alternative -] - { #category : 'accessing' } FASTTypeScriptIfStatement >> condition [ "Relation named: #condition type: #FASTTypeScriptParenthesizedExpression opposite: #ifStatementConditionOwner" + ^ condition @@ -76,21 +64,16 @@ FASTTypeScriptIfStatement >> condition [ { #category : 'accessing' } FASTTypeScriptIfStatement >> condition: anObject [ + condition := anObject ] -{ #category : 'navigation' } -FASTTypeScriptIfStatement >> conditionGroup [ - - - ^ MooseSpecializedGroup with: self condition -] - { #category : 'accessing' } FASTTypeScriptIfStatement >> consequence [ "Relation named: #consequence type: #FASTTypeScriptStatementBlock opposite: #ifStatementConsequenceOwner" + ^ consequence @@ -99,13 +82,7 @@ FASTTypeScriptIfStatement >> consequence [ { #category : 'accessing' } FASTTypeScriptIfStatement >> consequence: anObject [ + consequence := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptIfStatement >> consequenceGroup [ - - - ^ MooseSpecializedGroup with: self consequence -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptImplementsClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptImplementsClause.class.st index 58ad17f..d7e06da 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptImplementsClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptImplementsClause.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptImplementsClause` | `implementsClauseOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptImplementsClause', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #implementsClauseOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,34 @@ Class { { #category : 'meta' } FASTTypeScriptImplementsClause class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptImplementsClause class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptImplementsClause >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] - self deprecatedAliases: { #FASTTypescriptImplements_clause } - - +{ #category : 'accessing' } +FASTTypeScriptImplementsClause >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #implementsClauseOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptImplementsClause >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptImport.class.st b/FAST-TypeScript-Model/FASTTypeScriptImport.class.st index 87690f9..b164c23 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptImport.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptImport.class.st @@ -9,14 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptImport class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptImport class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptImport } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportAlias.class.st b/FAST-TypeScript-Model/FASTTypeScriptImportAlias.class.st index f4e4fa5..af4e54e 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptImportAlias.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptImportAlias.class.st @@ -1,6 +1,47 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptImportAlias` | `importAliasOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptImportAlias', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTDeclaration', + #classTraits : 'FASTTypeScriptTDeclaration classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #importAliasOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +50,34 @@ Class { { #category : 'meta' } FASTTypeScriptImportAlias class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptImportAlias class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptImportAlias >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptImport_alias } - - + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptImportAlias >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #importAliasOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptImportAlias >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportAttribute.class.st b/FAST-TypeScript-Model/FASTTypeScriptImportAttribute.class.st index 015a33f..900ee96 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptImportAttribute.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptImportAttribute.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptImportAttribute` | `importAttributeOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptImportAttribute', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #importAttributeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptImportAttribute class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptImportAttribute class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptImportAttribute >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #importAttributeOwner" - self deprecatedAliases: { #FASTTypescriptImport_attribute } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptImportAttribute >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptImportClause.class.st index da93f4d..3abc084 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptImportClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptImportClause.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptImportClause` | `importClauseOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptImportClause', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #importClauseOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,34 @@ Class { { #category : 'meta' } FASTTypeScriptImportClause class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptImportClause class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptImportClause >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] - self deprecatedAliases: { #FASTTypescriptImport_clause } - - +{ #category : 'accessing' } +FASTTypeScriptImportClause >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #importClauseOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptImportClause >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportRequireClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptImportRequireClause.class.st index 0f116e6..73f236a 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptImportRequireClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptImportRequireClause.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `source` | `FASTTypeScriptImportRequireClause` | `importRequireClauseSourceOwner` | `FASTTypeScriptString` | | + + + +" Class { #name : 'FASTTypeScriptImportRequireClause', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#source => FMOne type: #FASTTypeScriptString opposite: #importRequireClauseSourceOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptImportRequireClause class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptImportRequireClause class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptImportRequireClause >> source [ + "Relation named: #source type: #FASTTypeScriptString opposite: #importRequireClauseSourceOwner" - self deprecatedAliases: { #FASTTypescriptImport_require_clause } - - + + + ^ source +] + +{ #category : 'accessing' } +FASTTypeScriptImportRequireClause >> source: anObject [ + + + + source := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportSpecifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptImportSpecifier.class.st index 0a6df7a..1b6aea8 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptImportSpecifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptImportSpecifier.class.st @@ -1,6 +1,23 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `alias` | `FASTTypeScriptImportSpecifier` | `importSpecifierAliasOwner` | `FASTTypeScriptIdentifier` | | +| `name` | `FASTTypeScriptImportSpecifier` | `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | | + + + +" Class { #name : 'FASTTypeScriptImportSpecifier', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#alias => FMOne type: #FASTTypeScriptIdentifier opposite: #importSpecifierAliasOwner', + '#name => FMOne type: #FASTTypeScriptTPrimaryExpression opposite: #importSpecifierNameOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +26,42 @@ Class { { #category : 'meta' } FASTTypeScriptImportSpecifier class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptImportSpecifier class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptImportSpecifier >> alias [ + "Relation named: #alias type: #FASTTypeScriptIdentifier opposite: #importSpecifierAliasOwner" - self deprecatedAliases: { #FASTTypescriptImport_specifier } - - + + + ^ alias +] + +{ #category : 'accessing' } +FASTTypeScriptImportSpecifier >> alias: anObject [ + + + + alias := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptImportSpecifier >> name [ + "Relation named: #name type: #FASTTypeScriptTPrimaryExpression opposite: #importSpecifierNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptImportSpecifier >> name: anObject [ + + + + name := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptImportStatement.class.st index 86f54bb..d2a42b4 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptImportStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptImportStatement.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `source` | `FASTTypeScriptImportStatement` | `importStatementSourceOwner` | `FASTTypeScriptString` | | + + + +" Class { #name : 'FASTTypeScriptImportStatement', #superclass : 'FASTTypeScriptStatement', + #instVars : [ + '#source => FMOne type: #FASTTypeScriptString opposite: #importStatementSourceOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptImportStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptImportStatement class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptImportStatement >> source [ + "Relation named: #source type: #FASTTypeScriptString opposite: #importStatementSourceOwner" - self deprecatedAliases: { #FASTTypescriptImport_statement } - - + + + ^ source +] + +{ #category : 'accessing' } +FASTTypeScriptImportStatement >> source: anObject [ + + + + source := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptIndexSignature.class.st b/FAST-TypeScript-Model/FASTTypeScriptIndexSignature.class.st index d54fed8..1c4677b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptIndexSignature.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptIndexSignature.class.st @@ -5,9 +5,10 @@ ### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `index_type` | `FASTTypeScriptIndexSignature` | `indexSignatureIndexTypeOwner` | `FASTTypeScriptTypeIdentifier` | My type idetifier| +| `index_type` | `FASTTypeScriptIndexSignature` | `indexSignatureIndexTypeOwner` | `FASTTExpression` | My type identifier| | `name` | `FASTTypeScriptIndexSignature` | `indexSignatureNameOwner` | `FASTTypeScriptIdentifier` | My name| -| `type` | `FASTTypeScriptIndexSignature` | `indexSignatureTypeOwner` | `FASTTypeScriptTypeAnnotation` | My annotation type| +| `sign` | `FASTTypeScriptIndexSignature` | `indexSignatureSignOwner` | `FASTTypeScriptEntity` | | +| `type` | `FASTTypeScriptIndexSignature` | `indexSignatureTypeOwner` | `FASTTExpression` | My annotation type| @@ -16,9 +17,8 @@ Class { #name : 'FASTTypeScriptIndexSignature', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#index_type => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #indexSignatureIndexTypeOwner', - '#type => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #indexSignatureTypeOwner', - '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #indexSignatureNameOwner' + '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #indexSignatureNameOwner', + '#sign => FMOne type: #FASTTypeScriptEntity opposite: #indexSignatureSignOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -28,47 +28,43 @@ Class { { #category : 'meta' } FASTTypeScriptIndexSignature class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptIndexSignature class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptIndex_signature } - - ] { #category : 'accessing' } FASTTypeScriptIndexSignature >> index_type [ - "Relation named: #index_type type: #FASTTypeScriptTypeIdentifier opposite: #indexSignatureIndexTypeOwner" + "Relation named: #index_type type: #FASTTExpression opposite: #indexSignatureIndexTypeOwner" + - - ^ index_type + + + ^ self attributeAt: #index_type ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptIndexSignature >> index_type: anObject [ + - index_type := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptIndexSignature >> index_typeGroup [ - - - ^ MooseSpecializedGroup with: self index_type + (self attributeAt: #index_type ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self index_type. + self attributeAt: #index_type put: anObject. + otherSide indexSignatureIndexTypeOwner: nil ] + ifNotNil: [ + self attributeAt: #index_type put: anObject. + anObject indexSignatureIndexTypeOwner: self ] ] { #category : 'accessing' } FASTTypeScriptIndexSignature >> name [ "Relation named: #name type: #FASTTypeScriptIdentifier opposite: #indexSignatureNameOwner" + ^ name @@ -77,36 +73,50 @@ FASTTypeScriptIndexSignature >> name [ { #category : 'accessing' } FASTTypeScriptIndexSignature >> name: anObject [ + name := anObject ] -{ #category : 'navigation' } -FASTTypeScriptIndexSignature >> nameGroup [ +{ #category : 'accessing' } +FASTTypeScriptIndexSignature >> sign [ + "Relation named: #sign type: #FASTTypeScriptEntity opposite: #indexSignatureSignOwner" + + + + ^ sign +] + +{ #category : 'accessing' } +FASTTypeScriptIndexSignature >> sign: anObject [ + + - - ^ MooseSpecializedGroup with: self name + sign := anObject ] { #category : 'accessing' } FASTTypeScriptIndexSignature >> type [ - "Relation named: #type type: #FASTTypeScriptTypeAnnotation opposite: #indexSignatureTypeOwner" + "Relation named: #type type: #FASTTExpression opposite: #indexSignatureTypeOwner" + - ^ type + + ^ self attributeAt: #type ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptIndexSignature >> type: anObject [ + - type := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptIndexSignature >> typeGroup [ - - - ^ MooseSpecializedGroup with: self type + (self attributeAt: #type ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self type. + self attributeAt: #type put: anObject. + otherSide indexSignatureTypeOwner: nil ] + ifNotNil: [ + self attributeAt: #type put: anObject. + anObject indexSignatureTypeOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptIndexTypeQuery.class.st b/FAST-TypeScript-Model/FASTTypeScriptIndexTypeQuery.class.st index 44fe4ab..58a593c 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptIndexTypeQuery.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptIndexTypeQuery.class.st @@ -1,6 +1,90 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptIndexTypeQuery` | `indexTypeQueryOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptIndexTypeQuery', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #indexTypeQueryOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptIndexTypeQuery class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptIndexTypeQuery class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptIndexTypeQuery >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #indexTypeQueryOwner" - self deprecatedAliases: { #FASTTypescriptIndex_type_query } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptIndexTypeQuery >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptInferType.class.st b/FAST-TypeScript-Model/FASTTypeScriptInferType.class.st index b2446cd..2b8e57d 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptInferType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptInferType.class.st @@ -1,6 +1,90 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptInferType` | `inferTypeOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptInferType', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTType classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #inferTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +93,34 @@ Class { { #category : 'meta' } FASTTypeScriptInferType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptInferType class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptInferType >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptInfer_type } - - + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptInferType >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #inferTypeOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptInferType >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptInstantiationExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptInstantiationExpression.class.st index c2e4332..80e3825 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptInstantiationExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptInstantiationExpression.class.st @@ -1,6 +1,23 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `function` | `FASTTypeScriptInstantiationExpression` | `instantiationExpressionFunctionOwner` | `FASTTypeScriptEntity` | | +| `type_arguments` | `FASTTypeScriptInstantiationExpression` | `instantiationExpressionTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | | + + + +" Class { #name : 'FASTTypeScriptInstantiationExpression', #superclass : 'FASTTypeScriptExpression', + #instVars : [ + '#function => FMOne type: #FASTTypeScriptEntity opposite: #instantiationExpressionFunctionOwner', + '#type_arguments => FMOne type: #FASTTypeScriptTypeArguments opposite: #instantiationExpressionTypeArgumentsOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +26,42 @@ Class { { #category : 'meta' } FASTTypeScriptInstantiationExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptInstantiationExpression class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptInstantiationExpression >> function [ + "Relation named: #function type: #FASTTypeScriptEntity opposite: #instantiationExpressionFunctionOwner" - self deprecatedAliases: { #FASTTypescriptInstantiation_expression } - - + + + ^ function +] + +{ #category : 'accessing' } +FASTTypeScriptInstantiationExpression >> function: anObject [ + + + + function := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptInstantiationExpression >> type_arguments [ + "Relation named: #type_arguments type: #FASTTypeScriptTypeArguments opposite: #instantiationExpressionTypeArgumentsOwner" + + + + ^ type_arguments +] + +{ #category : 'accessing' } +FASTTypeScriptInstantiationExpression >> type_arguments: anObject [ + + + + type_arguments := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptInterfaceBody.class.st b/FAST-TypeScript-Model/FASTTypeScriptInterfaceBody.class.st index a44819c..910111b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptInterfaceBody.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptInterfaceBody.class.st @@ -7,6 +7,11 @@ |---| | `interfaceDeclarationBodyOwner` | `FASTTypeScriptInterfaceBody` | `body` | `FASTTypeScriptInterfaceDeclaration` | The interface declaration that contains me| +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptInterfaceBody` | `interfaceBodyOwner` | `FASTTypeScriptEntity` | | + " @@ -14,6 +19,7 @@ Class { #name : 'FASTTypeScriptInterfaceBody', #superclass : 'FASTTypeScriptEntity', #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #interfaceBodyOwner', '#interfaceDeclarationBodyOwner => FMOne type: #FASTTypeScriptInterfaceDeclaration opposite: #body' ], #category : 'FAST-TypeScript-Model-Entities', @@ -24,25 +30,43 @@ Class { { #category : 'meta' } FASTTypeScriptInterfaceBody class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptInterfaceBody class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptInterfaceBody >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptInterface_body } + + + ^ self childrenNodes add: anObject +] - - +{ #category : 'accessing' } +FASTTypeScriptInterfaceBody >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #interfaceBodyOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptInterfaceBody >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] { #category : 'accessing' } FASTTypeScriptInterfaceBody >> interfaceDeclarationBodyOwner [ "Relation named: #interfaceDeclarationBodyOwner type: #FASTTypeScriptInterfaceDeclaration opposite: #body" + @@ -53,13 +77,7 @@ FASTTypeScriptInterfaceBody >> interfaceDeclarationBodyOwner [ { #category : 'accessing' } FASTTypeScriptInterfaceBody >> interfaceDeclarationBodyOwner: anObject [ + interfaceDeclarationBodyOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptInterfaceBody >> interfaceDeclarationBodyOwnerGroup [ - - - ^ MooseSpecializedGroup with: self interfaceDeclarationBodyOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptInterfaceDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptInterfaceDeclaration.class.st index 311092e..396cc96 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptInterfaceDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptInterfaceDeclaration.class.st @@ -7,13 +7,18 @@ |---| | `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| | `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| -| `doBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| | `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| | `programInterfaceDeclarationOwner` | `FASTTypeScriptInterfaceDeclaration` | `interfaceDeclarations` | `FASTTypeScriptProgram` | The program that contains me| | `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | | `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| -| `whileBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | ### Children | Relation | Origin | Opposite | Type | Comment | @@ -22,6 +27,7 @@ | `declarations` | `FASTTypeScriptTWithDeclarations` | `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | The elements I declare| | `modifiers` | `FASTTypeScriptTWithModifiers` | `tWithModifiersModifiersOwner` | `FASTTypeScriptTModifier` | My modifiers| | `name` | `FASTTypeScriptInterfaceDeclaration` | `interfaceDeclarationNameOwner` | `FASTTypeScriptTypeIdentifier` | My name| +| `type_parameters` | `FASTTypeScriptInterfaceDeclaration` | `interfaceDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | ## Properties @@ -36,12 +42,13 @@ Class { #name : 'FASTTypeScriptInterfaceDeclaration', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTStatement + FASTTypeScriptTDeclaration + FASTTypeScriptTWithDeclarations + FASTTypeScriptTWithModifiers', - #classTraits : 'FASTTStatement classTrait + FASTTypeScriptTDeclaration classTrait + FASTTypeScriptTWithDeclarations classTrait + FASTTypeScriptTWithModifiers classTrait', + #traits : 'FASTTypeScriptTDeclaration + FASTTypeScriptTWithDeclarations + FASTTypeScriptTWithModifiers', + #classTraits : 'FASTTypeScriptTDeclaration classTrait + FASTTypeScriptTWithDeclarations classTrait + FASTTypeScriptTWithModifiers classTrait', #instVars : [ - '#programInterfaceDeclarationOwner => FMOne type: #FASTTypeScriptProgram opposite: #interfaceDeclarations', + '#body => FMOne type: #FASTTypeScriptInterfaceBody opposite: #interfaceDeclarationBodyOwner', '#name => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #interfaceDeclarationNameOwner', - '#body => FMOne type: #FASTTypeScriptInterfaceBody opposite: #interfaceDeclarationBodyOwner' + '#programInterfaceDeclarationOwner => FMOne type: #FASTTypeScriptProgram opposite: #interfaceDeclarations', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #interfaceDeclarationTypeParametersOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -51,31 +58,17 @@ Class { { #category : 'meta' } FASTTypeScriptInterfaceDeclaration class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptInterfaceDeclaration class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptInterface_declaration } - - - -] - -{ #category : 'visiting' } -FASTTypeScriptInterfaceDeclaration >> accept: aVisitor [ - - ^ aVisitor visitFASTTypeScriptInterfaceDeclaration: self ] { #category : 'accessing' } FASTTypeScriptInterfaceDeclaration >> body [ "Relation named: #body type: #FASTTypeScriptInterfaceBody opposite: #interfaceDeclarationBodyOwner" + ^ body @@ -84,21 +77,16 @@ FASTTypeScriptInterfaceDeclaration >> body [ { #category : 'accessing' } FASTTypeScriptInterfaceDeclaration >> body: anObject [ + body := anObject ] -{ #category : 'navigation' } -FASTTypeScriptInterfaceDeclaration >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body -] - { #category : 'accessing' } FASTTypeScriptInterfaceDeclaration >> name [ "Relation named: #name type: #FASTTypeScriptTypeIdentifier opposite: #interfaceDeclarationNameOwner" + ^ name @@ -107,21 +95,16 @@ FASTTypeScriptInterfaceDeclaration >> name [ { #category : 'accessing' } FASTTypeScriptInterfaceDeclaration >> name: anObject [ + name := anObject ] -{ #category : 'navigation' } -FASTTypeScriptInterfaceDeclaration >> nameGroup [ - - - ^ MooseSpecializedGroup with: self name -] - { #category : 'accessing' } FASTTypeScriptInterfaceDeclaration >> programInterfaceDeclarationOwner [ "Relation named: #programInterfaceDeclarationOwner type: #FASTTypeScriptProgram opposite: #interfaceDeclarations" + @@ -131,13 +114,24 @@ FASTTypeScriptInterfaceDeclaration >> programInterfaceDeclarationOwner [ { #category : 'accessing' } FASTTypeScriptInterfaceDeclaration >> programInterfaceDeclarationOwner: anObject [ + programInterfaceDeclarationOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptInterfaceDeclaration >> programInterfaceDeclarationOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptInterfaceDeclaration >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #interfaceDeclarationTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptInterfaceDeclaration >> type_parameters: anObject [ + + - - ^ MooseSpecializedGroup with: self programInterfaceDeclarationOwner + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptInternalModule.class.st b/FAST-TypeScript-Model/FASTTypeScriptInternalModule.class.st index debc289..4b2774b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptInternalModule.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptInternalModule.class.st @@ -1,6 +1,102 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptInternalModule` | `internalModuleBodyOwner` | `FASTTypeScriptStatementBlock` | | +| `name` | `FASTTypeScriptInternalModule` | `internalModuleNameOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptInternalModule', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTDeclaration', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTDeclaration classTrait', + #instVars : [ + '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #internalModuleBodyOwner', + '#name => FMOne type: #FASTTypeScriptEntity opposite: #internalModuleNameOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +105,42 @@ Class { { #category : 'meta' } FASTTypeScriptInternalModule class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptInternalModule class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptInternalModule >> body [ + "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #internalModuleBodyOwner" + + + + ^ body +] + +{ #category : 'accessing' } +FASTTypeScriptInternalModule >> body: anObject [ - self deprecatedAliases: { #FASTTypescriptInternal_module } - - + + + body := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptInternalModule >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #internalModuleNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptInternalModule >> name: anObject [ + + + + name := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptIntersectionType.class.st b/FAST-TypeScript-Model/FASTTypeScriptIntersectionType.class.st index b5e3c7b..cac0966 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptIntersectionType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptIntersectionType.class.st @@ -1,6 +1,90 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptIntersectionType` | `intersectionTypeOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptIntersectionType', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #intersectionTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +93,34 @@ Class { { #category : 'meta' } FASTTypeScriptIntersectionType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptIntersectionType class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptIntersectionType >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptIntersection_type } - - + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptIntersectionType >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #intersectionTypeOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptIntersectionType >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptJsxText.class.st b/FAST-TypeScript-Model/FASTTypeScriptJsxText.class.st index a3377e3..84300d9 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptJsxText.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptJsxText.class.st @@ -9,17 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptJsxText class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptJsxText class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptJsx_text } - - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptLabeledStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptLabeledStatement.class.st index 26ce996..384c329 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptLabeledStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptLabeledStatement.class.st @@ -1,6 +1,22 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptLabeledStatement` | `labeledStatementBodyOwner` | `FASTTStatement` | | +| `label` | `FASTTypeScriptLabeledStatement` | `labeledStatementLabelOwner` | `FASTTypeScriptStatementIdentifier` | | + + + +" Class { #name : 'FASTTypeScriptLabeledStatement', #superclass : 'FASTTypeScriptStatement', + #instVars : [ + '#label => FMOne type: #FASTTypeScriptStatementIdentifier opposite: #labeledStatementLabelOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +25,50 @@ Class { { #category : 'meta' } FASTTypeScriptLabeledStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptLabeledStatement class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptLabeledStatement >> body [ + "Relation named: #body type: #FASTTStatement opposite: #labeledStatementBodyOwner" - self deprecatedAliases: { #FASTTypescriptLabeled_statement } - - + + + + ^ self attributeAt: #body ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptLabeledStatement >> body: anObject [ + + + + (self attributeAt: #body ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self body. + self attributeAt: #body put: anObject. + otherSide labeledStatementBodyOwner: nil ] + ifNotNil: [ + self attributeAt: #body put: anObject. + anObject labeledStatementBodyOwner: self ] +] + +{ #category : 'accessing' } +FASTTypeScriptLabeledStatement >> label [ + "Relation named: #label type: #FASTTypeScriptStatementIdentifier opposite: #labeledStatementLabelOwner" + + + + ^ label +] + +{ #category : 'accessing' } +FASTTypeScriptLabeledStatement >> label: anObject [ + + + + label := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptLexicalDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptLexicalDeclaration.class.st index 191d161..b3c5181 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptLexicalDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptLexicalDeclaration.class.st @@ -5,16 +5,42 @@ ### Parents | Relation | Origin | Opposite | Type | Comment | |---| -| `forInitializerOwner` | `FASTTypeScriptLexicalDeclaration` | `initializer` | `FASTTypeScriptForStatement` | | +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `kind` | `FASTTypeScriptLexicalDeclaration` | `lexicalDeclarationKindOwner` | `FASTTypeScriptEntity` | | +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | " Class { #name : 'FASTTypeScriptLexicalDeclaration', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTDeclaration', + #classTraits : 'FASTTypeScriptTDeclaration classTrait', #instVars : [ - '#forInitializerOwner => FMOne type: #FASTTypeScriptForStatement opposite: #initializer' + '#kind => FMOne type: #FASTTypeScriptEntity opposite: #lexicalDeclarationKindOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -24,40 +50,25 @@ Class { { #category : 'meta' } FASTTypeScriptLexicalDeclaration class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptLexicalDeclaration class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptLexical_declaration } - - ] { #category : 'accessing' } -FASTTypeScriptLexicalDeclaration >> forInitializerOwner [ - "Relation named: #forInitializerOwner type: #FASTTypeScriptForStatement opposite: #initializer" +FASTTypeScriptLexicalDeclaration >> kind [ + "Relation named: #kind type: #FASTTypeScriptEntity opposite: #lexicalDeclarationKindOwner" + - - - ^ forInitializerOwner + ^ kind ] { #category : 'accessing' } -FASTTypeScriptLexicalDeclaration >> forInitializerOwner: anObject [ - - - forInitializerOwner := anObject -] +FASTTypeScriptLexicalDeclaration >> kind: anObject [ -{ #category : 'navigation' } -FASTTypeScriptLexicalDeclaration >> forInitializerOwnerGroup [ + - - ^ MooseSpecializedGroup with: self forInitializerOwner + kind := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptLiteral.class.st b/FAST-TypeScript-Model/FASTTypeScriptLiteral.class.st index 6999f9b..b46bc0c 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptLiteral.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptLiteral.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,47 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -60,14 +86,8 @@ Class { { #category : 'meta' } FASTTypeScriptLiteral class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptLiteral class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptLiteral } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptLiteralType.class.st b/FAST-TypeScript-Model/FASTTypeScriptLiteralType.class.st index 42ce656..4b1dd76 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptLiteralType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptLiteralType.class.st @@ -1,6 +1,90 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptLiteralType` | `literalTypeOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptLiteralType', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #literalTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptLiteralType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptLiteralType class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptLiteralType >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #literalTypeOwner" - self deprecatedAliases: { #FASTTypescriptLiteral_type } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptLiteralType >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptLookupType.class.st b/FAST-TypeScript-Model/FASTTypeScriptLookupType.class.st index d0dff0d..2aa15a0 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptLookupType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptLookupType.class.st @@ -1,6 +1,90 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptLookupType` | `lookupTypeOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptLookupType', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #lookupTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +93,34 @@ Class { { #category : 'meta' } FASTTypeScriptLookupType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptLookupType class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptLookupType >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptLookup_type } - - + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptLookupType >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #lookupTypeOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptLookupType >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptMappedTypeClause.class.st b/FAST-TypeScript-Model/FASTTypeScriptMappedTypeClause.class.st index b018eb7..ff57265 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptMappedTypeClause.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptMappedTypeClause.class.st @@ -1,6 +1,23 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `alias` | `FASTTypeScriptMappedTypeClause` | `mappedTypeClauseAliasOwner` | `FASTTExpression` | | +| `name` | `FASTTypeScriptMappedTypeClause` | `mappedTypeClauseNameOwner` | `FASTTypeScriptTypeIdentifier` | | +| `type` | `FASTTypeScriptMappedTypeClause` | `mappedTypeClauseTypeOwner` | `FASTTExpression` | | + + + +" Class { #name : 'FASTTypeScriptMappedTypeClause', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#name => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #mappedTypeClauseNameOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +26,75 @@ Class { { #category : 'meta' } FASTTypeScriptMappedTypeClause class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptMappedTypeClause class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptMappedTypeClause >> alias [ + "Relation named: #alias type: #FASTTExpression opposite: #mappedTypeClauseAliasOwner" + + + + + ^ self attributeAt: #alias ifAbsent: [ nil ] +] - self deprecatedAliases: { #FASTTypescriptMapped_type_clause } - - +{ #category : 'accessing' } +FASTTypeScriptMappedTypeClause >> alias: anObject [ + + + + (self attributeAt: #alias ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self alias. + self attributeAt: #alias put: anObject. + otherSide mappedTypeClauseAliasOwner: nil ] + ifNotNil: [ + self attributeAt: #alias put: anObject. + anObject mappedTypeClauseAliasOwner: self ] +] + +{ #category : 'accessing' } +FASTTypeScriptMappedTypeClause >> name [ + "Relation named: #name type: #FASTTypeScriptTypeIdentifier opposite: #mappedTypeClauseNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptMappedTypeClause >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptMappedTypeClause >> type [ + "Relation named: #type type: #FASTTExpression opposite: #mappedTypeClauseTypeOwner" + + + + + ^ self attributeAt: #type ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptMappedTypeClause >> type: anObject [ + + + + (self attributeAt: #type ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self type. + self attributeAt: #type put: anObject. + otherSide mappedTypeClauseTypeOwner: nil ] + ifNotNil: [ + self attributeAt: #type put: anObject. + anObject mappedTypeClauseTypeOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptMemberExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptMemberExpression.class.st index d5ec17b..f30843c 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptMemberExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptMemberExpression.class.st @@ -2,18 +2,94 @@ ## Relations ====================== +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | `left` | `FASTTypeScriptAssignmentPattern` | | +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + ### Children | Relation | Origin | Opposite | Type | Comment | |---| | `object` | `FASTTypeScriptMemberExpression` | `memberExpressionObjectOwner` | `FASTTExpression` | Object| +| `optionalChain` | `FASTTypeScriptMemberExpression` | `memberExpressionOptionalChainOwner` | `FASTTypeScriptOptionalChain` | | | `property` | `FASTTypeScriptMemberExpression` | `memberExpressionPropertyOwner` | `FASTTExpression` | Property| +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | " Class { #name : 'FASTTypeScriptMemberExpression', #superclass : 'FASTTypeScriptExpression', + #traits : 'FASTTypeScriptTPattern + FASTTypeScriptTPrimaryExpression + FASTTypeScriptTType', + #classTraits : 'FASTTypeScriptTPattern classTrait + FASTTypeScriptTPrimaryExpression classTrait + FASTTypeScriptTType classTrait', + #instVars : [ + '#optionalChain => FMOne type: #FASTTypeScriptOptionalChain opposite: #memberExpressionOptionalChainOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -22,24 +98,17 @@ Class { { #category : 'meta' } FASTTypeScriptMemberExpression class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptMemberExpression class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptMember_expression } - - ] { #category : 'accessing' } FASTTypeScriptMemberExpression >> object [ "Relation named: #object type: #FASTTExpression opposite: #memberExpressionObjectOwner" + @@ -49,6 +118,7 @@ FASTTypeScriptMemberExpression >> object [ { #category : 'accessing' } FASTTypeScriptMemberExpression >> object: anObject [ + (self attributeAt: #object ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -60,17 +130,28 @@ FASTTypeScriptMemberExpression >> object: anObject [ anObject memberExpressionObjectOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptMemberExpression >> objectGroup [ +{ #category : 'accessing' } +FASTTypeScriptMemberExpression >> optionalChain [ + "Relation named: #optionalChain type: #FASTTypeScriptOptionalChain opposite: #memberExpressionOptionalChainOwner" + + - - ^ MooseSpecializedGroup with: self object + ^ optionalChain +] + +{ #category : 'accessing' } +FASTTypeScriptMemberExpression >> optionalChain: anObject [ + + + + optionalChain := anObject ] { #category : 'accessing' } FASTTypeScriptMemberExpression >> property [ "Relation named: #property type: #FASTTExpression opposite: #memberExpressionPropertyOwner" + @@ -80,6 +161,7 @@ FASTTypeScriptMemberExpression >> property [ { #category : 'accessing' } FASTTypeScriptMemberExpression >> property: anObject [ + (self attributeAt: #property ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -90,10 +172,3 @@ FASTTypeScriptMemberExpression >> property: anObject [ self attributeAt: #property put: anObject. anObject memberExpressionPropertyOwner: self ] ] - -{ #category : 'navigation' } -FASTTypeScriptMemberExpression >> propertyGroup [ - - - ^ MooseSpecializedGroup with: self property -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptMetaProperty.class.st b/FAST-TypeScript-Model/FASTTypeScriptMetaProperty.class.st index eb018fd..fcebc78 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptMetaProperty.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptMetaProperty.class.st @@ -1,6 +1,84 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptMetaProperty', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +87,8 @@ Class { { #category : 'meta' } FASTTypeScriptMetaProperty class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptMetaProperty class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptMeta_property } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptMethodDefinition.class.st b/FAST-TypeScript-Model/FASTTypeScriptMethodDefinition.class.st index bd7b501..4be846c 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptMethodDefinition.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptMethodDefinition.class.st @@ -9,6 +9,7 @@ | `name` | `FASTTypeScriptMethodDefinition` | `methodDefinitionNameOwner` | `FASTTypeScriptPropertyIdentifier` | My name| | `parameters` | `FASTTypeScriptMethodDefinition` | `methodDefinitionParametersOwner` | `FASTTypeScriptFormalParameters` | My parameters| | `return_type` | `FASTTypeScriptMethodDefinition` | `methodDefinitionReturnTypeOwner` | `FASTTypeScriptTOptionalField` | My return type in case it exists| +| `type_parameters` | `FASTTypeScriptMethodDefinition` | `methodDefinitionTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | @@ -17,10 +18,11 @@ Class { #name : 'FASTTypeScriptMethodDefinition', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#return_type => FMOne type: #FASTTypeScriptTOptionalField opposite: #methodDefinitionReturnTypeOwner', - '#name => FMOne type: #FASTTypeScriptPropertyIdentifier opposite: #methodDefinitionNameOwner', '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #methodDefinitionBodyOwner', - '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #methodDefinitionParametersOwner' + '#name => FMOne type: #FASTTypeScriptPropertyIdentifier opposite: #methodDefinitionNameOwner', + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #methodDefinitionParametersOwner', + '#return_type => FMOne type: #FASTTypeScriptTOptionalField opposite: #methodDefinitionReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #methodDefinitionTypeParametersOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -30,24 +32,17 @@ Class { { #category : 'meta' } FASTTypeScriptMethodDefinition class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptMethodDefinition class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptMethod_definition } - - ] { #category : 'accessing' } FASTTypeScriptMethodDefinition >> body [ "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #methodDefinitionBodyOwner" + ^ body @@ -56,21 +51,16 @@ FASTTypeScriptMethodDefinition >> body [ { #category : 'accessing' } FASTTypeScriptMethodDefinition >> body: anObject [ + body := anObject ] -{ #category : 'navigation' } -FASTTypeScriptMethodDefinition >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body -] - { #category : 'accessing' } FASTTypeScriptMethodDefinition >> name [ "Relation named: #name type: #FASTTypeScriptPropertyIdentifier opposite: #methodDefinitionNameOwner" + ^ name @@ -79,21 +69,16 @@ FASTTypeScriptMethodDefinition >> name [ { #category : 'accessing' } FASTTypeScriptMethodDefinition >> name: anObject [ + name := anObject ] -{ #category : 'navigation' } -FASTTypeScriptMethodDefinition >> nameGroup [ - - - ^ MooseSpecializedGroup with: self name -] - { #category : 'accessing' } FASTTypeScriptMethodDefinition >> parameters [ "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #methodDefinitionParametersOwner" + ^ parameters @@ -102,21 +87,16 @@ FASTTypeScriptMethodDefinition >> parameters [ { #category : 'accessing' } FASTTypeScriptMethodDefinition >> parameters: anObject [ + parameters := anObject ] -{ #category : 'navigation' } -FASTTypeScriptMethodDefinition >> parametersGroup [ - - - ^ MooseSpecializedGroup with: self parameters -] - { #category : 'accessing' } FASTTypeScriptMethodDefinition >> return_type [ "Relation named: #return_type type: #FASTTypeScriptTOptionalField opposite: #methodDefinitionReturnTypeOwner" + ^ return_type @@ -125,13 +105,24 @@ FASTTypeScriptMethodDefinition >> return_type [ { #category : 'accessing' } FASTTypeScriptMethodDefinition >> return_type: anObject [ + return_type := anObject ] -{ #category : 'navigation' } -FASTTypeScriptMethodDefinition >> return_typeGroup [ +{ #category : 'accessing' } +FASTTypeScriptMethodDefinition >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #methodDefinitionTypeParametersOwner" + + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptMethodDefinition >> type_parameters: anObject [ + + - - ^ MooseSpecializedGroup with: self return_type + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptMethodSignature.class.st b/FAST-TypeScript-Model/FASTTypeScriptMethodSignature.class.st index b0b9b28..864d455 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptMethodSignature.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptMethodSignature.class.st @@ -1,6 +1,27 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `name` | `FASTTypeScriptMethodSignature` | `methodSignatureNameOwner` | `FASTTypeScriptEntity` | | +| `parameters` | `FASTTypeScriptMethodSignature` | `methodSignatureParametersOwner` | `FASTTypeScriptFormalParameters` | | +| `return_type` | `FASTTypeScriptMethodSignature` | `methodSignatureReturnTypeOwner` | `FASTTypeScriptEntity` | | +| `type_parameters` | `FASTTypeScriptMethodSignature` | `methodSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | + + + +" Class { #name : 'FASTTypeScriptMethodSignature', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#name => FMOne type: #FASTTypeScriptEntity opposite: #methodSignatureNameOwner', + '#parameters => FMOne type: #FASTTypeScriptFormalParameters opposite: #methodSignatureParametersOwner', + '#return_type => FMOne type: #FASTTypeScriptEntity opposite: #methodSignatureReturnTypeOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #methodSignatureTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,17 +30,76 @@ Class { { #category : 'meta' } FASTTypeScriptMethodSignature class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptMethodSignature class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptMethodSignature >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #methodSignatureNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptMethodSignature >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptMethodSignature >> parameters [ + "Relation named: #parameters type: #FASTTypeScriptFormalParameters opposite: #methodSignatureParametersOwner" + + + + ^ parameters +] + +{ #category : 'accessing' } +FASTTypeScriptMethodSignature >> parameters: anObject [ - self deprecatedAliases: { #FASTTypescriptMethod_signature } + + + parameters := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptMethodSignature >> return_type [ + "Relation named: #return_type type: #FASTTypeScriptEntity opposite: #methodSignatureReturnTypeOwner" + + + + ^ return_type +] + +{ #category : 'accessing' } +FASTTypeScriptMethodSignature >> return_type: anObject [ + + + + return_type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptMethodSignature >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #methodSignatureTypeParametersOwner" + + + + ^ type_parameters +] - - +{ #category : 'accessing' } +FASTTypeScriptMethodSignature >> type_parameters: anObject [ + + + + type_parameters := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptModel.class.st b/FAST-TypeScript-Model/FASTTypeScriptModel.class.st index 0531457..f8fb46e 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptModel.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptModel.class.st @@ -10,19 +10,17 @@ Class { { #category : 'accessing' } FASTTypeScriptModel class >> allSubmetamodelsPackagesNames [ + + ^ #(#'Moose-Query' #'Famix-Traits' #'FAST-Core-Model') ] { #category : 'meta' } FASTTypeScriptModel class >> annotation [ - + + + ] - -{ #category : 'class initialization' } -FASTTypeScriptModel class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptModel } -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptModule.class.st b/FAST-TypeScript-Model/FASTTypeScriptModule.class.st index 685363a..8aa55a9 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptModule.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptModule.class.st @@ -1,6 +1,49 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptModule` | `moduleBodyOwner` | `FASTTypeScriptStatementBlock` | | +| `name` | `FASTTypeScriptModule` | `moduleNameOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptModule', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTDeclaration', + #classTraits : 'FASTTypeScriptTDeclaration classTrait', + #instVars : [ + '#body => FMOne type: #FASTTypeScriptStatementBlock opposite: #moduleBodyOwner', + '#name => FMOne type: #FASTTypeScriptEntity opposite: #moduleNameOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +52,42 @@ Class { { #category : 'meta' } FASTTypeScriptModule class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptModule class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptModule >> body [ + "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #moduleBodyOwner" + + + + ^ body +] + +{ #category : 'accessing' } +FASTTypeScriptModule >> body: anObject [ - self deprecatedAliases: { #FASTTypescriptModule } + + + body := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptModule >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #moduleNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptModule >> name: anObject [ + + + + name := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptNamedImports.class.st b/FAST-TypeScript-Model/FASTTypeScriptNamedImports.class.st index c754abd..5da18ca 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptNamedImports.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptNamedImports.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptNamedImports` | `namedImportsOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptNamedImports', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #namedImportsOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,34 @@ Class { { #category : 'meta' } FASTTypeScriptNamedImports class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptNamedImports class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptNamedImports >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] - self deprecatedAliases: { #FASTTypescriptNamed_imports } - - +{ #category : 'accessing' } +FASTTypeScriptNamedImports >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #namedImportsOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptNamedImports >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptNamespaceExport.class.st b/FAST-TypeScript-Model/FASTTypeScriptNamespaceExport.class.st index 16778be..b3158fb 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptNamespaceExport.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptNamespaceExport.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptNamespaceExport` | `namespaceExportOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptNamespaceExport', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #namespaceExportOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptNamespaceExport class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptNamespaceExport class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptNamespaceExport >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #namespaceExportOwner" - self deprecatedAliases: { #FASTTypescriptNamespace_export } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptNamespaceExport >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptNamespaceImport.class.st b/FAST-TypeScript-Model/FASTTypeScriptNamespaceImport.class.st index 31f3eb8..ac44786 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptNamespaceImport.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptNamespaceImport.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptNamespaceImport` | `namespaceImportOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptNamespaceImport', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #namespaceImportOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptNamespaceImport class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptNamespaceImport class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptNamespaceImport >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #namespaceImportOwner" - self deprecatedAliases: { #FASTTypescriptNamespace_import } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptNamespaceImport >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptNestedIdentifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptNestedIdentifier.class.st index 5304b55..d6df839 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptNestedIdentifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptNestedIdentifier.class.st @@ -26,24 +26,17 @@ Class { { #category : 'meta' } FASTTypeScriptNestedIdentifier class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptNestedIdentifier class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptNested_identifier } - - ] { #category : 'accessing' } FASTTypeScriptNestedIdentifier >> object [ "Relation named: #object type: #FASTTypeScriptIdentifier opposite: #nestedIdentifierObjectOwner" + ^ object @@ -52,21 +45,16 @@ FASTTypeScriptNestedIdentifier >> object [ { #category : 'accessing' } FASTTypeScriptNestedIdentifier >> object: anObject [ + object := anObject ] -{ #category : 'navigation' } -FASTTypeScriptNestedIdentifier >> objectGroup [ - - - ^ MooseSpecializedGroup with: self object -] - { #category : 'accessing' } FASTTypeScriptNestedIdentifier >> property [ "Relation named: #property type: #FASTTypeScriptPropertyIdentifier opposite: #nestedIdentifierPropertyOwner" + ^ property @@ -75,13 +63,7 @@ FASTTypeScriptNestedIdentifier >> property [ { #category : 'accessing' } FASTTypeScriptNestedIdentifier >> property: anObject [ + property := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptNestedIdentifier >> propertyGroup [ - - - ^ MooseSpecializedGroup with: self property -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptNestedTypeIdentifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptNestedTypeIdentifier.class.st index df0ac00..07a1dc5 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptNestedTypeIdentifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptNestedTypeIdentifier.class.st @@ -1,6 +1,92 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `module` | `FASTTypeScriptNestedTypeIdentifier` | `nestedTypeIdentifierModuleOwner` | `FASTTypeScriptEntity` | | +| `name` | `FASTTypeScriptNestedTypeIdentifier` | `nestedTypeIdentifierNameOwner` | `FASTTypeScriptTypeIdentifier` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptNestedTypeIdentifier', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#module => FMOne type: #FASTTypeScriptEntity opposite: #nestedTypeIdentifierModuleOwner', + '#name => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #nestedTypeIdentifierNameOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +95,42 @@ Class { { #category : 'meta' } FASTTypeScriptNestedTypeIdentifier class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptNestedTypeIdentifier class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptNestedTypeIdentifier >> module [ + "Relation named: #module type: #FASTTypeScriptEntity opposite: #nestedTypeIdentifierModuleOwner" + + + + ^ module +] + +{ #category : 'accessing' } +FASTTypeScriptNestedTypeIdentifier >> module: anObject [ - self deprecatedAliases: { #FASTTypescriptNested_type_identifier } - - + + + module := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptNestedTypeIdentifier >> name [ + "Relation named: #name type: #FASTTypeScriptTypeIdentifier opposite: #nestedTypeIdentifierNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptNestedTypeIdentifier >> name: anObject [ + + + + name := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptNewExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptNewExpression.class.st index 4c60926..616965d 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptNewExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptNewExpression.class.st @@ -27,24 +27,17 @@ Class { { #category : 'meta' } FASTTypeScriptNewExpression class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptNewExpression class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptNew_expression } - - ] { #category : 'accessing' } FASTTypeScriptNewExpression >> arguments [ "Relation named: #arguments type: #FASTTypeScriptArguments opposite: #newExpressionArgumentsOwner" + ^ arguments @@ -53,21 +46,16 @@ FASTTypeScriptNewExpression >> arguments [ { #category : 'accessing' } FASTTypeScriptNewExpression >> arguments: anObject [ + arguments := anObject ] -{ #category : 'navigation' } -FASTTypeScriptNewExpression >> argumentsGroup [ - - - ^ MooseSpecializedGroup with: self arguments -] - { #category : 'accessing' } FASTTypeScriptNewExpression >> constructor [ "Relation named: #constructor type: #FASTTExpression opposite: #newExpressionConstructorOwner" + @@ -77,6 +65,7 @@ FASTTypeScriptNewExpression >> constructor [ { #category : 'accessing' } FASTTypeScriptNewExpression >> constructor: anObject [ + (self attributeAt: #constructor ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -88,17 +77,11 @@ FASTTypeScriptNewExpression >> constructor: anObject [ anObject newExpressionConstructorOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptNewExpression >> constructorGroup [ - - - ^ MooseSpecializedGroup with: self constructor -] - { #category : 'accessing' } FASTTypeScriptNewExpression >> type_arguments [ "Relation named: #type_arguments type: #FASTTypeScriptTypeArguments opposite: #newExpressionTypeArgumentsOwner" + '> ^ type_arguments @@ -107,13 +90,7 @@ FASTTypeScriptNewExpression >> type_arguments [ { #category : 'accessing' } FASTTypeScriptNewExpression >> type_arguments: anObject [ + type_arguments := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptNewExpression >> type_argumentsGroup [ - - - ^ MooseSpecializedGroup with: self type_arguments -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptNonNullExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptNonNullExpression.class.st index c5f372b..f4ae9c2 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptNonNullExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptNonNullExpression.class.st @@ -1,6 +1,93 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | `left` | `FASTTypeScriptAssignmentPattern` | | +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptNonNullExpression` | `nonNullExpressionOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptNonNullExpression', #superclass : 'FASTTypeScriptExpression', + #traits : 'FASTTypeScriptTPattern + FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPattern classTrait + FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #nonNullExpressionOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,18 +96,25 @@ Class { { #category : 'meta' } FASTTypeScriptNonNullExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptNonNullExpression class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptNonNullExpression >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #nonNullExpressionOwner" - self deprecatedAliases: { #FASTTypescriptNon_null_expression } + + + ^ childrenNode +] +{ #category : 'accessing' } +FASTTypeScriptNonNullExpression >> childrenNode: anObject [ - - + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptNull.class.st b/FAST-TypeScript-Model/FASTTypeScriptNull.class.st index 4999dd2..0778f86 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptNull.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptNull.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,49 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -50,8 +78,8 @@ Class { #name : 'FASTTypeScriptNull', #superclass : 'FASTTypeScriptLiteral', - #traits : 'FASTTNullPointerLiteral', - #classTraits : 'FASTTNullPointerLiteral classTrait', + #traits : 'FASTTNullPointerLiteral + FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTNullPointerLiteral classTrait + FASTTypeScriptTPrimaryExpression classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -60,15 +88,8 @@ Class { { #category : 'meta' } FASTTypeScriptNull class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptNull class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptNull } - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptNumber.class.st b/FAST-TypeScript-Model/FASTTypeScriptNumber.class.st index a4e27bf..2f17691 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptNumber.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptNumber.class.st @@ -1,6 +1,84 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptNumber', #superclass : 'FASTTypeScriptLiteral', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,15 +87,8 @@ Class { { #category : 'meta' } FASTTypeScriptNumber class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptNumber class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptNumber } - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptObject.class.st b/FAST-TypeScript-Model/FASTTypeScriptObject.class.st index bdfca94..86cb432 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptObject.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptObject.class.st @@ -1,6 +1,92 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptObject` | `objectOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptObject', #superclass : 'FASTTypeScriptExpression', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #objectOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +95,34 @@ Class { { #category : 'meta' } FASTTypeScriptObject class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptObject class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptObject >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptObject } + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptObject >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #objectOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptObject >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptObjectAssignmentPattern.class.st b/FAST-TypeScript-Model/FASTTypeScriptObjectAssignmentPattern.class.st index 6e127f8..e7623cd 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptObjectAssignmentPattern.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptObjectAssignmentPattern.class.st @@ -1,6 +1,22 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `left` | `FASTTypeScriptObjectAssignmentPattern` | `objectAssignmentPatternLeftOwner` | `FASTTypeScriptEntity` | | +| `right` | `FASTTypeScriptObjectAssignmentPattern` | `objectAssignmentPatternRightOwner` | `FASTTExpression` | | + + + +" Class { #name : 'FASTTypeScriptObjectAssignmentPattern', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#left => FMOne type: #FASTTypeScriptEntity opposite: #objectAssignmentPatternLeftOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +25,50 @@ Class { { #category : 'meta' } FASTTypeScriptObjectAssignmentPattern class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptObjectAssignmentPattern class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptObjectAssignmentPattern >> left [ + "Relation named: #left type: #FASTTypeScriptEntity opposite: #objectAssignmentPatternLeftOwner" - self deprecatedAliases: { #FASTTypescriptObject_assignment_pattern } + + + ^ left +] + +{ #category : 'accessing' } +FASTTypeScriptObjectAssignmentPattern >> left: anObject [ + + + + left := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptObjectAssignmentPattern >> right [ + "Relation named: #right type: #FASTTExpression opposite: #objectAssignmentPatternRightOwner" + + + + + ^ self attributeAt: #right ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptObjectAssignmentPattern >> right: anObject [ + + + + (self attributeAt: #right ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self right. + self attributeAt: #right put: anObject. + otherSide objectAssignmentPatternRightOwner: nil ] + ifNotNil: [ + self attributeAt: #right put: anObject. + anObject objectAssignmentPatternRightOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptObjectPattern.class.st b/FAST-TypeScript-Model/FASTTypeScriptObjectPattern.class.st index 8a7e7d4..0fb2fa4 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptObjectPattern.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptObjectPattern.class.st @@ -1,6 +1,91 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | `left` | `FASTTypeScriptAssignmentPattern` | | +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptObjectPattern` | `objectPatternOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptObjectPattern', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTPattern', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPattern classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #objectPatternOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +94,34 @@ Class { { #category : 'meta' } FASTTypeScriptObjectPattern class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptObjectPattern class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptObjectPattern >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptObject_pattern } - - + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptObjectPattern >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #objectPatternOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptObjectPattern >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptObjectType.class.st b/FAST-TypeScript-Model/FASTTypeScriptObjectType.class.st index 3d18c24..9fd3395 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptObjectType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptObjectType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptObjectType` | `objectTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +80,11 @@ Class { #name : 'FASTTypeScriptObjectType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #objectTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +93,34 @@ Class { { #category : 'meta' } FASTTypeScriptObjectType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptObjectType class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptObjectType >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptObjectType >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #objectTypeOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptObjectType >> childrenNodes: anObject [ - self deprecatedAliases: { #FASTTypescriptObject_type } - - + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptOmittingTypeAnnotation.class.st b/FAST-TypeScript-Model/FASTTypeScriptOmittingTypeAnnotation.class.st index a5b308e..ed46cfe 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptOmittingTypeAnnotation.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptOmittingTypeAnnotation.class.st @@ -1,6 +1,90 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptOmittingTypeAnnotation` | `omittingTypeAnnotationOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptOmittingTypeAnnotation', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression', + #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #omittingTypeAnnotationOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptOmittingTypeAnnotation class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptOmittingTypeAnnotation class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptOmittingTypeAnnotation >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #omittingTypeAnnotationOwner" - self deprecatedAliases: { #FASTTypescriptOmitting_type_annotation } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptOmittingTypeAnnotation >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptOptingTypeAnnotation.class.st b/FAST-TypeScript-Model/FASTTypeScriptOptingTypeAnnotation.class.st index b75a18a..aec8908 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptOptingTypeAnnotation.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptOptingTypeAnnotation.class.st @@ -1,6 +1,90 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptOptingTypeAnnotation` | `optingTypeAnnotationOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptOptingTypeAnnotation', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression', + #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #optingTypeAnnotationOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptOptingTypeAnnotation class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptOptingTypeAnnotation class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptOptingTypeAnnotation >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #optingTypeAnnotationOwner" - self deprecatedAliases: { #FASTTypescriptOpting_type_annotation } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptOptingTypeAnnotation >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptOptionalChain.class.st b/FAST-TypeScript-Model/FASTTypeScriptOptionalChain.class.st index 340796a..058deb9 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptOptionalChain.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptOptionalChain.class.st @@ -1,6 +1,23 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `memberExpressionOptionalChainOwner` | `FASTTypeScriptOptionalChain` | `optionalChain` | `FASTTypeScriptMemberExpression` | | +| `subscriptExpressionOptionalChainOwner` | `FASTTypeScriptOptionalChain` | `optionalChain` | `FASTTypeScriptSubscriptExpression` | | + + + +" Class { #name : 'FASTTypeScriptOptionalChain', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#memberExpressionOptionalChainOwner => FMOne type: #FASTTypeScriptMemberExpression opposite: #optionalChain', + '#subscriptExpressionOptionalChainOwner => FMOne type: #FASTTypeScriptSubscriptExpression opposite: #optionalChain' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +26,46 @@ Class { { #category : 'meta' } FASTTypeScriptOptionalChain class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptOptionalChain class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptOptionalChain >> memberExpressionOptionalChainOwner [ + "Relation named: #memberExpressionOptionalChainOwner type: #FASTTypeScriptMemberExpression opposite: #optionalChain" - self deprecatedAliases: { #FASTTypescriptOptional_chain } - - + + + + + ^ memberExpressionOptionalChainOwner +] + +{ #category : 'accessing' } +FASTTypeScriptOptionalChain >> memberExpressionOptionalChainOwner: anObject [ + + + + memberExpressionOptionalChainOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptOptionalChain >> subscriptExpressionOptionalChainOwner [ + "Relation named: #subscriptExpressionOptionalChainOwner type: #FASTTypeScriptSubscriptExpression opposite: #optionalChain" + + + + + + ^ subscriptExpressionOptionalChainOwner +] + +{ #category : 'accessing' } +FASTTypeScriptOptionalChain >> subscriptExpressionOptionalChainOwner: anObject [ + + + + subscriptExpressionOptionalChainOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptOptionalParameter.class.st b/FAST-TypeScript-Model/FASTTypeScriptOptionalParameter.class.st index 31359e6..f1951b0 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptOptionalParameter.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptOptionalParameter.class.st @@ -5,8 +5,11 @@ ### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `pattern` | `FASTTypeScriptOptionalParameter` | `optionalParameterPatternOwner` | `FASTTypeScriptIdentifier` | My pattern as identifier| +| `decorator` | `FASTTypeScriptOptionalParameter` | `optionalParameterDecoratorOwner` | `FASTTypeScriptDecorator` | | +| `name` | `FASTTypeScriptOptionalParameter` | `optionalParameterNameOwner` | `FASTTypeScriptIdentifier` | | +| `pattern` | `FASTTypeScriptOptionalParameter` | `optionalParameterPatternOwner` | `FASTTExpression` | My pattern as identifier| | `type` | `FASTTypeScriptOptionalParameter` | `optionalParameterTypeOwner` | `FASTTypeScriptTypeAnnotation` | My type as type annotation| +| `value` | `FASTTypeScriptOptionalParameter` | `optionalParameterValueOwner` | `FASTTExpression` | | @@ -15,8 +18,9 @@ Class { #name : 'FASTTypeScriptOptionalParameter', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#type => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #optionalParameterTypeOwner', - '#pattern => FMOne type: #FASTTypeScriptIdentifier opposite: #optionalParameterPatternOwner' + '#decorator => FMMany type: #FASTTypeScriptDecorator opposite: #optionalParameterDecoratorOwner', + '#name => FMOne type: #FASTTypeScriptIdentifier opposite: #optionalParameterNameOwner', + '#type => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #optionalParameterTypeOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -26,47 +30,86 @@ Class { { #category : 'meta' } FASTTypeScriptOptionalParameter class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptOptionalParameter class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptOptionalParameter >> addDecorator: anObject [ - self deprecatedAliases: { #FASTTypescriptOptional_parameter } - - + + + ^ self decorator add: anObject ] { #category : 'accessing' } -FASTTypeScriptOptionalParameter >> pattern [ - "Relation named: #pattern type: #FASTTypeScriptIdentifier opposite: #optionalParameterPatternOwner" +FASTTypeScriptOptionalParameter >> decorator [ + "Relation named: #decorator type: #FASTTypeScriptDecorator opposite: #optionalParameterDecoratorOwner" + - - ^ pattern + + ^ decorator ] { #category : 'accessing' } -FASTTypeScriptOptionalParameter >> pattern: anObject [ +FASTTypeScriptOptionalParameter >> decorator: anObject [ + + + + decorator value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptOptionalParameter >> name [ + "Relation named: #name type: #FASTTypeScriptIdentifier opposite: #optionalParameterNameOwner" + - pattern := anObject + ^ name ] -{ #category : 'navigation' } -FASTTypeScriptOptionalParameter >> patternGroup [ +{ #category : 'accessing' } +FASTTypeScriptOptionalParameter >> name: anObject [ + + - - ^ MooseSpecializedGroup with: self pattern + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptOptionalParameter >> pattern [ + "Relation named: #pattern type: #FASTTExpression opposite: #optionalParameterPatternOwner" + + + + + + ^ self attributeAt: #pattern ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptOptionalParameter >> pattern: anObject [ + + + + (self attributeAt: #pattern ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self pattern. + self attributeAt: #pattern put: anObject. + otherSide optionalParameterPatternOwner: nil ] + ifNotNil: [ + self attributeAt: #pattern put: anObject. + anObject optionalParameterPatternOwner: self ] ] { #category : 'accessing' } FASTTypeScriptOptionalParameter >> type [ "Relation named: #type type: #FASTTypeScriptTypeAnnotation opposite: #optionalParameterTypeOwner" + ^ type @@ -75,13 +118,32 @@ FASTTypeScriptOptionalParameter >> type [ { #category : 'accessing' } FASTTypeScriptOptionalParameter >> type: anObject [ + type := anObject ] -{ #category : 'navigation' } -FASTTypeScriptOptionalParameter >> typeGroup [ +{ #category : 'accessing' } +FASTTypeScriptOptionalParameter >> value [ + "Relation named: #value type: #FASTTExpression opposite: #optionalParameterValueOwner" + + + + + ^ self attributeAt: #value ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptOptionalParameter >> value: anObject [ + + - - ^ MooseSpecializedGroup with: self type + (self attributeAt: #value ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self value. + self attributeAt: #value put: anObject. + otherSide optionalParameterValueOwner: nil ] + ifNotNil: [ + self attributeAt: #value put: anObject. + anObject optionalParameterValueOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptOptionalType.class.st b/FAST-TypeScript-Model/FASTTypeScriptOptionalType.class.st index 45341a4..9fd8d5b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptOptionalType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptOptionalType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptOptionalType` | `optionalTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -51,6 +82,9 @@ Class { #superclass : 'FASTTypeScriptEntity', #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #optionalTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptOptionalType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptOptionalType class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptOptionalType >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #optionalTypeOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptOptionalType >> childrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptOptional_type } - - + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptOverrideModifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptOverrideModifier.class.st index 5a4088f..45f645a 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptOverrideModifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptOverrideModifier.class.st @@ -9,16 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptOverrideModifier class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptOverrideModifier class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptOverride_modifier } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptPair.class.st b/FAST-TypeScript-Model/FASTTypeScriptPair.class.st index 37a85c8..a11cefd 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptPair.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptPair.class.st @@ -1,6 +1,22 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `key` | `FASTTypeScriptPair` | `pairKeyOwner` | `FASTTypeScriptEntity` | | +| `value` | `FASTTypeScriptPair` | `pairValueOwner` | `FASTTExpression` | | + + + +" Class { #name : 'FASTTypeScriptPair', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#key => FMOne type: #FASTTypeScriptEntity opposite: #pairKeyOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +25,50 @@ Class { { #category : 'meta' } FASTTypeScriptPair class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptPair class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptPair >> key [ + "Relation named: #key type: #FASTTypeScriptEntity opposite: #pairKeyOwner" - self deprecatedAliases: { #FASTTypescriptPair } + + + ^ key +] + +{ #category : 'accessing' } +FASTTypeScriptPair >> key: anObject [ + + + + key := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptPair >> value [ + "Relation named: #value type: #FASTTExpression opposite: #pairValueOwner" + + + + + ^ self attributeAt: #value ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptPair >> value: anObject [ + + + + (self attributeAt: #value ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self value. + self attributeAt: #value put: anObject. + otherSide pairValueOwner: nil ] + ifNotNil: [ + self attributeAt: #value put: anObject. + anObject pairValueOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptPairPattern.class.st b/FAST-TypeScript-Model/FASTTypeScriptPairPattern.class.st index e79ca6b..4679622 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptPairPattern.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptPairPattern.class.st @@ -1,6 +1,23 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `key` | `FASTTypeScriptPairPattern` | `pairPatternKeyOwner` | `FASTTypeScriptEntity` | | +| `value` | `FASTTypeScriptPairPattern` | `pairPatternValueOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptPairPattern', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#key => FMOne type: #FASTTypeScriptEntity opposite: #pairPatternKeyOwner', + '#value => FMOne type: #FASTTypeScriptEntity opposite: #pairPatternValueOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +26,42 @@ Class { { #category : 'meta' } FASTTypeScriptPairPattern class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptPairPattern class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptPairPattern >> key [ + "Relation named: #key type: #FASTTypeScriptEntity opposite: #pairPatternKeyOwner" - self deprecatedAliases: { #FASTTypescriptPair_pattern } - - + + + ^ key +] + +{ #category : 'accessing' } +FASTTypeScriptPairPattern >> key: anObject [ + + + + key := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptPairPattern >> value [ + "Relation named: #value type: #FASTTypeScriptEntity opposite: #pairPatternValueOwner" + + + + ^ value +] + +{ #category : 'accessing' } +FASTTypeScriptPairPattern >> value: anObject [ + + + + value := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptParenthesizedExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptParenthesizedExpression.class.st index b4e9fd2..59c27a8 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptParenthesizedExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptParenthesizedExpression.class.st @@ -5,21 +5,96 @@ ### Parents | Relation | Origin | Opposite | Type | Comment | |---| -| `doConditionOwner` | `FASTTypeScriptParenthesizedExpression` | `condition` | `FASTTypeScriptDoStatement` | | -| `ifStatementConditionOwner` | `FASTTypeScriptParenthesizedExpression` | `condition` | `FASTTypeScriptIfStatement` | The owner of this parenthesized expression| -| `whileConditionOwner` | `FASTTypeScriptParenthesizedExpression` | `condition` | `FASTTypeScriptWhileStatement` | | +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `doStatementConditionOwner` | `FASTTypeScriptParenthesizedExpression` | `condition` | `FASTTypeScriptDoStatement` | | +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `ifStatementConditionOwner` | `FASTTypeScriptParenthesizedExpression` | `condition` | `FASTTypeScriptIfStatement` | The owner of this parenthesized expression| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `switchStatementValueOwner` | `FASTTypeScriptParenthesizedExpression` | `value` | `FASTTypeScriptSwitchStatement` | | +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | +| `whileStatementConditionOwner` | `FASTTypeScriptParenthesizedExpression` | `condition` | `FASTTypeScriptWhileStatement` | | | `withStatementObjectOwner` | `FASTTypeScriptParenthesizedExpression` | `object` | `FASTTypeScriptWithStatement` | The owner of this type parenthesized expression| +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `type` | `FASTTypeScriptParenthesizedExpression` | `parenthesizedExpressionTypeOwner` | `FASTTypeScriptTypeAnnotation` | | + + +## Properties +====================== +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | " Class { #name : 'FASTTypeScriptParenthesizedExpression', #superclass : 'FASTTypeScriptExpression', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', #instVars : [ - '#doConditionOwner => FMOne type: #FASTTypeScriptDoStatement opposite: #condition', + '#doStatementConditionOwner => FMOne type: #FASTTypeScriptDoStatement opposite: #condition', '#ifStatementConditionOwner => FMOne type: #FASTTypeScriptIfStatement opposite: #condition', - '#whileConditionOwner => FMOne type: #FASTTypeScriptWhileStatement opposite: #condition', + '#switchStatementValueOwner => FMOne type: #FASTTypeScriptSwitchStatement opposite: #value', + '#type => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #parenthesizedExpressionTypeOwner', + '#whileStatementConditionOwner => FMOne type: #FASTTypeScriptWhileStatement opposite: #condition', '#withStatementObjectOwner => FMOne type: #FASTTypeScriptWithStatement opposite: #object' ], #category : 'FAST-TypeScript-Model-Entities', @@ -30,52 +105,38 @@ Class { { #category : 'meta' } FASTTypeScriptParenthesizedExpression class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptParenthesizedExpression class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptParenthesized_expression } - - - - ] { #category : 'accessing' } -FASTTypeScriptParenthesizedExpression >> doConditionOwner [ - "Relation named: #doConditionOwner type: #FASTTypeScriptDoStatement opposite: #condition" +FASTTypeScriptParenthesizedExpression >> doStatementConditionOwner [ + "Relation named: #doStatementConditionOwner type: #FASTTypeScriptDoStatement opposite: #condition" + - ^ doConditionOwner + ^ doStatementConditionOwner ] { #category : 'accessing' } -FASTTypeScriptParenthesizedExpression >> doConditionOwner: anObject [ +FASTTypeScriptParenthesizedExpression >> doStatementConditionOwner: anObject [ + - doConditionOwner := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptParenthesizedExpression >> doConditionOwnerGroup [ - - - ^ MooseSpecializedGroup with: self doConditionOwner + doStatementConditionOwner := anObject ] { #category : 'accessing' } FASTTypeScriptParenthesizedExpression >> ifStatementConditionOwner [ "Relation named: #ifStatementConditionOwner type: #FASTTypeScriptIfStatement opposite: #condition" + - + ^ ifStatementConditionOwner @@ -84,45 +145,71 @@ FASTTypeScriptParenthesizedExpression >> ifStatementConditionOwner [ { #category : 'accessing' } FASTTypeScriptParenthesizedExpression >> ifStatementConditionOwner: anObject [ + ifStatementConditionOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptParenthesizedExpression >> ifStatementConditionOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptParenthesizedExpression >> switchStatementValueOwner [ + "Relation named: #switchStatementValueOwner type: #FASTTypeScriptSwitchStatement opposite: #value" + + - - ^ MooseSpecializedGroup with: self ifStatementConditionOwner + + + ^ switchStatementValueOwner ] { #category : 'accessing' } -FASTTypeScriptParenthesizedExpression >> whileConditionOwner [ - "Relation named: #whileConditionOwner type: #FASTTypeScriptWhileStatement opposite: #condition" +FASTTypeScriptParenthesizedExpression >> switchStatementValueOwner: anObject [ + - - - ^ whileConditionOwner + switchStatementValueOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptParenthesizedExpression >> type [ + "Relation named: #type type: #FASTTypeScriptTypeAnnotation opposite: #parenthesizedExpressionTypeOwner" + + + + ^ type +] + +{ #category : 'accessing' } +FASTTypeScriptParenthesizedExpression >> type: anObject [ + + + + type := anObject ] { #category : 'accessing' } -FASTTypeScriptParenthesizedExpression >> whileConditionOwner: anObject [ +FASTTypeScriptParenthesizedExpression >> whileStatementConditionOwner [ + "Relation named: #whileStatementConditionOwner type: #FASTTypeScriptWhileStatement opposite: #condition" + - whileConditionOwner := anObject + + + ^ whileStatementConditionOwner ] -{ #category : 'navigation' } -FASTTypeScriptParenthesizedExpression >> whileConditionOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptParenthesizedExpression >> whileStatementConditionOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self whileConditionOwner + whileStatementConditionOwner := anObject ] { #category : 'accessing' } FASTTypeScriptParenthesizedExpression >> withStatementObjectOwner [ "Relation named: #withStatementObjectOwner type: #FASTTypeScriptWithStatement opposite: #object" + @@ -133,13 +220,7 @@ FASTTypeScriptParenthesizedExpression >> withStatementObjectOwner [ { #category : 'accessing' } FASTTypeScriptParenthesizedExpression >> withStatementObjectOwner: anObject [ + withStatementObjectOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptParenthesizedExpression >> withStatementObjectOwnerGroup [ - - - ^ MooseSpecializedGroup with: self withStatementObjectOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptParenthesizedType.class.st b/FAST-TypeScript-Model/FASTTypeScriptParenthesizedType.class.st index bf35482..6aa46bb 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptParenthesizedType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptParenthesizedType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptParenthesizedType` | `parenthesizedTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +80,11 @@ Class { #name : 'FASTTypeScriptParenthesizedType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #parenthesizedTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptParenthesizedType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptParenthesizedType class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptParenthesizedType >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #parenthesizedTypeOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptParenthesizedType >> childrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptParenthesized_type } - - + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptPredefinedType.class.st b/FAST-TypeScript-Model/FASTTypeScriptPredefinedType.class.st index 7588115..5a141db 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptPredefinedType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptPredefinedType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,47 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -49,8 +75,8 @@ Class { #name : 'FASTTypeScriptPredefinedType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +85,8 @@ Class { { #category : 'meta' } FASTTypeScriptPredefinedType class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptPredefinedType class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptPredefined_type } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptPrivatePropertyIdentifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptPrivatePropertyIdentifier.class.st index c57956f..703fe6b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptPrivatePropertyIdentifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptPrivatePropertyIdentifier.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,47 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -59,16 +85,8 @@ Class { { #category : 'meta' } FASTTypeScriptPrivatePropertyIdentifier class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptPrivatePropertyIdentifier class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptPrivate_property_identifier } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptProgram.class.st b/FAST-TypeScript-Model/FASTTypeScriptProgram.class.st index 9c1f866..d4c066e 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptProgram.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptProgram.class.st @@ -12,6 +12,7 @@ ### Children | Relation | Origin | Opposite | Type | Comment | |---| +| `childrenNodes` | `FASTTypeScriptProgram` | `programOwner` | `FASTTypeScriptEntity` | | | `classDeclarations` | `FASTTypeScriptProgram` | `programClassDeclarationOwner` | `FASTTypeScriptClassDeclaration` | The class declarations that I define| | `enumDeclarations` | `FASTTypeScriptProgram` | `programEnumDeclarationOwner` | `FASTTypeScriptEnumDeclaration` | The enum declarations that I define| | `interfaceDeclarations` | `FASTTypeScriptProgram` | `programInterfaceDeclarationOwner` | `FASTTypeScriptInterfaceDeclaration` | The interface declarations that I define| @@ -38,6 +39,7 @@ Class { #traits : '(FASTTEntity + FamixTHasImmediateSource withPrecedenceOf: FamixTHasImmediateSource)', #classTraits : '(FASTTEntity classTrait + FamixTHasImmediateSource classTrait withPrecedenceOf: FamixTHasImmediateSource classTrait)', #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #programOwner', '#classDeclarations => FMMany type: #FASTTypeScriptClassDeclaration opposite: #programClassDeclarationOwner', '#enumDeclarations => FMMany type: #FASTTypeScriptEnumDeclaration opposite: #programEnumDeclarationOwner', '#interfaceDeclarations => FMMany type: #FASTTypeScriptInterfaceDeclaration opposite: #programInterfaceDeclarationOwner' @@ -50,40 +52,67 @@ Class { { #category : 'meta' } FASTTypeScriptProgram class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptProgram class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptProgram >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptProgram } + + + ^ self childrenNodes add: anObject ] { #category : 'adding' } FASTTypeScriptProgram >> addClassDeclaration: anObject [ + + ^ self classDeclarations add: anObject ] { #category : 'adding' } FASTTypeScriptProgram >> addEnumDeclaration: anObject [ + + ^ self enumDeclarations add: anObject ] { #category : 'adding' } FASTTypeScriptProgram >> addInterfaceDeclaration: anObject [ + + ^ self interfaceDeclarations add: anObject ] +{ #category : 'accessing' } +FASTTypeScriptProgram >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #programOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptProgram >> childrenNodes: anObject [ + + + + childrenNodes value: anObject +] + { #category : 'accessing' } FASTTypeScriptProgram >> classDeclarations [ "Relation named: #classDeclarations type: #FASTTypeScriptClassDeclaration opposite: #programClassDeclarationOwner" + @@ -93,21 +122,16 @@ FASTTypeScriptProgram >> classDeclarations [ { #category : 'accessing' } FASTTypeScriptProgram >> classDeclarations: anObject [ + classDeclarations value: anObject ] -{ #category : 'navigation' } -FASTTypeScriptProgram >> classDeclarationsGroup [ - - - ^ MooseSpecializedGroup withAll: self classDeclarations asSet -] - { #category : 'accessing' } FASTTypeScriptProgram >> enumDeclarations [ "Relation named: #enumDeclarations type: #FASTTypeScriptEnumDeclaration opposite: #programEnumDeclarationOwner" + @@ -117,21 +141,16 @@ FASTTypeScriptProgram >> enumDeclarations [ { #category : 'accessing' } FASTTypeScriptProgram >> enumDeclarations: anObject [ + enumDeclarations value: anObject ] -{ #category : 'navigation' } -FASTTypeScriptProgram >> enumDeclarationsGroup [ - - - ^ MooseSpecializedGroup withAll: self enumDeclarations asSet -] - { #category : 'accessing' } FASTTypeScriptProgram >> interfaceDeclarations [ "Relation named: #interfaceDeclarations type: #FASTTypeScriptInterfaceDeclaration opposite: #programInterfaceDeclarationOwner" + @@ -141,13 +160,7 @@ FASTTypeScriptProgram >> interfaceDeclarations [ { #category : 'accessing' } FASTTypeScriptProgram >> interfaceDeclarations: anObject [ + interfaceDeclarations value: anObject ] - -{ #category : 'navigation' } -FASTTypeScriptProgram >> interfaceDeclarationsGroup [ - - - ^ MooseSpecializedGroup withAll: self interfaceDeclarations asSet -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptPropertyIdentifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptPropertyIdentifier.class.st index a0d81e5..5b26c83 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptPropertyIdentifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptPropertyIdentifier.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,24 +20,49 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `methodDefinitionNameOwner` | `FASTTypeScriptPropertyIdentifier` | `name` | `FASTTypeScriptMethodDefinition` | My owner| -| `nestedIdentifierPropertyOwner` | `FASTTypeScriptPropertyIdentifier` | `property` | `FASTTypeScriptNestedIdentifier` | The owner of this property identifier| +| `nestedIdentifierPropertyOwner` | `FASTTypeScriptPropertyIdentifier` | `property` | `FASTTypeScriptNestedIdentifier` | The owner of this property identifier| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -54,8 +80,8 @@ Class { #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', #instVars : [ - '#nestedIdentifierPropertyOwner => FMOne type: #FASTTypeScriptNestedIdentifier opposite: #property', - '#methodDefinitionNameOwner => FMOne type: #FASTTypeScriptMethodDefinition opposite: #name' + '#methodDefinitionNameOwner => FMOne type: #FASTTypeScriptMethodDefinition opposite: #name', + '#nestedIdentifierPropertyOwner => FMOne type: #FASTTypeScriptNestedIdentifier opposite: #property' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -65,24 +91,17 @@ Class { { #category : 'meta' } FASTTypeScriptPropertyIdentifier class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptPropertyIdentifier class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptProperty_identifier }. - - ] { #category : 'accessing' } FASTTypeScriptPropertyIdentifier >> methodDefinitionNameOwner [ "Relation named: #methodDefinitionNameOwner type: #FASTTypeScriptMethodDefinition opposite: #name" + @@ -93,23 +112,18 @@ FASTTypeScriptPropertyIdentifier >> methodDefinitionNameOwner [ { #category : 'accessing' } FASTTypeScriptPropertyIdentifier >> methodDefinitionNameOwner: anObject [ + methodDefinitionNameOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptPropertyIdentifier >> methodDefinitionNameOwnerGroup [ - - - ^ MooseSpecializedGroup with: self methodDefinitionNameOwner -] - { #category : 'accessing' } FASTTypeScriptPropertyIdentifier >> nestedIdentifierPropertyOwner [ "Relation named: #nestedIdentifierPropertyOwner type: #FASTTypeScriptNestedIdentifier opposite: #property" + - + ^ nestedIdentifierPropertyOwner @@ -118,13 +132,7 @@ FASTTypeScriptPropertyIdentifier >> nestedIdentifierPropertyOwner [ { #category : 'accessing' } FASTTypeScriptPropertyIdentifier >> nestedIdentifierPropertyOwner: anObject [ + nestedIdentifierPropertyOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptPropertyIdentifier >> nestedIdentifierPropertyOwnerGroup [ - - - ^ MooseSpecializedGroup with: self nestedIdentifierPropertyOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptPropertySignature.class.st b/FAST-TypeScript-Model/FASTTypeScriptPropertySignature.class.st index ce98ab3..5ff82a4 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptPropertySignature.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptPropertySignature.class.st @@ -1,6 +1,23 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `name` | `FASTTypeScriptPropertySignature` | `propertySignatureNameOwner` | `FASTTypeScriptEntity` | | +| `type` | `FASTTypeScriptPropertySignature` | `propertySignatureTypeOwner` | `FASTTypeScriptTypeAnnotation` | | + + + +" Class { #name : 'FASTTypeScriptPropertySignature', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#name => FMOne type: #FASTTypeScriptEntity opposite: #propertySignatureNameOwner', + '#type => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #propertySignatureTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +26,42 @@ Class { { #category : 'meta' } FASTTypeScriptPropertySignature class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptPropertySignature class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptPropertySignature >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #propertySignatureNameOwner" - self deprecatedAliases: { #FASTTypescriptProperty_signature } - - + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptPropertySignature >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptPropertySignature >> type [ + "Relation named: #type type: #FASTTypeScriptTypeAnnotation opposite: #propertySignatureTypeOwner" + + + + ^ type +] + +{ #category : 'accessing' } +FASTTypeScriptPropertySignature >> type: anObject [ + + + + type := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptPublicFieldDefinition.class.st b/FAST-TypeScript-Model/FASTTypeScriptPublicFieldDefinition.class.st index 27f7836..a593a08 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptPublicFieldDefinition.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptPublicFieldDefinition.class.st @@ -1,6 +1,26 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `decorator` | `FASTTypeScriptPublicFieldDefinition` | `publicFieldDefinitionDecoratorOwner` | `FASTTypeScriptDecorator` | | +| `name` | `FASTTypeScriptPublicFieldDefinition` | `publicFieldDefinitionNameOwner` | `FASTTypeScriptEntity` | | +| `type` | `FASTTypeScriptPublicFieldDefinition` | `publicFieldDefinitionTypeOwner` | `FASTTypeScriptTypeAnnotation` | | +| `value` | `FASTTypeScriptPublicFieldDefinition` | `publicFieldDefinitionValueOwner` | `FASTTExpression` | | + + + +" Class { #name : 'FASTTypeScriptPublicFieldDefinition', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#decorator => FMMany type: #FASTTypeScriptDecorator opposite: #publicFieldDefinitionDecoratorOwner', + '#name => FMOne type: #FASTTypeScriptEntity opposite: #publicFieldDefinitionNameOwner', + '#type => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #publicFieldDefinitionTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +29,93 @@ Class { { #category : 'meta' } FASTTypeScriptPublicFieldDefinition class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptPublicFieldDefinition class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptPublicFieldDefinition >> addDecorator: anObject [ + + + + ^ self decorator add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptPublicFieldDefinition >> decorator [ + "Relation named: #decorator type: #FASTTypeScriptDecorator opposite: #publicFieldDefinitionDecoratorOwner" + + + + + ^ decorator +] + +{ #category : 'accessing' } +FASTTypeScriptPublicFieldDefinition >> decorator: anObject [ + + + + decorator value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptPublicFieldDefinition >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #publicFieldDefinitionNameOwner" + + + + ^ name +] - self deprecatedAliases: { #FASTTypescriptPublic_field_definition } - - +{ #category : 'accessing' } +FASTTypeScriptPublicFieldDefinition >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptPublicFieldDefinition >> type [ + "Relation named: #type type: #FASTTypeScriptTypeAnnotation opposite: #publicFieldDefinitionTypeOwner" + + + + ^ type +] + +{ #category : 'accessing' } +FASTTypeScriptPublicFieldDefinition >> type: anObject [ + + + + type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptPublicFieldDefinition >> value [ + "Relation named: #value type: #FASTTExpression opposite: #publicFieldDefinitionValueOwner" + + + + + ^ self attributeAt: #value ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptPublicFieldDefinition >> value: anObject [ + + + + (self attributeAt: #value ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self value. + self attributeAt: #value put: anObject. + otherSide publicFieldDefinitionValueOwner: nil ] + ifNotNil: [ + self attributeAt: #value put: anObject. + anObject publicFieldDefinitionValueOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptReadonlyType.class.st b/FAST-TypeScript-Model/FASTTypeScriptReadonlyType.class.st index 3af9666..dcc5a0a 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptReadonlyType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptReadonlyType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptReadonlyType` | `readonlyTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +80,11 @@ Class { #name : 'FASTTypeScriptReadonlyType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTType classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #readonlyTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,19 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptReadonlyType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptReadonlyType class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptReadonly_type } +{ #category : 'accessing' } +FASTTypeScriptReadonlyType >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #readonlyTypeOwner" + + + ^ childrenNode +] +{ #category : 'accessing' } +FASTTypeScriptReadonlyType >> childrenNode: anObject [ - - + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptRegex.class.st b/FAST-TypeScript-Model/FASTTypeScriptRegex.class.st index ab52609..79205f5 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptRegex.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptRegex.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,55 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `flags` | `FASTTypeScriptRegex` | `regexFlagsOwner` | `FASTTypeScriptRegexFlags` | | +| `pattern` | `FASTTypeScriptRegex` | `regexPatternOwner` | `FASTTypeScriptRegexPattern` | | ## Properties @@ -49,8 +83,12 @@ Class { #name : 'FASTTypeScriptRegex', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#flags => FMOne type: #FASTTypeScriptRegexFlags opposite: #regexFlagsOwner', + '#pattern => FMOne type: #FASTTypeScriptRegexPattern opposite: #regexPatternOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,14 +97,42 @@ Class { { #category : 'meta' } FASTTypeScriptRegex class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptRegex class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptRegex >> flags [ + "Relation named: #flags type: #FASTTypeScriptRegexFlags opposite: #regexFlagsOwner" + + + + ^ flags +] + +{ #category : 'accessing' } +FASTTypeScriptRegex >> flags: anObject [ + + + + flags := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptRegex >> pattern [ + "Relation named: #pattern type: #FASTTypeScriptRegexPattern opposite: #regexPatternOwner" + + + + ^ pattern +] + +{ #category : 'accessing' } +FASTTypeScriptRegex >> pattern: anObject [ - self deprecatedAliases: { #FASTTypescriptRegex } + + + pattern := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptRegexFlags.class.st b/FAST-TypeScript-Model/FASTTypeScriptRegexFlags.class.st index 7e183e4..e060e72 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptRegexFlags.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptRegexFlags.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `regexFlagsOwner` | `FASTTypeScriptRegexFlags` | `flags` | `FASTTypeScriptRegex` | | + + + +" Class { #name : 'FASTTypeScriptRegexFlags', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#regexFlagsOwner => FMOne type: #FASTTypeScriptRegex opposite: #flags' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,27 @@ Class { { #category : 'meta' } FASTTypeScriptRegexFlags class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptRegexFlags class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptRegexFlags >> regexFlagsOwner [ + "Relation named: #regexFlagsOwner type: #FASTTypeScriptRegex opposite: #flags" - self deprecatedAliases: { #FASTTypescriptRegex_flags } - - + + + + + ^ regexFlagsOwner +] + +{ #category : 'accessing' } +FASTTypeScriptRegexFlags >> regexFlagsOwner: anObject [ + + + + regexFlagsOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptRegexPattern.class.st b/FAST-TypeScript-Model/FASTTypeScriptRegexPattern.class.st index 60d25e1..7294e6f 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptRegexPattern.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptRegexPattern.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `regexPatternOwner` | `FASTTypeScriptRegexPattern` | `pattern` | `FASTTypeScriptRegex` | | + + + +" Class { #name : 'FASTTypeScriptRegexPattern', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#regexPatternOwner => FMOne type: #FASTTypeScriptRegex opposite: #pattern' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +24,27 @@ Class { { #category : 'meta' } FASTTypeScriptRegexPattern class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptRegexPattern class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptRegexPattern >> regexPatternOwner [ + "Relation named: #regexPatternOwner type: #FASTTypeScriptRegex opposite: #pattern" - self deprecatedAliases: { #FASTTypescriptRegex_pattern } + + + + + ^ regexPatternOwner +] + +{ #category : 'accessing' } +FASTTypeScriptRegexPattern >> regexPatternOwner: anObject [ + + + + regexPatternOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptRequiredParameter.class.st b/FAST-TypeScript-Model/FASTTypeScriptRequiredParameter.class.st index 2bc4482..f82234f 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptRequiredParameter.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptRequiredParameter.class.st @@ -5,8 +5,11 @@ ### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `pattern` | `FASTTypeScriptRequiredParameter` | `requiredParameterPatternOwner` | `FASTTypeScriptIdentifier` | The pattern (the name) of the required parameter| +| `decorator` | `FASTTypeScriptRequiredParameter` | `requiredParameterDecoratorOwner` | `FASTTypeScriptDecorator` | | +| `name` | `FASTTypeScriptRequiredParameter` | `requiredParameterNameOwner` | `FASTTypeScriptEntity` | | +| `pattern` | `FASTTypeScriptRequiredParameter` | `requiredParameterPatternOwner` | `FASTTExpression` | The pattern (the name) of the required parameter| | `type` | `FASTTypeScriptRequiredParameter` | `requiredParameterTypeOwner` | `FASTTypeScriptTOptionalField` | The type of the parameter (optional)| +| `value` | `FASTTypeScriptRequiredParameter` | `requiredParameterValueOwner` | `FASTTExpression` | | @@ -15,7 +18,8 @@ Class { #name : 'FASTTypeScriptRequiredParameter', #superclass : 'FASTTypeScriptEntity', #instVars : [ - '#pattern => FMOne type: #FASTTypeScriptIdentifier opposite: #requiredParameterPatternOwner', + '#decorator => FMMany type: #FASTTypeScriptDecorator opposite: #requiredParameterDecoratorOwner', + '#name => FMOne type: #FASTTypeScriptEntity opposite: #requiredParameterNameOwner', '#type => FMOne type: #FASTTypeScriptTOptionalField opposite: #requiredParameterTypeOwner' ], #category : 'FAST-TypeScript-Model-Entities', @@ -26,47 +30,86 @@ Class { { #category : 'meta' } FASTTypeScriptRequiredParameter class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptRequiredParameter class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptRequiredParameter >> addDecorator: anObject [ - self deprecatedAliases: { #FASTTypescriptRequired_parameter } - - + + + ^ self decorator add: anObject ] { #category : 'accessing' } -FASTTypeScriptRequiredParameter >> pattern [ - "Relation named: #pattern type: #FASTTypeScriptIdentifier opposite: #requiredParameterPatternOwner" +FASTTypeScriptRequiredParameter >> decorator [ + "Relation named: #decorator type: #FASTTypeScriptDecorator opposite: #requiredParameterDecoratorOwner" + - - ^ pattern + + ^ decorator ] { #category : 'accessing' } -FASTTypeScriptRequiredParameter >> pattern: anObject [ +FASTTypeScriptRequiredParameter >> decorator: anObject [ + + + + decorator value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptRequiredParameter >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #requiredParameterNameOwner" + - pattern := anObject + ^ name ] -{ #category : 'navigation' } -FASTTypeScriptRequiredParameter >> patternGroup [ +{ #category : 'accessing' } +FASTTypeScriptRequiredParameter >> name: anObject [ + + - - ^ MooseSpecializedGroup with: self pattern + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptRequiredParameter >> pattern [ + "Relation named: #pattern type: #FASTTExpression opposite: #requiredParameterPatternOwner" + + + + + + ^ self attributeAt: #pattern ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptRequiredParameter >> pattern: anObject [ + + + + (self attributeAt: #pattern ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self pattern. + self attributeAt: #pattern put: anObject. + otherSide requiredParameterPatternOwner: nil ] + ifNotNil: [ + self attributeAt: #pattern put: anObject. + anObject requiredParameterPatternOwner: self ] ] { #category : 'accessing' } FASTTypeScriptRequiredParameter >> type [ "Relation named: #type type: #FASTTypeScriptTOptionalField opposite: #requiredParameterTypeOwner" + ^ type @@ -75,13 +118,32 @@ FASTTypeScriptRequiredParameter >> type [ { #category : 'accessing' } FASTTypeScriptRequiredParameter >> type: anObject [ + type := anObject ] -{ #category : 'navigation' } -FASTTypeScriptRequiredParameter >> typeGroup [ +{ #category : 'accessing' } +FASTTypeScriptRequiredParameter >> value [ + "Relation named: #value type: #FASTTExpression opposite: #requiredParameterValueOwner" + + + + + ^ self attributeAt: #value ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptRequiredParameter >> value: anObject [ + + - - ^ MooseSpecializedGroup with: self type + (self attributeAt: #value ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self value. + self attributeAt: #value put: anObject. + otherSide requiredParameterValueOwner: nil ] + ifNotNil: [ + self attributeAt: #value put: anObject. + anObject requiredParameterValueOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptRestPattern.class.st b/FAST-TypeScript-Model/FASTTypeScriptRestPattern.class.st index f65a5df..502c2c4 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptRestPattern.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptRestPattern.class.st @@ -1,6 +1,91 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | `left` | `FASTTypeScriptAssignmentPattern` | | +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptRestPattern` | `restPatternOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptRestPattern', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTExpression + FASTTypeScriptTPattern', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPattern classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #restPatternOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,17 +94,25 @@ Class { { #category : 'meta' } FASTTypeScriptRestPattern class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptRestPattern class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptRestPattern >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #restPatternOwner" - self deprecatedAliases: { #FASTTypescriptRest_pattern } + + + ^ childrenNode +] - - +{ #category : 'accessing' } +FASTTypeScriptRestPattern >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptRestType.class.st b/FAST-TypeScript-Model/FASTTypeScriptRestType.class.st index 717cf0a..2ce2a61 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptRestType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptRestType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptRestType` | `restTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -51,6 +82,9 @@ Class { #superclass : 'FASTTypeScriptEntity', #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #restTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,17 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptRestType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptRestType class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptRestType >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #restTypeOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptRestType >> childrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptRest_type } - - - + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptReturnStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptReturnStatement.class.st index 1adda04..95c921b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptReturnStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptReturnStatement.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptReturnStatement` | `returnStatementOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptReturnStatement', #superclass : 'FASTTypeScriptStatement', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #returnStatementOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptReturnStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptReturnStatement class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptReturnStatement >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #returnStatementOwner" - self deprecatedAliases: { #FASTTypescriptReturn_statement } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptReturnStatement >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptSatisfiesExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptSatisfiesExpression.class.st index 4334086..6707b2d 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptSatisfiesExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptSatisfiesExpression.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptSatisfiesExpression` | `satisfiesExpressionOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptSatisfiesExpression', #superclass : 'FASTTypeScriptExpression', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #satisfiesExpressionOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,18 +24,34 @@ Class { { #category : 'meta' } FASTTypeScriptSatisfiesExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptSatisfiesExpression class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptSatisfiesExpression >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptSatisfies_expression } + + + ^ self childrenNodes add: anObject +] +{ #category : 'accessing' } +FASTTypeScriptSatisfiesExpression >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #satisfiesExpressionOwner" - - + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptSatisfiesExpression >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptSequenceExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptSequenceExpression.class.st index 3920604..c6b4779 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptSequenceExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptSequenceExpression.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptSequenceExpression` | `sequenceExpressionOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptSequenceExpression', #superclass : 'FASTTypeScriptExpression', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #sequenceExpressionOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,34 @@ Class { { #category : 'meta' } FASTTypeScriptSequenceExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptSequenceExpression class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptSequenceExpression >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] - self deprecatedAliases: { #FASTTypescriptSequence_expression } - - +{ #category : 'accessing' } +FASTTypeScriptSequenceExpression >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #sequenceExpressionOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptSequenceExpression >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifier.class.st index 31f9734..6be2f02 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifier.class.st @@ -9,18 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptShorthandPropertyIdentifier class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptShorthandPropertyIdentifier class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptShorthand_property_identifier } - - - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifierPattern.class.st b/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifierPattern.class.st index 925691f..bae0b12 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifierPattern.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifierPattern.class.st @@ -9,17 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptShorthandPropertyIdentifierPattern class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptShorthandPropertyIdentifierPattern class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptShorthand_property_identifier_pattern } - - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptSpreadElement.class.st b/FAST-TypeScript-Model/FASTTypeScriptSpreadElement.class.st index 0924452..42a9daf 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptSpreadElement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptSpreadElement.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptSpreadElement` | `spreadElementOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptSpreadElement', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #spreadElementOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptSpreadElement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptSpreadElement class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptSpread_element } - - +{ #category : 'accessing' } +FASTTypeScriptSpreadElement >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #spreadElementOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptSpreadElement >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptStatement.class.st index 4d7178f..3e086da 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptStatement.class.st @@ -7,11 +7,15 @@ |---| | `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| | `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| -| `doBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| | `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| | `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| -| `whileBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | ## Properties @@ -36,8 +40,8 @@ Class { { #category : 'meta' } FASTTypeScriptStatement class >> annotation [ + - ^ self ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptStatementBlock.class.st b/FAST-TypeScript-Model/FASTTypeScriptStatementBlock.class.st index 2c090d4..edc6a55 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptStatementBlock.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptStatementBlock.class.st @@ -5,15 +5,26 @@ ### Parents | Relation | Origin | Opposite | Type | Comment | |---| +| `catchClauseBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptCatchClause` | | +| `classStaticBlockBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptClassStaticBlock` | | | `finallyClauseBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptFinallyClause` | My owner| -| `forBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptForStatement` | | | `forInStatementBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptForInStatement` | The owner of this body| | `functionDeclarationBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptFunctionDeclaration` | My owner| +| `functionExpressionBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptFunctionExpression` | | +| `generatorFunctionBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptGeneratorFunction` | | +| `generatorFunctionDeclarationBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptGeneratorFunctionDeclaration` | | | `ifStatementConsequenceOwner` | `FASTTypeScriptStatementBlock` | `consequence` | `FASTTypeScriptIfStatement` | The owner of this statement block| +| `internalModuleBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptInternalModule` | | | `methodDefinitionBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptMethodDefinition` | My owner| +| `moduleBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptModule` | | | `tryStatementBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptTryStatement` | Try statement owner| | `withStatementBodyOwner` | `FASTTypeScriptStatementBlock` | `body` | `FASTTypeScriptWithStatement` | The owner of this statement block| +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptStatementBlock` | `statementBlockOwner` | `FASTTypeScriptEntity` | | + " @@ -21,12 +32,19 @@ Class { #name : 'FASTTypeScriptStatementBlock', #superclass : 'FASTTypeScriptStatement', #instVars : [ + '#catchClauseBodyOwner => FMOne type: #FASTTypeScriptCatchClause opposite: #body', + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #statementBlockOwner', + '#classStaticBlockBodyOwner => FMOne type: #FASTTypeScriptClassStaticBlock opposite: #body', '#finallyClauseBodyOwner => FMOne type: #FASTTypeScriptFinallyClause opposite: #body', - '#forBodyOwner => FMOne type: #FASTTypeScriptForStatement opposite: #body', '#forInStatementBodyOwner => FMOne type: #FASTTypeScriptForInStatement opposite: #body', '#functionDeclarationBodyOwner => FMOne type: #FASTTypeScriptFunctionDeclaration opposite: #body', + '#functionExpressionBodyOwner => FMOne type: #FASTTypeScriptFunctionExpression opposite: #body', + '#generatorFunctionBodyOwner => FMOne type: #FASTTypeScriptGeneratorFunction opposite: #body', + '#generatorFunctionDeclarationBodyOwner => FMOne type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #body', '#ifStatementConsequenceOwner => FMOne type: #FASTTypeScriptIfStatement opposite: #consequence', + '#internalModuleBodyOwner => FMOne type: #FASTTypeScriptInternalModule opposite: #body', '#methodDefinitionBodyOwner => FMOne type: #FASTTypeScriptMethodDefinition opposite: #body', + '#moduleBodyOwner => FMOne type: #FASTTypeScriptModule opposite: #body', '#tryStatementBodyOwner => FMOne type: #FASTTypeScriptTryStatement opposite: #body', '#withStatementBodyOwner => FMOne type: #FASTTypeScriptWithStatement opposite: #body' ], @@ -38,73 +56,101 @@ Class { { #category : 'meta' } FASTTypeScriptStatementBlock class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptStatementBlock class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptStatementBlock >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptStatement_block } - - + + + ^ self childrenNodes add: anObject ] { #category : 'accessing' } -FASTTypeScriptStatementBlock >> finallyClauseBodyOwner [ - "Relation named: #finallyClauseBodyOwner type: #FASTTypeScriptFinallyClause opposite: #body" +FASTTypeScriptStatementBlock >> catchClauseBodyOwner [ + "Relation named: #catchClauseBodyOwner type: #FASTTypeScriptCatchClause opposite: #body" + - - ^ finallyClauseBodyOwner + ^ catchClauseBodyOwner ] { #category : 'accessing' } -FASTTypeScriptStatementBlock >> finallyClauseBodyOwner: anObject [ +FASTTypeScriptStatementBlock >> catchClauseBodyOwner: anObject [ + - finallyClauseBodyOwner := anObject + catchClauseBodyOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #statementBlockOwner" + + + + + ^ childrenNodes ] -{ #category : 'navigation' } -FASTTypeScriptStatementBlock >> finallyClauseBodyOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> childrenNodes: anObject [ + + - - ^ MooseSpecializedGroup with: self finallyClauseBodyOwner + childrenNodes value: anObject ] { #category : 'accessing' } -FASTTypeScriptStatementBlock >> forBodyOwner [ - "Relation named: #forBodyOwner type: #FASTTypeScriptForStatement opposite: #body" +FASTTypeScriptStatementBlock >> classStaticBlockBodyOwner [ + "Relation named: #classStaticBlockBodyOwner type: #FASTTypeScriptClassStaticBlock opposite: #body" + - ^ forBodyOwner + ^ classStaticBlockBodyOwner ] { #category : 'accessing' } -FASTTypeScriptStatementBlock >> forBodyOwner: anObject [ +FASTTypeScriptStatementBlock >> classStaticBlockBodyOwner: anObject [ + - forBodyOwner := anObject + classStaticBlockBodyOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptStatementBlock >> forBodyOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> finallyClauseBodyOwner [ + "Relation named: #finallyClauseBodyOwner type: #FASTTypeScriptFinallyClause opposite: #body" + + - - ^ MooseSpecializedGroup with: self forBodyOwner + + + + ^ finallyClauseBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> finallyClauseBodyOwner: anObject [ + + + + finallyClauseBodyOwner := anObject ] { #category : 'accessing' } FASTTypeScriptStatementBlock >> forInStatementBodyOwner [ "Relation named: #forInStatementBodyOwner type: #FASTTypeScriptForInStatement opposite: #body" + @@ -115,21 +161,16 @@ FASTTypeScriptStatementBlock >> forInStatementBodyOwner [ { #category : 'accessing' } FASTTypeScriptStatementBlock >> forInStatementBodyOwner: anObject [ + forInStatementBodyOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptStatementBlock >> forInStatementBodyOwnerGroup [ - - - ^ MooseSpecializedGroup with: self forInStatementBodyOwner -] - { #category : 'accessing' } FASTTypeScriptStatementBlock >> functionDeclarationBodyOwner [ "Relation named: #functionDeclarationBodyOwner type: #FASTTypeScriptFunctionDeclaration opposite: #body" + @@ -140,21 +181,73 @@ FASTTypeScriptStatementBlock >> functionDeclarationBodyOwner [ { #category : 'accessing' } FASTTypeScriptStatementBlock >> functionDeclarationBodyOwner: anObject [ + functionDeclarationBodyOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptStatementBlock >> functionDeclarationBodyOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> functionExpressionBodyOwner [ + "Relation named: #functionExpressionBodyOwner type: #FASTTypeScriptFunctionExpression opposite: #body" + + - - ^ MooseSpecializedGroup with: self functionDeclarationBodyOwner + + + ^ functionExpressionBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> functionExpressionBodyOwner: anObject [ + + + + functionExpressionBodyOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> generatorFunctionBodyOwner [ + "Relation named: #generatorFunctionBodyOwner type: #FASTTypeScriptGeneratorFunction opposite: #body" + + + + + + ^ generatorFunctionBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> generatorFunctionBodyOwner: anObject [ + + + + generatorFunctionBodyOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> generatorFunctionDeclarationBodyOwner [ + "Relation named: #generatorFunctionDeclarationBodyOwner type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #body" + + + + + + ^ generatorFunctionDeclarationBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> generatorFunctionDeclarationBodyOwner: anObject [ + + + + generatorFunctionDeclarationBodyOwner := anObject ] { #category : 'accessing' } FASTTypeScriptStatementBlock >> ifStatementConsequenceOwner [ "Relation named: #ifStatementConsequenceOwner type: #FASTTypeScriptIfStatement opposite: #consequence" + @@ -165,21 +258,35 @@ FASTTypeScriptStatementBlock >> ifStatementConsequenceOwner [ { #category : 'accessing' } FASTTypeScriptStatementBlock >> ifStatementConsequenceOwner: anObject [ + ifStatementConsequenceOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptStatementBlock >> ifStatementConsequenceOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> internalModuleBodyOwner [ + "Relation named: #internalModuleBodyOwner type: #FASTTypeScriptInternalModule opposite: #body" + + + + + + ^ internalModuleBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> internalModuleBodyOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self ifStatementConsequenceOwner + internalModuleBodyOwner := anObject ] { #category : 'accessing' } FASTTypeScriptStatementBlock >> methodDefinitionBodyOwner [ "Relation named: #methodDefinitionBodyOwner type: #FASTTypeScriptMethodDefinition opposite: #body" + @@ -190,21 +297,35 @@ FASTTypeScriptStatementBlock >> methodDefinitionBodyOwner [ { #category : 'accessing' } FASTTypeScriptStatementBlock >> methodDefinitionBodyOwner: anObject [ + methodDefinitionBodyOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptStatementBlock >> methodDefinitionBodyOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> moduleBodyOwner [ + "Relation named: #moduleBodyOwner type: #FASTTypeScriptModule opposite: #body" + + - - ^ MooseSpecializedGroup with: self methodDefinitionBodyOwner + + + ^ moduleBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptStatementBlock >> moduleBodyOwner: anObject [ + + + + moduleBodyOwner := anObject ] { #category : 'accessing' } FASTTypeScriptStatementBlock >> tryStatementBodyOwner [ "Relation named: #tryStatementBodyOwner type: #FASTTypeScriptTryStatement opposite: #body" + @@ -215,21 +336,16 @@ FASTTypeScriptStatementBlock >> tryStatementBodyOwner [ { #category : 'accessing' } FASTTypeScriptStatementBlock >> tryStatementBodyOwner: anObject [ + tryStatementBodyOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptStatementBlock >> tryStatementBodyOwnerGroup [ - - - ^ MooseSpecializedGroup with: self tryStatementBodyOwner -] - { #category : 'accessing' } FASTTypeScriptStatementBlock >> withStatementBodyOwner [ "Relation named: #withStatementBodyOwner type: #FASTTypeScriptWithStatement opposite: #body" + @@ -240,13 +356,7 @@ FASTTypeScriptStatementBlock >> withStatementBodyOwner [ { #category : 'accessing' } FASTTypeScriptStatementBlock >> withStatementBodyOwner: anObject [ + withStatementBodyOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptStatementBlock >> withStatementBodyOwnerGroup [ - - - ^ MooseSpecializedGroup with: self withStatementBodyOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptStatementIdentifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptStatementIdentifier.class.st index 4b29992..d5a90eb 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptStatementIdentifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptStatementIdentifier.class.st @@ -1,6 +1,25 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `breakStatementLabelOwner` | `FASTTypeScriptStatementIdentifier` | `label` | `FASTTypeScriptBreakStatement` | | +| `continueStatementLabelOwner` | `FASTTypeScriptStatementIdentifier` | `label` | `FASTTypeScriptContinueStatement` | | +| `labeledStatementLabelOwner` | `FASTTypeScriptStatementIdentifier` | `label` | `FASTTypeScriptLabeledStatement` | | + + + +" Class { #name : 'FASTTypeScriptStatementIdentifier', #superclass : 'FASTTypeScriptStatement', + #instVars : [ + '#breakStatementLabelOwner => FMOne type: #FASTTypeScriptBreakStatement opposite: #label', + '#continueStatementLabelOwner => FMOne type: #FASTTypeScriptContinueStatement opposite: #label', + '#labeledStatementLabelOwner => FMOne type: #FASTTypeScriptLabeledStatement opposite: #label' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +28,65 @@ Class { { #category : 'meta' } FASTTypeScriptStatementIdentifier class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptStatementIdentifier class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptStatementIdentifier >> breakStatementLabelOwner [ + "Relation named: #breakStatementLabelOwner type: #FASTTypeScriptBreakStatement opposite: #label" + + + + + + ^ breakStatementLabelOwner +] - self deprecatedAliases: { #FASTTypescriptStatement_identifier } - - +{ #category : 'accessing' } +FASTTypeScriptStatementIdentifier >> breakStatementLabelOwner: anObject [ + + + + breakStatementLabelOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptStatementIdentifier >> continueStatementLabelOwner [ + "Relation named: #continueStatementLabelOwner type: #FASTTypeScriptContinueStatement opposite: #label" + + + + + + ^ continueStatementLabelOwner +] + +{ #category : 'accessing' } +FASTTypeScriptStatementIdentifier >> continueStatementLabelOwner: anObject [ + + + + continueStatementLabelOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptStatementIdentifier >> labeledStatementLabelOwner [ + "Relation named: #labeledStatementLabelOwner type: #FASTTypeScriptLabeledStatement opposite: #label" + + + + + + ^ labeledStatementLabelOwner +] + +{ #category : 'accessing' } +FASTTypeScriptStatementIdentifier >> labeledStatementLabelOwner: anObject [ + + + + labeledStatementLabelOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptString.class.st b/FAST-TypeScript-Model/FASTTypeScriptString.class.st index 253fcdb..71b7f5e 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptString.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptString.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,57 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementSourceOwner` | `FASTTypeScriptString` | `source` | `FASTTypeScriptExportStatement` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importRequireClauseSourceOwner` | `FASTTypeScriptString` | `source` | `FASTTypeScriptImportRequireClause` | | +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `importStatementSourceOwner` | `FASTTypeScriptString` | `source` | `FASTTypeScriptImportStatement` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptString` | `stringOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -50,8 +86,14 @@ Class { #name : 'FASTTypeScriptString', #superclass : 'FASTTypeScriptLiteral', - #traits : 'FASTTStringLiteral', - #classTraits : 'FASTTStringLiteral classTrait', + #traits : 'FASTTStringLiteral + FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTStringLiteral classTrait + FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #stringOwner', + '#exportStatementSourceOwner => FMOne type: #FASTTypeScriptExportStatement opposite: #source', + '#importRequireClauseSourceOwner => FMOne type: #FASTTypeScriptImportRequireClause opposite: #source', + '#importStatementSourceOwner => FMOne type: #FASTTypeScriptImportStatement opposite: #source' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -60,14 +102,91 @@ Class { { #category : 'meta' } FASTTypeScriptString class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptString class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptString >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptString >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #stringOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptString >> childrenNodes: anObject [ + + + + childrenNodes value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptString >> exportStatementSourceOwner [ + "Relation named: #exportStatementSourceOwner type: #FASTTypeScriptExportStatement opposite: #source" + + + + + + ^ exportStatementSourceOwner +] + +{ #category : 'accessing' } +FASTTypeScriptString >> exportStatementSourceOwner: anObject [ + + + + exportStatementSourceOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptString >> importRequireClauseSourceOwner [ + "Relation named: #importRequireClauseSourceOwner type: #FASTTypeScriptImportRequireClause opposite: #source" + + + + + + ^ importRequireClauseSourceOwner +] + +{ #category : 'accessing' } +FASTTypeScriptString >> importRequireClauseSourceOwner: anObject [ - self deprecatedAliases: { #FASTTypescriptString } + + + importRequireClauseSourceOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptString >> importStatementSourceOwner [ + "Relation named: #importStatementSourceOwner type: #FASTTypeScriptImportStatement opposite: #source" + + + + + + ^ importStatementSourceOwner +] + +{ #category : 'accessing' } +FASTTypeScriptString >> importStatementSourceOwner: anObject [ + + + + importStatementSourceOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptStringFragment.class.st b/FAST-TypeScript-Model/FASTTypeScriptStringFragment.class.st index 4c310da..9e56be9 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptStringFragment.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptStringFragment.class.st @@ -9,16 +9,8 @@ Class { { #category : 'meta' } FASTTypeScriptStringFragment class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptStringFragment class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptString_fragment } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptSubscriptExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptSubscriptExpression.class.st index 70e738f..88c3383 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptSubscriptExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptSubscriptExpression.class.st @@ -2,18 +2,94 @@ ## Relations ====================== +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | `left` | `FASTTypeScriptAssignmentPattern` | | +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + ### Children | Relation | Origin | Opposite | Type | Comment | |---| | `index` | `FASTTypeScriptSubscriptExpression` | `subscriptExpressionIndexOwner` | `FASTTExpression` | My index| | `object` | `FASTTypeScriptSubscriptExpression` | `subscriptExpressionObjectOwner` | `FASTTExpression` | My identifier| +| `optionalChain` | `FASTTypeScriptSubscriptExpression` | `subscriptExpressionOptionalChainOwner` | `FASTTypeScriptOptionalChain` | | +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | " Class { #name : 'FASTTypeScriptSubscriptExpression', #superclass : 'FASTTypeScriptExpression', + #traits : 'FASTTypeScriptTPattern + FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPattern classTrait + FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#optionalChain => FMOne type: #FASTTypeScriptOptionalChain opposite: #subscriptExpressionOptionalChainOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -22,25 +98,17 @@ Class { { #category : 'meta' } FASTTypeScriptSubscriptExpression class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptSubscriptExpression class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptSubscript_expression } - - - ] { #category : 'accessing' } FASTTypeScriptSubscriptExpression >> index [ "Relation named: #index type: #FASTTExpression opposite: #subscriptExpressionIndexOwner" + @@ -50,6 +118,7 @@ FASTTypeScriptSubscriptExpression >> index [ { #category : 'accessing' } FASTTypeScriptSubscriptExpression >> index: anObject [ + (self attributeAt: #index ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -61,17 +130,11 @@ FASTTypeScriptSubscriptExpression >> index: anObject [ anObject subscriptExpressionIndexOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptSubscriptExpression >> indexGroup [ - - - ^ MooseSpecializedGroup with: self index -] - { #category : 'accessing' } FASTTypeScriptSubscriptExpression >> object [ "Relation named: #object type: #FASTTExpression opposite: #subscriptExpressionObjectOwner" + @@ -81,6 +144,7 @@ FASTTypeScriptSubscriptExpression >> object [ { #category : 'accessing' } FASTTypeScriptSubscriptExpression >> object: anObject [ + (self attributeAt: #object ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -92,9 +156,19 @@ FASTTypeScriptSubscriptExpression >> object: anObject [ anObject subscriptExpressionObjectOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptSubscriptExpression >> objectGroup [ +{ #category : 'accessing' } +FASTTypeScriptSubscriptExpression >> optionalChain [ + "Relation named: #optionalChain type: #FASTTypeScriptOptionalChain opposite: #subscriptExpressionOptionalChainOwner" + + + + ^ optionalChain +] + +{ #category : 'accessing' } +FASTTypeScriptSubscriptExpression >> optionalChain: anObject [ + + - - ^ MooseSpecializedGroup with: self object + optionalChain := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptSuper.class.st b/FAST-TypeScript-Model/FASTTypeScriptSuper.class.st index 79620c0..cce9ca7 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptSuper.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptSuper.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,49 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -49,8 +77,8 @@ Class { #name : 'FASTTypeScriptSuper', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,14 +87,8 @@ Class { { #category : 'meta' } FASTTypeScriptSuper class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptSuper class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptSuper } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptSwitchBody.class.st b/FAST-TypeScript-Model/FASTTypeScriptSwitchBody.class.st index abbf765..506ebf3 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptSwitchBody.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptSwitchBody.class.st @@ -1,6 +1,27 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `switchStatementBodyOwner` | `FASTTypeScriptSwitchBody` | `body` | `FASTTypeScriptSwitchStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptSwitchBody` | `switchBodyOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptSwitchBody', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #switchBodyOwner', + '#switchStatementBodyOwner => FMOne type: #FASTTypeScriptSwitchStatement opposite: #body' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,17 +30,53 @@ Class { { #category : 'meta' } FASTTypeScriptSwitchBody class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptSwitchBody class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptSwitchBody >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchBody >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #switchBodyOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchBody >> childrenNodes: anObject [ + + + + childrenNodes value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchBody >> switchStatementBodyOwner [ + "Relation named: #switchStatementBodyOwner type: #FASTTypeScriptSwitchStatement opposite: #body" - self deprecatedAliases: { #FASTTypescriptSwitch_body } - - - + + + + + ^ switchStatementBodyOwner +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchBody >> switchStatementBodyOwner: anObject [ + + + + switchStatementBodyOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptSwitchCase.class.st b/FAST-TypeScript-Model/FASTTypeScriptSwitchCase.class.st index 2da84d9..3c9f40c 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptSwitchCase.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptSwitchCase.class.st @@ -1,6 +1,22 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptSwitchCase` | `switchCaseBodyOwner` | `FASTTStatement` | | +| `value` | `FASTTypeScriptSwitchCase` | `switchCaseValueOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptSwitchCase', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#value => FMOne type: #FASTTypeScriptEntity opposite: #switchCaseValueOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +25,53 @@ Class { { #category : 'meta' } FASTTypeScriptSwitchCase class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptSwitchCase class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptSwitchCase >> addBody: anObject [ + + + + ^ self body add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchCase >> body [ + "Relation named: #body type: #FASTTStatement opposite: #switchCaseBodyOwner" + + + + + + + ^ self attributeAt: #body ifAbsentPut: [ FMMultivalueLink on: self opposite: #switchCaseBodyOwner: ] +] - self deprecatedAliases: { #FASTTypescriptSwitch_case } - - +{ #category : 'accessing' } +FASTTypeScriptSwitchCase >> body: anObject [ + + + + self body value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchCase >> value [ + "Relation named: #value type: #FASTTypeScriptEntity opposite: #switchCaseValueOwner" + + + + ^ value +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchCase >> value: anObject [ + + + + value := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptSwitchDefault.class.st b/FAST-TypeScript-Model/FASTTypeScriptSwitchDefault.class.st index ec6c6ae..8853af0 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptSwitchDefault.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptSwitchDefault.class.st @@ -1,3 +1,15 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptSwitchDefault` | `switchDefaultBodyOwner` | `FASTTStatement` | | + + + +" Class { #name : 'FASTTypeScriptSwitchDefault', #superclass : 'FASTTypeScriptEntity', @@ -9,17 +21,36 @@ Class { { #category : 'meta' } FASTTypeScriptSwitchDefault class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptSwitchDefault class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptSwitchDefault >> addBody: anObject [ + + + + ^ self body add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchDefault >> body [ + "Relation named: #body type: #FASTTStatement opposite: #switchDefaultBodyOwner" + + + + + + + ^ self attributeAt: #body ifAbsentPut: [ FMMultivalueLink on: self opposite: #switchDefaultBodyOwner: ] +] - self deprecatedAliases: { #FASTTypescriptSwitch_default } +{ #category : 'accessing' } +FASTTypeScriptSwitchDefault >> body: anObject [ - - + + + self body value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptSwitchStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptSwitchStatement.class.st index 1b276de..99b361b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptSwitchStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptSwitchStatement.class.st @@ -1,6 +1,23 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `body` | `FASTTypeScriptSwitchStatement` | `switchStatementBodyOwner` | `FASTTypeScriptSwitchBody` | | +| `value` | `FASTTypeScriptSwitchStatement` | `switchStatementValueOwner` | `FASTTypeScriptParenthesizedExpression` | | + + + +" Class { #name : 'FASTTypeScriptSwitchStatement', #superclass : 'FASTTypeScriptStatement', + #instVars : [ + '#body => FMOne type: #FASTTypeScriptSwitchBody opposite: #switchStatementBodyOwner', + '#value => FMOne type: #FASTTypeScriptParenthesizedExpression opposite: #switchStatementValueOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +26,42 @@ Class { { #category : 'meta' } FASTTypeScriptSwitchStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptSwitchStatement class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptSwitchStatement >> body [ + "Relation named: #body type: #FASTTypeScriptSwitchBody opposite: #switchStatementBodyOwner" - self deprecatedAliases: { #FASTTypescriptSwitch_statement } - - + + + ^ body +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchStatement >> body: anObject [ + + + + body := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchStatement >> value [ + "Relation named: #value type: #FASTTypeScriptParenthesizedExpression opposite: #switchStatementValueOwner" + + + + ^ value +] + +{ #category : 'accessing' } +FASTTypeScriptSwitchStatement >> value: anObject [ + + + + value := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTDeclaration.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTDeclaration.trait.st index 8ed8949..83ec2c5 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTDeclaration.trait.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTDeclaration.trait.st @@ -7,16 +7,38 @@ I am a declaration in Typescript ### Parents | Relation | Origin | Opposite | Type | Comment | |---| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | | `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | " Trait { #name : 'FASTTypeScriptTDeclaration', #instVars : [ + '#exportStatementDeclarationOwner => FMOne type: #FASTTypeScriptExportStatement opposite: #declaration', '#tWithDeclarationsDeclarationsOwner => FMOne type: #FASTTypeScriptTWithDeclarations opposite: #declarations' ], + #traits : 'FASTTStatement', + #classTraits : 'FASTTStatement classTrait', #category : 'FAST-TypeScript-Model-Traits', #package : 'FAST-TypeScript-Model', #tag : 'Traits' @@ -25,16 +47,36 @@ Trait { { #category : 'meta' } FASTTypeScriptTDeclaration classSide >> annotation [ + - ^ self +] + +{ #category : 'accessing' } +FASTTypeScriptTDeclaration >> exportStatementDeclarationOwner [ + "Relation named: #exportStatementDeclarationOwner type: #FASTTypeScriptExportStatement opposite: #declaration" + + + + + + ^ exportStatementDeclarationOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTDeclaration >> exportStatementDeclarationOwner: anObject [ + + + + exportStatementDeclarationOwner := anObject ] { #category : 'accessing' } FASTTypeScriptTDeclaration >> tWithDeclarationsDeclarationsOwner [ "Relation named: #tWithDeclarationsDeclarationsOwner type: #FASTTypeScriptTWithDeclarations opposite: #declarations" + @@ -44,13 +86,7 @@ FASTTypeScriptTDeclaration >> tWithDeclarationsDeclarationsOwner [ { #category : 'accessing' } FASTTypeScriptTDeclaration >> tWithDeclarationsDeclarationsOwner: anObject [ + tWithDeclarationsDeclarationsOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptTDeclaration >> tWithDeclarationsDeclarationsOwnerGroup [ - - - ^ MooseSpecializedGroup with: self tWithDeclarationsDeclarationsOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTEntityCreator.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTEntityCreator.trait.st index ca35baa..06bb4e9 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTEntityCreator.trait.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTEntityCreator.trait.st @@ -14,15 +14,16 @@ Trait { { #category : 'meta' } FASTTypeScriptTEntityCreator classSide >> annotation [ + - ^ self ] { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAbstractClassDeclaration [ + ^ self add: FASTTypeScriptAbstractClassDeclaration new ] @@ -30,6 +31,7 @@ FASTTypeScriptTEntityCreator >> newAbstractClassDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAbstractMethodSignature [ + ^ self add: FASTTypeScriptAbstractMethodSignature new ] @@ -37,6 +39,7 @@ FASTTypeScriptTEntityCreator >> newAbstractMethodSignature [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAccessibilityModifier [ + ^ self add: FASTTypeScriptAccessibilityModifier new ] @@ -44,6 +47,7 @@ FASTTypeScriptTEntityCreator >> newAccessibilityModifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAddingTypeAnnotation [ + ^ self add: FASTTypeScriptAddingTypeAnnotation new ] @@ -51,6 +55,7 @@ FASTTypeScriptTEntityCreator >> newAddingTypeAnnotation [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAmbientDeclaration [ + ^ self add: FASTTypeScriptAmbientDeclaration new ] @@ -58,6 +63,7 @@ FASTTypeScriptTEntityCreator >> newAmbientDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newArguments [ + ^ self add: FASTTypeScriptArguments new ] @@ -65,6 +71,7 @@ FASTTypeScriptTEntityCreator >> newArguments [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newArray [ + ^ self add: FASTTypeScriptArray new ] @@ -72,6 +79,7 @@ FASTTypeScriptTEntityCreator >> newArray [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newArrayPattern [ + ^ self add: FASTTypeScriptArrayPattern new ] @@ -79,6 +87,7 @@ FASTTypeScriptTEntityCreator >> newArrayPattern [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newArrayType [ + ^ self add: FASTTypeScriptArrayType new ] @@ -86,6 +95,7 @@ FASTTypeScriptTEntityCreator >> newArrayType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newArrowFunction [ + ^ self add: FASTTypeScriptArrowFunction new ] @@ -93,6 +103,7 @@ FASTTypeScriptTEntityCreator >> newArrowFunction [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAsExpression [ + ^ self add: FASTTypeScriptAsExpression new ] @@ -100,6 +111,7 @@ FASTTypeScriptTEntityCreator >> newAsExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAsserts [ + ^ self add: FASTTypeScriptAsserts new ] @@ -107,6 +119,7 @@ FASTTypeScriptTEntityCreator >> newAsserts [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAssertsAnnotation [ + ^ self add: FASTTypeScriptAssertsAnnotation new ] @@ -114,6 +127,7 @@ FASTTypeScriptTEntityCreator >> newAssertsAnnotation [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAssignmentExpression [ + ^ self add: FASTTypeScriptAssignmentExpression new ] @@ -121,6 +135,7 @@ FASTTypeScriptTEntityCreator >> newAssignmentExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAssignmentPattern [ + ^ self add: FASTTypeScriptAssignmentPattern new ] @@ -128,6 +143,7 @@ FASTTypeScriptTEntityCreator >> newAssignmentPattern [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAugmentedAssignmentExpression [ + ^ self add: FASTTypeScriptAugmentedAssignmentExpression new ] @@ -135,6 +151,7 @@ FASTTypeScriptTEntityCreator >> newAugmentedAssignmentExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newAwaitExpression [ + ^ self add: FASTTypeScriptAwaitExpression new ] @@ -142,6 +159,7 @@ FASTTypeScriptTEntityCreator >> newAwaitExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newBinaryExpression [ + ^ self add: FASTTypeScriptBinaryExpression new ] @@ -149,6 +167,7 @@ FASTTypeScriptTEntityCreator >> newBinaryExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newBoolean [ + ^ self add: FASTTypeScriptBoolean new ] @@ -156,6 +175,7 @@ FASTTypeScriptTEntityCreator >> newBoolean [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newBreakStatement [ + ^ self add: FASTTypeScriptBreakStatement new ] @@ -163,6 +183,7 @@ FASTTypeScriptTEntityCreator >> newBreakStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newCallExpression [ + ^ self add: FASTTypeScriptCallExpression new ] @@ -170,6 +191,7 @@ FASTTypeScriptTEntityCreator >> newCallExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newCallSignature [ + ^ self add: FASTTypeScriptCallSignature new ] @@ -177,6 +199,7 @@ FASTTypeScriptTEntityCreator >> newCallSignature [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newCatchClause [ + ^ self add: FASTTypeScriptCatchClause new ] @@ -184,6 +207,7 @@ FASTTypeScriptTEntityCreator >> newCatchClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newClass [ + ^ self add: FASTTypeScriptClass new ] @@ -191,6 +215,7 @@ FASTTypeScriptTEntityCreator >> newClass [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newClassBody [ + ^ self add: FASTTypeScriptClassBody new ] @@ -198,6 +223,7 @@ FASTTypeScriptTEntityCreator >> newClassBody [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newClassDeclaration [ + ^ self add: FASTTypeScriptClassDeclaration new ] @@ -205,6 +231,7 @@ FASTTypeScriptTEntityCreator >> newClassDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newClassHeritage [ + ^ self add: FASTTypeScriptClassHeritage new ] @@ -212,6 +239,7 @@ FASTTypeScriptTEntityCreator >> newClassHeritage [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newClassStaticBlock [ + ^ self add: FASTTypeScriptClassStaticBlock new ] @@ -219,6 +247,7 @@ FASTTypeScriptTEntityCreator >> newClassStaticBlock [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newComment [ + ^ self add: FASTTypeScriptComment new ] @@ -226,6 +255,7 @@ FASTTypeScriptTEntityCreator >> newComment [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newCompilationUnit [ + ^ self add: FASTTypeScriptCompilationUnit new ] @@ -233,6 +263,7 @@ FASTTypeScriptTEntityCreator >> newCompilationUnit [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newComputedPropertyName [ + ^ self add: FASTTypeScriptComputedPropertyName new ] @@ -240,6 +271,7 @@ FASTTypeScriptTEntityCreator >> newComputedPropertyName [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newConditionalType [ + ^ self add: FASTTypeScriptConditionalType new ] @@ -247,6 +279,7 @@ FASTTypeScriptTEntityCreator >> newConditionalType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newConstraint [ + ^ self add: FASTTypeScriptConstraint new ] @@ -254,6 +287,7 @@ FASTTypeScriptTEntityCreator >> newConstraint [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newConstructSignature [ + ^ self add: FASTTypeScriptConstructSignature new ] @@ -261,6 +295,7 @@ FASTTypeScriptTEntityCreator >> newConstructSignature [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newConstructorType [ + ^ self add: FASTTypeScriptConstructorType new ] @@ -268,6 +303,7 @@ FASTTypeScriptTEntityCreator >> newConstructorType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newContinueStatement [ + ^ self add: FASTTypeScriptContinueStatement new ] @@ -275,6 +311,7 @@ FASTTypeScriptTEntityCreator >> newContinueStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newDebuggerStatement [ + ^ self add: FASTTypeScriptDebuggerStatement new ] @@ -282,6 +319,7 @@ FASTTypeScriptTEntityCreator >> newDebuggerStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newDecorator [ + ^ self add: FASTTypeScriptDecorator new ] @@ -289,6 +327,7 @@ FASTTypeScriptTEntityCreator >> newDecorator [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newDefaultType [ + ^ self add: FASTTypeScriptDefaultType new ] @@ -296,6 +335,7 @@ FASTTypeScriptTEntityCreator >> newDefaultType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newDoStatement [ + ^ self add: FASTTypeScriptDoStatement new ] @@ -303,6 +343,7 @@ FASTTypeScriptTEntityCreator >> newDoStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newERROR [ + ^ self add: FASTTypeScriptERROR new ] @@ -310,6 +351,7 @@ FASTTypeScriptTEntityCreator >> newERROR [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newElseClause [ + ^ self add: FASTTypeScriptElseClause new ] @@ -317,6 +359,7 @@ FASTTypeScriptTEntityCreator >> newElseClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newEmptyStatement [ + ^ self add: FASTTypeScriptEmptyStatement new ] @@ -324,6 +367,7 @@ FASTTypeScriptTEntityCreator >> newEmptyStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newEnumAssignment [ + ^ self add: FASTTypeScriptEnumAssignment new ] @@ -331,6 +375,7 @@ FASTTypeScriptTEntityCreator >> newEnumAssignment [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newEnumBody [ + ^ self add: FASTTypeScriptEnumBody new ] @@ -338,6 +383,7 @@ FASTTypeScriptTEntityCreator >> newEnumBody [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newEnumDeclaration [ + ^ self add: FASTTypeScriptEnumDeclaration new ] @@ -345,6 +391,7 @@ FASTTypeScriptTEntityCreator >> newEnumDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newEscapeSequence [ + ^ self add: FASTTypeScriptEscapeSequence new ] @@ -352,6 +399,7 @@ FASTTypeScriptTEntityCreator >> newEscapeSequence [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newExistentialType [ + ^ self add: FASTTypeScriptExistentialType new ] @@ -359,6 +407,7 @@ FASTTypeScriptTEntityCreator >> newExistentialType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newExportClause [ + ^ self add: FASTTypeScriptExportClause new ] @@ -366,6 +415,7 @@ FASTTypeScriptTEntityCreator >> newExportClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newExportSpecifier [ + ^ self add: FASTTypeScriptExportSpecifier new ] @@ -373,6 +423,7 @@ FASTTypeScriptTEntityCreator >> newExportSpecifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newExportStatement [ + ^ self add: FASTTypeScriptExportStatement new ] @@ -380,6 +431,7 @@ FASTTypeScriptTEntityCreator >> newExportStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newExpression [ + ^ self add: FASTTypeScriptExpression new ] @@ -387,6 +439,7 @@ FASTTypeScriptTEntityCreator >> newExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newExpressionStatement [ + ^ self add: FASTTypeScriptExpressionStatement new ] @@ -394,6 +447,7 @@ FASTTypeScriptTEntityCreator >> newExpressionStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newExtendsClause [ + ^ self add: FASTTypeScriptExtendsClause new ] @@ -401,6 +455,7 @@ FASTTypeScriptTEntityCreator >> newExtendsClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newExtendsTypeClause [ + ^ self add: FASTTypeScriptExtendsTypeClause new ] @@ -408,6 +463,7 @@ FASTTypeScriptTEntityCreator >> newExtendsTypeClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newFalse [ + ^ self add: FASTTypeScriptFalse new ] @@ -415,6 +471,7 @@ FASTTypeScriptTEntityCreator >> newFalse [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newFinallyClause [ + ^ self add: FASTTypeScriptFinallyClause new ] @@ -422,6 +479,7 @@ FASTTypeScriptTEntityCreator >> newFinallyClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newFlowMaybeType [ + ^ self add: FASTTypeScriptFlowMaybeType new ] @@ -429,6 +487,7 @@ FASTTypeScriptTEntityCreator >> newFlowMaybeType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newForInStatement [ + ^ self add: FASTTypeScriptForInStatement new ] @@ -436,6 +495,7 @@ FASTTypeScriptTEntityCreator >> newForInStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newForStatement [ + ^ self add: FASTTypeScriptForStatement new ] @@ -443,6 +503,7 @@ FASTTypeScriptTEntityCreator >> newForStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newFormalParameters [ + ^ self add: FASTTypeScriptFormalParameters new ] @@ -450,6 +511,7 @@ FASTTypeScriptTEntityCreator >> newFormalParameters [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newFunctionDeclaration [ + ^ self add: FASTTypeScriptFunctionDeclaration new ] @@ -457,6 +519,7 @@ FASTTypeScriptTEntityCreator >> newFunctionDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newFunctionExpression [ + ^ self add: FASTTypeScriptFunctionExpression new ] @@ -464,6 +527,7 @@ FASTTypeScriptTEntityCreator >> newFunctionExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newFunctionSignature [ + ^ self add: FASTTypeScriptFunctionSignature new ] @@ -471,6 +535,7 @@ FASTTypeScriptTEntityCreator >> newFunctionSignature [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newFunctionType [ + ^ self add: FASTTypeScriptFunctionType new ] @@ -478,6 +543,7 @@ FASTTypeScriptTEntityCreator >> newFunctionType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newGeneratorFunction [ + ^ self add: FASTTypeScriptGeneratorFunction new ] @@ -485,6 +551,7 @@ FASTTypeScriptTEntityCreator >> newGeneratorFunction [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newGeneratorFunctionDeclaration [ + ^ self add: FASTTypeScriptGeneratorFunctionDeclaration new ] @@ -492,6 +559,7 @@ FASTTypeScriptTEntityCreator >> newGeneratorFunctionDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newGenericType [ + ^ self add: FASTTypeScriptGenericType new ] @@ -499,6 +567,7 @@ FASTTypeScriptTEntityCreator >> newGenericType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newHashBangLine [ + ^ self add: FASTTypeScriptHashBangLine new ] @@ -506,6 +575,7 @@ FASTTypeScriptTEntityCreator >> newHashBangLine [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newHtmlComment [ + ^ self add: FASTTypeScriptHtmlComment new ] @@ -513,6 +583,7 @@ FASTTypeScriptTEntityCreator >> newHtmlComment [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newIdentifier [ + ^ self add: FASTTypeScriptIdentifier new ] @@ -520,6 +591,7 @@ FASTTypeScriptTEntityCreator >> newIdentifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newIfStatement [ + ^ self add: FASTTypeScriptIfStatement new ] @@ -527,6 +599,7 @@ FASTTypeScriptTEntityCreator >> newIfStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newImplementsClause [ + ^ self add: FASTTypeScriptImplementsClause new ] @@ -534,6 +607,7 @@ FASTTypeScriptTEntityCreator >> newImplementsClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newImport [ + ^ self add: FASTTypeScriptImport new ] @@ -541,6 +615,7 @@ FASTTypeScriptTEntityCreator >> newImport [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newImportAlias [ + ^ self add: FASTTypeScriptImportAlias new ] @@ -548,6 +623,7 @@ FASTTypeScriptTEntityCreator >> newImportAlias [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newImportAttribute [ + ^ self add: FASTTypeScriptImportAttribute new ] @@ -555,6 +631,7 @@ FASTTypeScriptTEntityCreator >> newImportAttribute [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newImportClause [ + ^ self add: FASTTypeScriptImportClause new ] @@ -562,6 +639,7 @@ FASTTypeScriptTEntityCreator >> newImportClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newImportRequireClause [ + ^ self add: FASTTypeScriptImportRequireClause new ] @@ -569,6 +647,7 @@ FASTTypeScriptTEntityCreator >> newImportRequireClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newImportSpecifier [ + ^ self add: FASTTypeScriptImportSpecifier new ] @@ -576,6 +655,7 @@ FASTTypeScriptTEntityCreator >> newImportSpecifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newImportStatement [ + ^ self add: FASTTypeScriptImportStatement new ] @@ -583,6 +663,7 @@ FASTTypeScriptTEntityCreator >> newImportStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newIndexSignature [ + ^ self add: FASTTypeScriptIndexSignature new ] @@ -590,6 +671,7 @@ FASTTypeScriptTEntityCreator >> newIndexSignature [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newIndexTypeQuery [ + ^ self add: FASTTypeScriptIndexTypeQuery new ] @@ -597,6 +679,7 @@ FASTTypeScriptTEntityCreator >> newIndexTypeQuery [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newInferType [ + ^ self add: FASTTypeScriptInferType new ] @@ -604,6 +687,7 @@ FASTTypeScriptTEntityCreator >> newInferType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newInstantiationExpression [ + ^ self add: FASTTypeScriptInstantiationExpression new ] @@ -611,6 +695,7 @@ FASTTypeScriptTEntityCreator >> newInstantiationExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newInterfaceBody [ + ^ self add: FASTTypeScriptInterfaceBody new ] @@ -618,6 +703,7 @@ FASTTypeScriptTEntityCreator >> newInterfaceBody [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newInterfaceDeclaration [ + ^ self add: FASTTypeScriptInterfaceDeclaration new ] @@ -625,6 +711,7 @@ FASTTypeScriptTEntityCreator >> newInterfaceDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newInternalModule [ + ^ self add: FASTTypeScriptInternalModule new ] @@ -632,6 +719,7 @@ FASTTypeScriptTEntityCreator >> newInternalModule [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newIntersectionType [ + ^ self add: FASTTypeScriptIntersectionType new ] @@ -639,6 +727,7 @@ FASTTypeScriptTEntityCreator >> newIntersectionType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newJsxText [ + ^ self add: FASTTypeScriptJsxText new ] @@ -646,6 +735,7 @@ FASTTypeScriptTEntityCreator >> newJsxText [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newLabeledStatement [ + ^ self add: FASTTypeScriptLabeledStatement new ] @@ -653,6 +743,7 @@ FASTTypeScriptTEntityCreator >> newLabeledStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newLexicalDeclaration [ + ^ self add: FASTTypeScriptLexicalDeclaration new ] @@ -660,6 +751,7 @@ FASTTypeScriptTEntityCreator >> newLexicalDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newLiteral [ + ^ self add: FASTTypeScriptLiteral new ] @@ -667,6 +759,7 @@ FASTTypeScriptTEntityCreator >> newLiteral [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newLiteralType [ + ^ self add: FASTTypeScriptLiteralType new ] @@ -674,6 +767,7 @@ FASTTypeScriptTEntityCreator >> newLiteralType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newLookupType [ + ^ self add: FASTTypeScriptLookupType new ] @@ -681,6 +775,7 @@ FASTTypeScriptTEntityCreator >> newLookupType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newMappedTypeClause [ + ^ self add: FASTTypeScriptMappedTypeClause new ] @@ -688,6 +783,7 @@ FASTTypeScriptTEntityCreator >> newMappedTypeClause [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newMemberExpression [ + ^ self add: FASTTypeScriptMemberExpression new ] @@ -695,6 +791,7 @@ FASTTypeScriptTEntityCreator >> newMemberExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newMetaProperty [ + ^ self add: FASTTypeScriptMetaProperty new ] @@ -702,6 +799,7 @@ FASTTypeScriptTEntityCreator >> newMetaProperty [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newMethodDefinition [ + ^ self add: FASTTypeScriptMethodDefinition new ] @@ -709,6 +807,7 @@ FASTTypeScriptTEntityCreator >> newMethodDefinition [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newMethodSignature [ + ^ self add: FASTTypeScriptMethodSignature new ] @@ -716,6 +815,7 @@ FASTTypeScriptTEntityCreator >> newMethodSignature [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newModule [ + ^ self add: FASTTypeScriptModule new ] @@ -723,6 +823,7 @@ FASTTypeScriptTEntityCreator >> newModule [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newNamedImports [ + ^ self add: FASTTypeScriptNamedImports new ] @@ -730,6 +831,7 @@ FASTTypeScriptTEntityCreator >> newNamedImports [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newNamespaceExport [ + ^ self add: FASTTypeScriptNamespaceExport new ] @@ -737,6 +839,7 @@ FASTTypeScriptTEntityCreator >> newNamespaceExport [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newNamespaceImport [ + ^ self add: FASTTypeScriptNamespaceImport new ] @@ -744,6 +847,7 @@ FASTTypeScriptTEntityCreator >> newNamespaceImport [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newNestedIdentifier [ + ^ self add: FASTTypeScriptNestedIdentifier new ] @@ -751,6 +855,7 @@ FASTTypeScriptTEntityCreator >> newNestedIdentifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newNestedTypeIdentifier [ + ^ self add: FASTTypeScriptNestedTypeIdentifier new ] @@ -758,6 +863,7 @@ FASTTypeScriptTEntityCreator >> newNestedTypeIdentifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newNewExpression [ + ^ self add: FASTTypeScriptNewExpression new ] @@ -765,6 +871,7 @@ FASTTypeScriptTEntityCreator >> newNewExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newNonNullExpression [ + ^ self add: FASTTypeScriptNonNullExpression new ] @@ -772,6 +879,7 @@ FASTTypeScriptTEntityCreator >> newNonNullExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newNull [ + ^ self add: FASTTypeScriptNull new ] @@ -779,6 +887,7 @@ FASTTypeScriptTEntityCreator >> newNull [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newNumber [ + ^ self add: FASTTypeScriptNumber new ] @@ -786,6 +895,7 @@ FASTTypeScriptTEntityCreator >> newNumber [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newObject [ + ^ self add: FASTTypeScriptObject new ] @@ -793,6 +903,7 @@ FASTTypeScriptTEntityCreator >> newObject [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newObjectAssignmentPattern [ + ^ self add: FASTTypeScriptObjectAssignmentPattern new ] @@ -800,6 +911,7 @@ FASTTypeScriptTEntityCreator >> newObjectAssignmentPattern [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newObjectPattern [ + ^ self add: FASTTypeScriptObjectPattern new ] @@ -807,6 +919,7 @@ FASTTypeScriptTEntityCreator >> newObjectPattern [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newObjectType [ + ^ self add: FASTTypeScriptObjectType new ] @@ -814,6 +927,7 @@ FASTTypeScriptTEntityCreator >> newObjectType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newOmittingTypeAnnotation [ + ^ self add: FASTTypeScriptOmittingTypeAnnotation new ] @@ -821,6 +935,7 @@ FASTTypeScriptTEntityCreator >> newOmittingTypeAnnotation [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newOptingTypeAnnotation [ + ^ self add: FASTTypeScriptOptingTypeAnnotation new ] @@ -828,6 +943,7 @@ FASTTypeScriptTEntityCreator >> newOptingTypeAnnotation [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newOptionalChain [ + ^ self add: FASTTypeScriptOptionalChain new ] @@ -835,6 +951,7 @@ FASTTypeScriptTEntityCreator >> newOptionalChain [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newOptionalParameter [ + ^ self add: FASTTypeScriptOptionalParameter new ] @@ -842,6 +959,7 @@ FASTTypeScriptTEntityCreator >> newOptionalParameter [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newOptionalType [ + ^ self add: FASTTypeScriptOptionalType new ] @@ -849,6 +967,7 @@ FASTTypeScriptTEntityCreator >> newOptionalType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newOverrideModifier [ + ^ self add: FASTTypeScriptOverrideModifier new ] @@ -856,6 +975,7 @@ FASTTypeScriptTEntityCreator >> newOverrideModifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newPair [ + ^ self add: FASTTypeScriptPair new ] @@ -863,6 +983,7 @@ FASTTypeScriptTEntityCreator >> newPair [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newPairPattern [ + ^ self add: FASTTypeScriptPairPattern new ] @@ -870,6 +991,7 @@ FASTTypeScriptTEntityCreator >> newPairPattern [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newParenthesizedExpression [ + ^ self add: FASTTypeScriptParenthesizedExpression new ] @@ -877,6 +999,7 @@ FASTTypeScriptTEntityCreator >> newParenthesizedExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newParenthesizedType [ + ^ self add: FASTTypeScriptParenthesizedType new ] @@ -884,6 +1007,7 @@ FASTTypeScriptTEntityCreator >> newParenthesizedType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newPredefinedType [ + ^ self add: FASTTypeScriptPredefinedType new ] @@ -891,6 +1015,7 @@ FASTTypeScriptTEntityCreator >> newPredefinedType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newPrivatePropertyIdentifier [ + ^ self add: FASTTypeScriptPrivatePropertyIdentifier new ] @@ -898,6 +1023,7 @@ FASTTypeScriptTEntityCreator >> newPrivatePropertyIdentifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newProgram [ + ^ self add: FASTTypeScriptProgram new ] @@ -905,6 +1031,7 @@ FASTTypeScriptTEntityCreator >> newProgram [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newPropertyIdentifier [ + ^ self add: FASTTypeScriptPropertyIdentifier new ] @@ -912,6 +1039,7 @@ FASTTypeScriptTEntityCreator >> newPropertyIdentifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newPropertySignature [ + ^ self add: FASTTypeScriptPropertySignature new ] @@ -919,6 +1047,7 @@ FASTTypeScriptTEntityCreator >> newPropertySignature [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newPublicFieldDefinition [ + ^ self add: FASTTypeScriptPublicFieldDefinition new ] @@ -926,6 +1055,7 @@ FASTTypeScriptTEntityCreator >> newPublicFieldDefinition [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newReadonlyType [ + ^ self add: FASTTypeScriptReadonlyType new ] @@ -933,6 +1063,7 @@ FASTTypeScriptTEntityCreator >> newReadonlyType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newRegex [ + ^ self add: FASTTypeScriptRegex new ] @@ -940,6 +1071,7 @@ FASTTypeScriptTEntityCreator >> newRegex [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newRegexFlags [ + ^ self add: FASTTypeScriptRegexFlags new ] @@ -947,6 +1079,7 @@ FASTTypeScriptTEntityCreator >> newRegexFlags [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newRegexPattern [ + ^ self add: FASTTypeScriptRegexPattern new ] @@ -954,6 +1087,7 @@ FASTTypeScriptTEntityCreator >> newRegexPattern [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newRequiredParameter [ + ^ self add: FASTTypeScriptRequiredParameter new ] @@ -961,6 +1095,7 @@ FASTTypeScriptTEntityCreator >> newRequiredParameter [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newRestPattern [ + ^ self add: FASTTypeScriptRestPattern new ] @@ -968,6 +1103,7 @@ FASTTypeScriptTEntityCreator >> newRestPattern [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newRestType [ + ^ self add: FASTTypeScriptRestType new ] @@ -975,6 +1111,7 @@ FASTTypeScriptTEntityCreator >> newRestType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newReturnStatement [ + ^ self add: FASTTypeScriptReturnStatement new ] @@ -982,6 +1119,7 @@ FASTTypeScriptTEntityCreator >> newReturnStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newSatisfiesExpression [ + ^ self add: FASTTypeScriptSatisfiesExpression new ] @@ -989,6 +1127,7 @@ FASTTypeScriptTEntityCreator >> newSatisfiesExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newSequenceExpression [ + ^ self add: FASTTypeScriptSequenceExpression new ] @@ -996,6 +1135,7 @@ FASTTypeScriptTEntityCreator >> newSequenceExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newShorthandPropertyIdentifier [ + ^ self add: FASTTypeScriptShorthandPropertyIdentifier new ] @@ -1003,6 +1143,7 @@ FASTTypeScriptTEntityCreator >> newShorthandPropertyIdentifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newShorthandPropertyIdentifierPattern [ + ^ self add: FASTTypeScriptShorthandPropertyIdentifierPattern new ] @@ -1010,6 +1151,7 @@ FASTTypeScriptTEntityCreator >> newShorthandPropertyIdentifierPattern [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newSpreadElement [ + ^ self add: FASTTypeScriptSpreadElement new ] @@ -1017,6 +1159,7 @@ FASTTypeScriptTEntityCreator >> newSpreadElement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newStatement [ + ^ self add: FASTTypeScriptStatement new ] @@ -1024,6 +1167,7 @@ FASTTypeScriptTEntityCreator >> newStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newStatementBlock [ + ^ self add: FASTTypeScriptStatementBlock new ] @@ -1031,6 +1175,7 @@ FASTTypeScriptTEntityCreator >> newStatementBlock [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newStatementIdentifier [ + ^ self add: FASTTypeScriptStatementIdentifier new ] @@ -1038,6 +1183,7 @@ FASTTypeScriptTEntityCreator >> newStatementIdentifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newString [ + ^ self add: FASTTypeScriptString new ] @@ -1045,6 +1191,7 @@ FASTTypeScriptTEntityCreator >> newString [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newStringFragment [ + ^ self add: FASTTypeScriptStringFragment new ] @@ -1052,6 +1199,7 @@ FASTTypeScriptTEntityCreator >> newStringFragment [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newSubscriptExpression [ + ^ self add: FASTTypeScriptSubscriptExpression new ] @@ -1059,6 +1207,7 @@ FASTTypeScriptTEntityCreator >> newSubscriptExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newSuper [ + ^ self add: FASTTypeScriptSuper new ] @@ -1066,6 +1215,7 @@ FASTTypeScriptTEntityCreator >> newSuper [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newSwitchBody [ + ^ self add: FASTTypeScriptSwitchBody new ] @@ -1073,6 +1223,7 @@ FASTTypeScriptTEntityCreator >> newSwitchBody [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newSwitchCase [ + ^ self add: FASTTypeScriptSwitchCase new ] @@ -1080,6 +1231,7 @@ FASTTypeScriptTEntityCreator >> newSwitchCase [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newSwitchDefault [ + ^ self add: FASTTypeScriptSwitchDefault new ] @@ -1087,6 +1239,7 @@ FASTTypeScriptTEntityCreator >> newSwitchDefault [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newSwitchStatement [ + ^ self add: FASTTypeScriptSwitchStatement new ] @@ -1094,6 +1247,7 @@ FASTTypeScriptTEntityCreator >> newSwitchStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTemplateLiteralType [ + ^ self add: FASTTypeScriptTemplateLiteralType new ] @@ -1101,6 +1255,7 @@ FASTTypeScriptTEntityCreator >> newTemplateLiteralType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTemplateString [ + ^ self add: FASTTypeScriptTemplateString new ] @@ -1108,6 +1263,7 @@ FASTTypeScriptTEntityCreator >> newTemplateString [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTemplateSubstitution [ + ^ self add: FASTTypeScriptTemplateSubstitution new ] @@ -1115,6 +1271,7 @@ FASTTypeScriptTEntityCreator >> newTemplateSubstitution [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTemplateType [ + ^ self add: FASTTypeScriptTemplateType new ] @@ -1122,6 +1279,7 @@ FASTTypeScriptTEntityCreator >> newTemplateType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTernaryExpression [ + ^ self add: FASTTypeScriptTernaryExpression new ] @@ -1129,6 +1287,7 @@ FASTTypeScriptTEntityCreator >> newTernaryExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newThis [ + ^ self add: FASTTypeScriptThis new ] @@ -1136,6 +1295,7 @@ FASTTypeScriptTEntityCreator >> newThis [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newThisType [ + ^ self add: FASTTypeScriptThisType new ] @@ -1143,6 +1303,7 @@ FASTTypeScriptTEntityCreator >> newThisType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newThrowStatement [ + ^ self add: FASTTypeScriptThrowStatement new ] @@ -1150,6 +1311,7 @@ FASTTypeScriptTEntityCreator >> newThrowStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTrue [ + ^ self add: FASTTypeScriptTrue new ] @@ -1157,6 +1319,7 @@ FASTTypeScriptTEntityCreator >> newTrue [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTryStatement [ + ^ self add: FASTTypeScriptTryStatement new ] @@ -1164,6 +1327,7 @@ FASTTypeScriptTEntityCreator >> newTryStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTupleType [ + ^ self add: FASTTypeScriptTupleType new ] @@ -1171,6 +1335,7 @@ FASTTypeScriptTEntityCreator >> newTupleType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypeAliasDeclaration [ + ^ self add: FASTTypeScriptTypeAliasDeclaration new ] @@ -1178,6 +1343,7 @@ FASTTypeScriptTEntityCreator >> newTypeAliasDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypeAnnotation [ + ^ self add: FASTTypeScriptTypeAnnotation new ] @@ -1185,6 +1351,7 @@ FASTTypeScriptTEntityCreator >> newTypeAnnotation [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypeArguments [ + ^ self add: FASTTypeScriptTypeArguments new ] @@ -1192,6 +1359,7 @@ FASTTypeScriptTEntityCreator >> newTypeArguments [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypeAssertion [ + ^ self add: FASTTypeScriptTypeAssertion new ] @@ -1199,6 +1367,7 @@ FASTTypeScriptTEntityCreator >> newTypeAssertion [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypeIdentifier [ + ^ self add: FASTTypeScriptTypeIdentifier new ] @@ -1206,6 +1375,7 @@ FASTTypeScriptTEntityCreator >> newTypeIdentifier [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypeParameter [ + ^ self add: FASTTypeScriptTypeParameter new ] @@ -1213,6 +1383,7 @@ FASTTypeScriptTEntityCreator >> newTypeParameter [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypeParameters [ + ^ self add: FASTTypeScriptTypeParameters new ] @@ -1220,6 +1391,7 @@ FASTTypeScriptTEntityCreator >> newTypeParameters [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypePredicate [ + ^ self add: FASTTypeScriptTypePredicate new ] @@ -1227,6 +1399,7 @@ FASTTypeScriptTEntityCreator >> newTypePredicate [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypePredicateAnnotation [ + ^ self add: FASTTypeScriptTypePredicateAnnotation new ] @@ -1234,6 +1407,7 @@ FASTTypeScriptTEntityCreator >> newTypePredicateAnnotation [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newTypeQuery [ + ^ self add: FASTTypeScriptTypeQuery new ] @@ -1241,6 +1415,7 @@ FASTTypeScriptTEntityCreator >> newTypeQuery [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newUnaryExpression [ + ^ self add: FASTTypeScriptUnaryExpression new ] @@ -1248,6 +1423,7 @@ FASTTypeScriptTEntityCreator >> newUnaryExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newUndefined [ + ^ self add: FASTTypeScriptUndefined new ] @@ -1255,6 +1431,7 @@ FASTTypeScriptTEntityCreator >> newUndefined [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newUnionType [ + ^ self add: FASTTypeScriptUnionType new ] @@ -1262,6 +1439,7 @@ FASTTypeScriptTEntityCreator >> newUnionType [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newUpdateExpression [ + ^ self add: FASTTypeScriptUpdateExpression new ] @@ -1269,6 +1447,7 @@ FASTTypeScriptTEntityCreator >> newUpdateExpression [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newVariableDeclaration [ + ^ self add: FASTTypeScriptVariableDeclaration new ] @@ -1276,6 +1455,7 @@ FASTTypeScriptTEntityCreator >> newVariableDeclaration [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newVariableDeclarator [ + ^ self add: FASTTypeScriptVariableDeclarator new ] @@ -1283,6 +1463,7 @@ FASTTypeScriptTEntityCreator >> newVariableDeclarator [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newWhileStatement [ + ^ self add: FASTTypeScriptWhileStatement new ] @@ -1290,6 +1471,7 @@ FASTTypeScriptTEntityCreator >> newWhileStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newWithStatement [ + ^ self add: FASTTypeScriptWithStatement new ] @@ -1297,6 +1479,7 @@ FASTTypeScriptTEntityCreator >> newWithStatement [ { #category : 'entity creation' } FASTTypeScriptTEntityCreator >> newYieldExpression [ + ^ self add: FASTTypeScriptYieldExpression new ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTModifier.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTModifier.trait.st index 8e422bc..6223d1a 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTModifier.trait.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTModifier.trait.st @@ -25,16 +25,17 @@ Trait { { #category : 'meta' } FASTTypeScriptTModifier classSide >> annotation [ + - ^ self ] { #category : 'accessing' } FASTTypeScriptTModifier >> tWithModifiersModifiersOwner [ "Relation named: #tWithModifiersModifiersOwner type: #FASTTypeScriptTWithModifiers opposite: #modifiers" + @@ -44,13 +45,7 @@ FASTTypeScriptTModifier >> tWithModifiersModifiersOwner [ { #category : 'accessing' } FASTTypeScriptTModifier >> tWithModifiersModifiersOwner: anObject [ + tWithModifiersModifiersOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptTModifier >> tWithModifiersModifiersOwnerGroup [ - - - ^ MooseSpecializedGroup with: self tWithModifiersModifiersOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTOptionalField.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTOptionalField.trait.st index fe57642..2cea577 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTOptionalField.trait.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTOptionalField.trait.st @@ -29,16 +29,17 @@ Trait { { #category : 'meta' } FASTTypeScriptTOptionalField classSide >> annotation [ + - ^ self ] { #category : 'accessing' } FASTTypeScriptTOptionalField >> exportSpecifierAliasOwner [ "Relation named: #exportSpecifierAliasOwner type: #FASTTypeScriptExportSpecifier opposite: #alias" + @@ -49,21 +50,16 @@ FASTTypeScriptTOptionalField >> exportSpecifierAliasOwner [ { #category : 'accessing' } FASTTypeScriptTOptionalField >> exportSpecifierAliasOwner: anObject [ + exportSpecifierAliasOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptTOptionalField >> exportSpecifierAliasOwnerGroup [ - - - ^ MooseSpecializedGroup with: self exportSpecifierAliasOwner -] - { #category : 'accessing' } FASTTypeScriptTOptionalField >> methodDefinitionReturnTypeOwner [ "Relation named: #methodDefinitionReturnTypeOwner type: #FASTTypeScriptMethodDefinition opposite: #return_type" + @@ -74,21 +70,16 @@ FASTTypeScriptTOptionalField >> methodDefinitionReturnTypeOwner [ { #category : 'accessing' } FASTTypeScriptTOptionalField >> methodDefinitionReturnTypeOwner: anObject [ + methodDefinitionReturnTypeOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptTOptionalField >> methodDefinitionReturnTypeOwnerGroup [ - - - ^ MooseSpecializedGroup with: self methodDefinitionReturnTypeOwner -] - { #category : 'accessing' } FASTTypeScriptTOptionalField >> requiredParameterTypeOwner [ "Relation named: #requiredParameterTypeOwner type: #FASTTypeScriptRequiredParameter opposite: #type" + @@ -98,13 +89,7 @@ FASTTypeScriptTOptionalField >> requiredParameterTypeOwner [ { #category : 'accessing' } FASTTypeScriptTOptionalField >> requiredParameterTypeOwner: anObject [ + requiredParameterTypeOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptTOptionalField >> requiredParameterTypeOwnerGroup [ - - - ^ MooseSpecializedGroup with: self requiredParameterTypeOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTPattern.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTPattern.trait.st new file mode 100644 index 0000000..aaf85c8 --- /dev/null +++ b/FAST-TypeScript-Model/FASTTypeScriptTPattern.trait.st @@ -0,0 +1,51 @@ +" +I am a pattern in Typescript + +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | `left` | `FASTTypeScriptAssignmentPattern` | | + + + +" +Trait { + #name : 'FASTTypeScriptTPattern', + #instVars : [ + '#assignmentPatternLeftOwner => FMOne type: #FASTTypeScriptAssignmentPattern opposite: #left' + ], + #category : 'FAST-TypeScript-Model-Traits', + #package : 'FAST-TypeScript-Model', + #tag : 'Traits' +} + +{ #category : 'meta' } +FASTTypeScriptTPattern classSide >> annotation [ + + + + + +] + +{ #category : 'accessing' } +FASTTypeScriptTPattern >> assignmentPatternLeftOwner [ + "Relation named: #assignmentPatternLeftOwner type: #FASTTypeScriptAssignmentPattern opposite: #left" + + + + + + ^ assignmentPatternLeftOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTPattern >> assignmentPatternLeftOwner: anObject [ + + + + assignmentPatternLeftOwner := anObject +] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTPrimaryExpression.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTPrimaryExpression.trait.st new file mode 100644 index 0000000..40ab8db --- /dev/null +++ b/FAST-TypeScript-Model/FASTTypeScriptTPrimaryExpression.trait.st @@ -0,0 +1,137 @@ +" +I am a primary expression in Typescript + +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" +Trait { + #name : 'FASTTypeScriptTPrimaryExpression', + #instVars : [ + '#importSpecifierNameOwner => FMOne type: #FASTTypeScriptImportSpecifier opposite: #name', + '#typePredicateNameOwner => FMOne type: #FASTTypeScriptTypePredicate opposite: #name' + ], + #traits : 'FASTTExpression', + #classTraits : 'FASTTExpression classTrait', + #category : 'FAST-TypeScript-Model-Traits', + #package : 'FAST-TypeScript-Model', + #tag : 'Traits' +} + +{ #category : 'meta' } +FASTTypeScriptTPrimaryExpression classSide >> annotation [ + + + + + +] + +{ #category : 'accessing' } +FASTTypeScriptTPrimaryExpression >> importSpecifierNameOwner [ + "Relation named: #importSpecifierNameOwner type: #FASTTypeScriptImportSpecifier opposite: #name" + + + + + + ^ importSpecifierNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTPrimaryExpression >> importSpecifierNameOwner: anObject [ + + + + importSpecifierNameOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTPrimaryExpression >> typePredicateNameOwner [ + "Relation named: #typePredicateNameOwner type: #FASTTypeScriptTypePredicate opposite: #name" + + + + + + ^ typePredicateNameOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTPrimaryExpression >> typePredicateNameOwner: anObject [ + + + + typePredicateNameOwner := anObject +] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTPrimaryType.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTPrimaryType.trait.st new file mode 100644 index 0000000..9a04d1c --- /dev/null +++ b/FAST-TypeScript-Model/FASTTypeScriptTPrimaryType.trait.st @@ -0,0 +1,22 @@ +" +I am a primary type in Typescript + + +" +Trait { + #name : 'FASTTypeScriptTPrimaryType', + #traits : 'FASTTypeScriptTType', + #classTraits : 'FASTTypeScriptTType classTrait', + #category : 'FAST-TypeScript-Model-Traits', + #package : 'FAST-TypeScript-Model', + #tag : 'Traits' +} + +{ #category : 'meta' } +FASTTypeScriptTPrimaryType classSide >> annotation [ + + + + + +] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTReturnType.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTReturnType.trait.st index 3099320..c0f8b2b 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTReturnType.trait.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTReturnType.trait.st @@ -25,16 +25,17 @@ Trait { { #category : 'meta' } FASTTypeScriptTReturnType classSide >> annotation [ + - ^ self ] { #category : 'accessing' } FASTTypeScriptTReturnType >> functionDeclarationReturnTypeOwner [ "Relation named: #functionDeclarationReturnTypeOwner type: #FASTTypeScriptFunctionDeclaration opposite: #return_type" + @@ -45,13 +46,7 @@ FASTTypeScriptTReturnType >> functionDeclarationReturnTypeOwner [ { #category : 'accessing' } FASTTypeScriptTReturnType >> functionDeclarationReturnTypeOwner: anObject [ + functionDeclarationReturnTypeOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptTReturnType >> functionDeclarationReturnTypeOwnerGroup [ - - - ^ MooseSpecializedGroup with: self functionDeclarationReturnTypeOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTType.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTType.trait.st new file mode 100644 index 0000000..b670a52 --- /dev/null +++ b/FAST-TypeScript-Model/FASTTypeScriptTType.trait.st @@ -0,0 +1,20 @@ +" +I am a type in Typescript + + +" +Trait { + #name : 'FASTTypeScriptTType', + #category : 'FAST-TypeScript-Model-Traits', + #package : 'FAST-TypeScript-Model', + #tag : 'Traits' +} + +{ #category : 'meta' } +FASTTypeScriptTType classSide >> annotation [ + + + + + +] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTWithDeclarations.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTWithDeclarations.trait.st index 2ef0b46..7dc10b2 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTWithDeclarations.trait.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTWithDeclarations.trait.st @@ -25,14 +25,16 @@ Trait { { #category : 'meta' } FASTTypeScriptTWithDeclarations classSide >> annotation [ + - ^ self ] { #category : 'adding' } FASTTypeScriptTWithDeclarations >> addDeclaration: anObject [ + + ^ self declarations add: anObject ] @@ -41,6 +43,7 @@ FASTTypeScriptTWithDeclarations >> addDeclaration: anObject [ FASTTypeScriptTWithDeclarations >> declarations [ "Relation named: #declarations type: #FASTTypeScriptTDeclaration opposite: #tWithDeclarationsDeclarationsOwner" + @@ -50,13 +53,7 @@ FASTTypeScriptTWithDeclarations >> declarations [ { #category : 'accessing' } FASTTypeScriptTWithDeclarations >> declarations: anObject [ + declarations value: anObject ] - -{ #category : 'navigation' } -FASTTypeScriptTWithDeclarations >> declarationsGroup [ - - - ^ MooseSpecializedGroup withAll: self declarations asSet -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTWithModifiers.trait.st b/FAST-TypeScript-Model/FASTTypeScriptTWithModifiers.trait.st index f81cb08..e011598 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTWithModifiers.trait.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTWithModifiers.trait.st @@ -25,14 +25,16 @@ Trait { { #category : 'meta' } FASTTypeScriptTWithModifiers classSide >> annotation [ + - ^ self ] { #category : 'adding' } FASTTypeScriptTWithModifiers >> addModifier: anObject [ + + ^ self modifiers add: anObject ] @@ -41,6 +43,7 @@ FASTTypeScriptTWithModifiers >> addModifier: anObject [ FASTTypeScriptTWithModifiers >> modifiers [ "Relation named: #modifiers type: #FASTTypeScriptTModifier opposite: #tWithModifiersModifiersOwner" + @@ -50,13 +53,7 @@ FASTTypeScriptTWithModifiers >> modifiers [ { #category : 'accessing' } FASTTypeScriptTWithModifiers >> modifiers: anObject [ + modifiers value: anObject ] - -{ #category : 'navigation' } -FASTTypeScriptTWithModifiers >> modifiersGroup [ - - - ^ MooseSpecializedGroup withAll: self modifiers asSet -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTemplateLiteralType.class.st b/FAST-TypeScript-Model/FASTTypeScriptTemplateLiteralType.class.st index 73b0eb0..f98e0a8 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTemplateLiteralType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTemplateLiteralType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptTemplateLiteralType` | `templateLiteralTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +80,11 @@ Class { #name : 'FASTTypeScriptTemplateLiteralType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #templateLiteralTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +93,34 @@ Class { { #category : 'meta' } FASTTypeScriptTemplateLiteralType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTemplateLiteralType class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptTemplateLiteralType >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTemplateLiteralType >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #templateLiteralTypeOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptTemplateLiteralType >> childrenNodes: anObject [ - self deprecatedAliases: { #FASTTypescriptTemplate_literal_type } - - + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTemplateString.class.st b/FAST-TypeScript-Model/FASTTypeScriptTemplateString.class.st index 8b33c72..aec4037 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTemplateString.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTemplateString.class.st @@ -1,6 +1,92 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptTemplateString` | `templateStringOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptTemplateString', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #templateStringOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +95,34 @@ Class { { #category : 'meta' } FASTTypeScriptTemplateString class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTemplateString class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptTemplateString >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptTemplate_string } - - + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTemplateString >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #templateStringOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptTemplateString >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTemplateSubstitution.class.st b/FAST-TypeScript-Model/FASTTypeScriptTemplateSubstitution.class.st index a7ff172..5673bdc 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTemplateSubstitution.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTemplateSubstitution.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptTemplateSubstitution` | `templateSubstitutionOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptTemplateSubstitution', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #templateSubstitutionOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptTemplateSubstitution class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTemplateSubstitution class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptTemplateSubstitution >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #templateSubstitutionOwner" - self deprecatedAliases: { #FASTTypescriptTemplate_substitution } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptTemplateSubstitution >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTemplateType.class.st b/FAST-TypeScript-Model/FASTTypeScriptTemplateType.class.st index 1ac3c77..5dfdf3a 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTemplateType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTemplateType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptTemplateType` | `templateTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -51,6 +82,9 @@ Class { #superclass : 'FASTTypeScriptEntity', #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #templateTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptTemplateType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTemplateType class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptTemplateType >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #templateTypeOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptTemplateType >> childrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptTemplate_type } - - + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTernaryExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptTernaryExpression.class.st index f9cfeda..b5432f2 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTernaryExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTernaryExpression.class.st @@ -1,3 +1,17 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `alternative` | `FASTTypeScriptTernaryExpression` | `ternaryExpressionAlternativeOwner` | `FASTTExpression` | | +| `condition` | `FASTTypeScriptTernaryExpression` | `ternaryExpressionConditionOwner` | `FASTTExpression` | | +| `consequence` | `FASTTypeScriptTernaryExpression` | `ternaryExpressionConsequenceOwner` | `FASTTExpression` | | + + + +" Class { #name : 'FASTTypeScriptTernaryExpression', #superclass : 'FASTTypeScriptExpression', @@ -9,17 +23,83 @@ Class { { #category : 'meta' } FASTTypeScriptTernaryExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTernaryExpression class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptTernaryExpression >> alternative [ + "Relation named: #alternative type: #FASTTExpression opposite: #ternaryExpressionAlternativeOwner" + + + + + ^ self attributeAt: #alternative ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptTernaryExpression >> alternative: anObject [ + + + + (self attributeAt: #alternative ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self alternative. + self attributeAt: #alternative put: anObject. + otherSide ternaryExpressionAlternativeOwner: nil ] + ifNotNil: [ + self attributeAt: #alternative put: anObject. + anObject ternaryExpressionAlternativeOwner: self ] +] + +{ #category : 'accessing' } +FASTTypeScriptTernaryExpression >> condition [ + "Relation named: #condition type: #FASTTExpression opposite: #ternaryExpressionConditionOwner" - self deprecatedAliases: { #FASTTypescriptTernary_expression } + + + + ^ self attributeAt: #condition ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptTernaryExpression >> condition: anObject [ + + + + (self attributeAt: #condition ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self condition. + self attributeAt: #condition put: anObject. + otherSide ternaryExpressionConditionOwner: nil ] + ifNotNil: [ + self attributeAt: #condition put: anObject. + anObject ternaryExpressionConditionOwner: self ] +] - - +{ #category : 'accessing' } +FASTTypeScriptTernaryExpression >> consequence [ + "Relation named: #consequence type: #FASTTExpression opposite: #ternaryExpressionConsequenceOwner" + + + + + ^ self attributeAt: #consequence ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptTernaryExpression >> consequence: anObject [ + + + + (self attributeAt: #consequence ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self consequence. + self attributeAt: #consequence put: anObject. + otherSide ternaryExpressionConsequenceOwner: nil ] + ifNotNil: [ + self attributeAt: #consequence put: anObject. + anObject ternaryExpressionConsequenceOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptThis.class.st b/FAST-TypeScript-Model/FASTTypeScriptThis.class.st index 3f7a764..bc18fe1 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptThis.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptThis.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,49 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -49,8 +77,8 @@ Class { #name : 'FASTTypeScriptThis', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,14 +87,8 @@ Class { { #category : 'meta' } FASTTypeScriptThis class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptThis class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptThis } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptThisType.class.st b/FAST-TypeScript-Model/FASTTypeScriptThisType.class.st index 7d82ebd..3e59b2d 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptThisType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptThisType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,47 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -49,8 +75,8 @@ Class { #name : 'FASTTypeScriptThisType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +85,8 @@ Class { { #category : 'meta' } FASTTypeScriptThisType class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptThisType class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptThis_type. } - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptThrowStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptThrowStatement.class.st index 0a7281b..0ed7508 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptThrowStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptThrowStatement.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptThrowStatement` | `throwStatementOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptThrowStatement', #superclass : 'FASTTypeScriptStatement', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #throwStatementOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,15 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptThrowStatement class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptThrowStatement class >> initialize [ - self deprecatedAliases: { #FASTTypescriptThrow_statement } - - +{ #category : 'accessing' } +FASTTypeScriptThrowStatement >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #throwStatementOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptThrowStatement >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTrue.class.st b/FAST-TypeScript-Model/FASTTypeScriptTrue.class.st index 8803bce..d3e2fef 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTrue.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTrue.class.st @@ -1,6 +1,84 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| +| `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | +| `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| +| `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| +| `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| +| `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| +| `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| +| `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| +| `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | +| `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | +| `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| +| `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| +| `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| +| `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| +| `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | +| `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| +| `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| +| `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | +| `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptTrue', #superclass : 'FASTTypeScriptBoolean', + #traits : 'FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPrimaryExpression classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,14 +87,8 @@ Class { { #category : 'meta' } FASTTypeScriptTrue class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptTrue class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptTrue } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTryStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptTryStatement.class.st index cbf44ec..f14347c 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTryStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTryStatement.class.st @@ -28,24 +28,17 @@ Class { { #category : 'meta' } FASTTypeScriptTryStatement class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptTryStatement class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptTry_statement } - - ] { #category : 'accessing' } FASTTypeScriptTryStatement >> body [ "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #tryStatementBodyOwner" + ^ body @@ -54,21 +47,16 @@ FASTTypeScriptTryStatement >> body [ { #category : 'accessing' } FASTTypeScriptTryStatement >> body: anObject [ + body := anObject ] -{ #category : 'navigation' } -FASTTypeScriptTryStatement >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body -] - { #category : 'accessing' } FASTTypeScriptTryStatement >> finalizer [ "Relation named: #finalizer type: #FASTTypeScriptFinallyClause opposite: #tryStatementFinalizerOwner" + ^ finalizer @@ -77,21 +65,16 @@ FASTTypeScriptTryStatement >> finalizer [ { #category : 'accessing' } FASTTypeScriptTryStatement >> finalizer: anObject [ + finalizer := anObject ] -{ #category : 'navigation' } -FASTTypeScriptTryStatement >> finalizerGroup [ - - - ^ MooseSpecializedGroup with: self finalizer -] - { #category : 'accessing' } FASTTypeScriptTryStatement >> handler [ "Relation named: #handler type: #FASTTypeScriptCatchClause opposite: #tryStatementHandlerOwner" + ^ handler @@ -100,13 +83,7 @@ FASTTypeScriptTryStatement >> handler [ { #category : 'accessing' } FASTTypeScriptTryStatement >> handler: anObject [ + handler := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptTryStatement >> handlerGroup [ - - - ^ MooseSpecializedGroup with: self handler -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTupleType.class.st b/FAST-TypeScript-Model/FASTTypeScriptTupleType.class.st index 3e3cc00..ec321aa 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTupleType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTupleType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptTupleType` | `tupleTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +80,11 @@ Class { #name : 'FASTTypeScriptTupleType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #tupleTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +93,34 @@ Class { { #category : 'meta' } FASTTypeScriptTupleType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTupleType class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptTupleType >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTupleType >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #tupleTypeOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptTupleType >> childrenNodes: anObject [ - self deprecatedAliases: { #FASTTypescriptTuple_type } - - + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeAliasDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypeAliasDeclaration.class.st index 9f08edc..3080e30 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypeAliasDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypeAliasDeclaration.class.st @@ -1,6 +1,50 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `name` | `FASTTypeScriptTypeAliasDeclaration` | `typeAliasDeclarationNameOwner` | `FASTTypeScriptTypeIdentifier` | | +| `type_parameters` | `FASTTypeScriptTypeAliasDeclaration` | `typeAliasDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | | +| `value` | `FASTTypeScriptTypeAliasDeclaration` | `typeAliasDeclarationValueOwner` | `FASTTExpression` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptTypeAliasDeclaration', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTDeclaration', + #classTraits : 'FASTTypeScriptTDeclaration classTrait', + #instVars : [ + '#name => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #typeAliasDeclarationNameOwner', + '#type_parameters => FMOne type: #FASTTypeScriptTypeParameters opposite: #typeAliasDeclarationTypeParametersOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +53,67 @@ Class { { #category : 'meta' } FASTTypeScriptTypeAliasDeclaration class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTypeAliasDeclaration class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptTypeAliasDeclaration >> name [ + "Relation named: #name type: #FASTTypeScriptTypeIdentifier opposite: #typeAliasDeclarationNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAliasDeclaration >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAliasDeclaration >> type_parameters [ + "Relation named: #type_parameters type: #FASTTypeScriptTypeParameters opposite: #typeAliasDeclarationTypeParametersOwner" - self deprecatedAliases: { #FASTTypescriptType_alias_declaration } - - + + + ^ type_parameters +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAliasDeclaration >> type_parameters: anObject [ + + + + type_parameters := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAliasDeclaration >> value [ + "Relation named: #value type: #FASTTExpression opposite: #typeAliasDeclarationValueOwner" + + + + + ^ self attributeAt: #value ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAliasDeclaration >> value: anObject [ + + + + (self attributeAt: #value ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self value. + self attributeAt: #value put: anObject. + otherSide typeAliasDeclarationValueOwner: nil ] + ifNotNil: [ + self attributeAt: #value put: anObject. + anObject typeAliasDeclarationValueOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeAnnotation.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypeAnnotation.class.st index 6696344..c5f7437 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypeAnnotation.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypeAnnotation.class.st @@ -11,36 +11,72 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| | `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `catchClauseTypeOwner` | `FASTTypeScriptTypeAnnotation` | `type` | `FASTTypeScriptCatchClause` | | | `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructSignatureTypeOwner` | `FASTTypeScriptTypeAnnotation` | `type` | `FASTTypeScriptConstructSignature` | | +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | | `exportSpecifierAliasOwner` | `FASTTypeScriptTOptionalField` | `alias` | `FASTTypeScriptExportSpecifier` | My owner| +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionDeclarationReturnTypeOwner` | `FASTTypeScriptTReturnType` | `return_type` | `FASTTypeScriptFunctionDeclaration` | My owner| | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| -| `indexSignatureTypeOwner` | `FASTTypeScriptTypeAnnotation` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `methodDefinitionReturnTypeOwner` | `FASTTypeScriptTOptionalField` | `return_type` | `FASTTypeScriptMethodDefinition` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| | `optionalParameterTypeOwner` | `FASTTypeScriptTypeAnnotation` | `type` | `FASTTypeScriptOptionalParameter` | The owner of this type annotation| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parenthesizedExpressionTypeOwner` | `FASTTypeScriptTypeAnnotation` | `type` | `FASTTypeScriptParenthesizedExpression` | | +| `propertySignatureTypeOwner` | `FASTTypeScriptTypeAnnotation` | `type` | `FASTTypeScriptPropertySignature` | | +| `publicFieldDefinitionTypeOwner` | `FASTTypeScriptTypeAnnotation` | `type` | `FASTTypeScriptPublicFieldDefinition` | | +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | | `requiredParameterTypeOwner` | `FASTTypeScriptTOptionalField` | `type` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorTypeOwner` | `FASTTypeScriptTypeAnnotation` | `type` | `FASTTypeScriptVariableDeclarator` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptTypeAnnotation` | `typeAnnotationOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -58,8 +94,14 @@ Class { #traits : 'FASTTExpression + FASTTypeScriptTOptionalField + FASTTypeScriptTReturnType', #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTOptionalField classTrait + FASTTypeScriptTReturnType classTrait', #instVars : [ - '#indexSignatureTypeOwner => FMOne type: #FASTTypeScriptIndexSignature opposite: #type', - '#optionalParameterTypeOwner => FMOne type: #FASTTypeScriptOptionalParameter opposite: #type' + '#catchClauseTypeOwner => FMOne type: #FASTTypeScriptCatchClause opposite: #type', + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #typeAnnotationOwner', + '#constructSignatureTypeOwner => FMOne type: #FASTTypeScriptConstructSignature opposite: #type', + '#optionalParameterTypeOwner => FMOne type: #FASTTypeScriptOptionalParameter opposite: #type', + '#parenthesizedExpressionTypeOwner => FMOne type: #FASTTypeScriptParenthesizedExpression opposite: #type', + '#propertySignatureTypeOwner => FMOne type: #FASTTypeScriptPropertySignature opposite: #type', + '#publicFieldDefinitionTypeOwner => FMOne type: #FASTTypeScriptPublicFieldDefinition opposite: #type', + '#variableDeclaratorTypeOwner => FMOne type: #FASTTypeScriptVariableDeclarator opposite: #type' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -69,49 +111,72 @@ Class { { #category : 'meta' } FASTTypeScriptTypeAnnotation class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTypeAnnotation class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> catchClauseTypeOwner [ + "Relation named: #catchClauseTypeOwner type: #FASTTypeScriptCatchClause opposite: #type" - self deprecatedAliases: { #FASTTypescriptType_annotation } - - + + + + + ^ catchClauseTypeOwner ] { #category : 'accessing' } -FASTTypeScriptTypeAnnotation >> indexSignatureTypeOwner [ - "Relation named: #indexSignatureTypeOwner type: #FASTTypeScriptIndexSignature opposite: #type" +FASTTypeScriptTypeAnnotation >> catchClauseTypeOwner: anObject [ + - - - - ^ indexSignatureTypeOwner + catchClauseTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #typeAnnotationOwner" + + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> childrenNode: anObject [ + + + + childrenNode := anObject ] { #category : 'accessing' } -FASTTypeScriptTypeAnnotation >> indexSignatureTypeOwner: anObject [ +FASTTypeScriptTypeAnnotation >> constructSignatureTypeOwner [ + "Relation named: #constructSignatureTypeOwner type: #FASTTypeScriptConstructSignature opposite: #type" + - indexSignatureTypeOwner := anObject + + + ^ constructSignatureTypeOwner ] -{ #category : 'navigation' } -FASTTypeScriptTypeAnnotation >> indexSignatureTypeOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> constructSignatureTypeOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self indexSignatureTypeOwner + constructSignatureTypeOwner := anObject ] { #category : 'accessing' } FASTTypeScriptTypeAnnotation >> optionalParameterTypeOwner [ "Relation named: #optionalParameterTypeOwner type: #FASTTypeScriptOptionalParameter opposite: #type" + @@ -122,13 +187,83 @@ FASTTypeScriptTypeAnnotation >> optionalParameterTypeOwner [ { #category : 'accessing' } FASTTypeScriptTypeAnnotation >> optionalParameterTypeOwner: anObject [ + optionalParameterTypeOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptTypeAnnotation >> optionalParameterTypeOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> parenthesizedExpressionTypeOwner [ + "Relation named: #parenthesizedExpressionTypeOwner type: #FASTTypeScriptParenthesizedExpression opposite: #type" + + + + + + ^ parenthesizedExpressionTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> parenthesizedExpressionTypeOwner: anObject [ + + + + parenthesizedExpressionTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> propertySignatureTypeOwner [ + "Relation named: #propertySignatureTypeOwner type: #FASTTypeScriptPropertySignature opposite: #type" + + + + + + ^ propertySignatureTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> propertySignatureTypeOwner: anObject [ + + + + propertySignatureTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> publicFieldDefinitionTypeOwner [ + "Relation named: #publicFieldDefinitionTypeOwner type: #FASTTypeScriptPublicFieldDefinition opposite: #type" + + + + + + ^ publicFieldDefinitionTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> publicFieldDefinitionTypeOwner: anObject [ + + + + publicFieldDefinitionTypeOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> variableDeclaratorTypeOwner [ + "Relation named: #variableDeclaratorTypeOwner type: #FASTTypeScriptVariableDeclarator opposite: #type" + + + + + + ^ variableDeclaratorTypeOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAnnotation >> variableDeclaratorTypeOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self optionalParameterTypeOwner + variableDeclaratorTypeOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeArguments.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypeArguments.class.st index a7d404f..876dbdf 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypeArguments.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypeArguments.class.st @@ -11,36 +11,69 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| | `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `callExpressionTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | `type_arguments` | `FASTTypeScriptCallExpression` | | | `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | | `exportSpecifierAliasOwner` | `FASTTypeScriptTOptionalField` | `alias` | `FASTTypeScriptExportSpecifier` | My owner| +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| | `extendsClauseTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | `type_arguments` | `FASTTypeScriptExtendsClause` | My owner| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| | `genericTypeTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | `type_arguments` | `FASTTypeScriptGenericType` | The owner of this type arguments| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `instantiationExpressionTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | `type_arguments` | `FASTTypeScriptInstantiationExpression` | | +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `methodDefinitionReturnTypeOwner` | `FASTTypeScriptTOptionalField` | `return_type` | `FASTTypeScriptMethodDefinition` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| | `newExpressionTypeArgumentsOwner` | `FASTTypeScriptTypeArguments` | `type_arguments` | `FASTTypeScriptNewExpression` | The owner of these type arguments| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | | `requiredParameterTypeOwner` | `FASTTypeScriptTOptionalField` | `type` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptTypeArguments` | `typeArgumentsOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -58,8 +91,11 @@ Class { #traits : 'FASTTExpression + FASTTypeScriptTOptionalField', #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTOptionalField classTrait', #instVars : [ + '#callExpressionTypeArgumentsOwner => FMOne type: #FASTTypeScriptCallExpression opposite: #type_arguments', + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #typeArgumentsOwner', '#extendsClauseTypeArgumentsOwner => FMOne type: #FASTTypeScriptExtendsClause opposite: #type_arguments', '#genericTypeTypeArgumentsOwner => FMOne type: #FASTTypeScriptGenericType opposite: #type_arguments', + '#instantiationExpressionTypeArgumentsOwner => FMOne type: #FASTTypeScriptInstantiationExpression opposite: #type_arguments', '#newExpressionTypeArgumentsOwner => FMOne type: #FASTTypeScriptNewExpression opposite: #type_arguments' ], #category : 'FAST-TypeScript-Model-Entities', @@ -70,49 +106,81 @@ Class { { #category : 'meta' } FASTTypeScriptTypeArguments class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTypeArguments class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptTypeArguments >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeArguments >> callExpressionTypeArgumentsOwner [ + "Relation named: #callExpressionTypeArgumentsOwner type: #FASTTypeScriptCallExpression opposite: #type_arguments" + + + + + + ^ callExpressionTypeArgumentsOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeArguments >> callExpressionTypeArgumentsOwner: anObject [ - self deprecatedAliases: { #FASTTypescriptType_arguments } - - + + + callExpressionTypeArgumentsOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeArguments >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #typeArgumentsOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptTypeArguments >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] { #category : 'accessing' } FASTTypeScriptTypeArguments >> extendsClauseTypeArgumentsOwner [ "Relation named: #extendsClauseTypeArgumentsOwner type: #FASTTypeScriptExtendsClause opposite: #type_arguments" + - ^ extendsClauseTypeArgumentsOwner ] { #category : 'accessing' } FASTTypeScriptTypeArguments >> extendsClauseTypeArgumentsOwner: anObject [ + extendsClauseTypeArgumentsOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptTypeArguments >> extendsClauseTypeArgumentsOwnerGroup [ - - - ^ MooseSpecializedGroup with: self extendsClauseTypeArgumentsOwner -] - { #category : 'accessing' } FASTTypeScriptTypeArguments >> genericTypeTypeArgumentsOwner [ "Relation named: #genericTypeTypeArgumentsOwner type: #FASTTypeScriptGenericType opposite: #type_arguments" + @@ -123,21 +191,35 @@ FASTTypeScriptTypeArguments >> genericTypeTypeArgumentsOwner [ { #category : 'accessing' } FASTTypeScriptTypeArguments >> genericTypeTypeArgumentsOwner: anObject [ + genericTypeTypeArgumentsOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptTypeArguments >> genericTypeTypeArgumentsOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptTypeArguments >> instantiationExpressionTypeArgumentsOwner [ + "Relation named: #instantiationExpressionTypeArgumentsOwner type: #FASTTypeScriptInstantiationExpression opposite: #type_arguments" + + - - ^ MooseSpecializedGroup with: self genericTypeTypeArgumentsOwner + + + ^ instantiationExpressionTypeArgumentsOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeArguments >> instantiationExpressionTypeArgumentsOwner: anObject [ + + + + instantiationExpressionTypeArgumentsOwner := anObject ] { #category : 'accessing' } FASTTypeScriptTypeArguments >> newExpressionTypeArgumentsOwner [ "Relation named: #newExpressionTypeArgumentsOwner type: #FASTTypeScriptNewExpression opposite: #type_arguments" + @@ -148,13 +230,7 @@ FASTTypeScriptTypeArguments >> newExpressionTypeArgumentsOwner [ { #category : 'accessing' } FASTTypeScriptTypeArguments >> newExpressionTypeArgumentsOwner: anObject [ + newExpressionTypeArgumentsOwner := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptTypeArguments >> newExpressionTypeArgumentsOwnerGroup [ - - - ^ MooseSpecializedGroup with: self newExpressionTypeArgumentsOwner -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeAssertion.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypeAssertion.class.st index 306a5ba..497a3ea 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypeAssertion.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypeAssertion.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptTypeAssertion` | `typeAssertionOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -51,6 +82,9 @@ Class { #superclass : 'FASTTypeScriptEntity', #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #typeAssertionOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +93,34 @@ Class { { #category : 'meta' } FASTTypeScriptTypeAssertion class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTypeAssertion class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptTypeAssertion >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAssertion >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #typeAssertionOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptTypeAssertion >> childrenNodes: anObject [ - self deprecatedAliases: { #FASTTypescriptType_assertion } - - + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeIdentifier.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypeIdentifier.class.st index 906ced4..63ac600 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypeIdentifier.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypeIdentifier.class.st @@ -11,36 +11,63 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| | `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| | `classDeclarationNameOwner` | `FASTTypeScriptTypeIdentifier` | `name` | `FASTTypeScriptClassDeclaration` | My owner| +| `classNameOwner` | `FASTTypeScriptTypeIdentifier` | `name` | `FASTTypeScriptClass` | | | `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| -| `constructorTypeTypeOwner` | `FASTTypeScriptTypeIdentifier` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `extendsTypeClauseTypeOwner` | `FASTTypeScriptTypeIdentifier` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| -| `genericTypeNameOwner` | `FASTTypeScriptTypeIdentifier` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| -| `indexSignatureIndexTypeOwner` | `FASTTypeScriptTypeIdentifier` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| | `interfaceDeclarationNameOwner` | `FASTTypeScriptTypeIdentifier` | `name` | `FASTTypeScriptInterfaceDeclaration` | My owner| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseNameOwner` | `FASTTypeScriptTypeIdentifier` | `name` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `nestedTypeIdentifierNameOwner` | `FASTTypeScriptTypeIdentifier` | `name` | `FASTTypeScriptNestedTypeIdentifier` | | | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationNameOwner` | `FASTTypeScriptTypeIdentifier` | `name` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typeParameterNameOwner` | `FASTTypeScriptTypeIdentifier` | `name` | `FASTTypeScriptTypeParameter` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -55,15 +82,16 @@ Class { #name : 'FASTTypeScriptTypeIdentifier', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', #instVars : [ '#classDeclarationNameOwner => FMOne type: #FASTTypeScriptClassDeclaration opposite: #name', - '#constructorTypeTypeOwner => FMOne type: #FASTTypeScriptConstructorType opposite: #type', - '#extendsTypeClauseTypeOwner => FMOne type: #FASTTypeScriptExtendsTypeClause opposite: #type', - '#genericTypeNameOwner => FMOne type: #FASTTypeScriptGenericType opposite: #name', - '#indexSignatureIndexTypeOwner => FMOne type: #FASTTypeScriptIndexSignature opposite: #index_type', - '#interfaceDeclarationNameOwner => FMOne type: #FASTTypeScriptInterfaceDeclaration opposite: #name' + '#classNameOwner => FMOne type: #FASTTypeScriptClass opposite: #name', + '#interfaceDeclarationNameOwner => FMOne type: #FASTTypeScriptInterfaceDeclaration opposite: #name', + '#mappedTypeClauseNameOwner => FMOne type: #FASTTypeScriptMappedTypeClause opposite: #name', + '#nestedTypeIdentifierNameOwner => FMOne type: #FASTTypeScriptNestedTypeIdentifier opposite: #name', + '#typeAliasDeclarationNameOwner => FMOne type: #FASTTypeScriptTypeAliasDeclaration opposite: #name', + '#typeParameterNameOwner => FMOne type: #FASTTypeScriptTypeParameter opposite: #name' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -73,24 +101,17 @@ Class { { #category : 'meta' } FASTTypeScriptTypeIdentifier class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptTypeIdentifier class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptType_identifier } - - ] { #category : 'accessing' } FASTTypeScriptTypeIdentifier >> classDeclarationNameOwner [ "Relation named: #classDeclarationNameOwner type: #FASTTypeScriptClassDeclaration opposite: #name" + @@ -101,138 +122,122 @@ FASTTypeScriptTypeIdentifier >> classDeclarationNameOwner [ { #category : 'accessing' } FASTTypeScriptTypeIdentifier >> classDeclarationNameOwner: anObject [ + classDeclarationNameOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptTypeIdentifier >> classDeclarationNameOwnerGroup [ - - - ^ MooseSpecializedGroup with: self classDeclarationNameOwner -] - { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> constructorTypeTypeOwner [ - "Relation named: #constructorTypeTypeOwner type: #FASTTypeScriptConstructorType opposite: #type" +FASTTypeScriptTypeIdentifier >> classNameOwner [ + "Relation named: #classNameOwner type: #FASTTypeScriptClass opposite: #name" + - - ^ constructorTypeTypeOwner + ^ classNameOwner ] { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> constructorTypeTypeOwner: anObject [ +FASTTypeScriptTypeIdentifier >> classNameOwner: anObject [ + - constructorTypeTypeOwner := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptTypeIdentifier >> constructorTypeTypeOwnerGroup [ - - - ^ MooseSpecializedGroup with: self constructorTypeTypeOwner + classNameOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> extendsTypeClauseTypeOwner [ - "Relation named: #extendsTypeClauseTypeOwner type: #FASTTypeScriptExtendsTypeClause opposite: #type" +FASTTypeScriptTypeIdentifier >> interfaceDeclarationNameOwner [ + "Relation named: #interfaceDeclarationNameOwner type: #FASTTypeScriptInterfaceDeclaration opposite: #name" + - + - ^ extendsTypeClauseTypeOwner + ^ interfaceDeclarationNameOwner ] { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> extendsTypeClauseTypeOwner: anObject [ - - - extendsTypeClauseTypeOwner := anObject -] +FASTTypeScriptTypeIdentifier >> interfaceDeclarationNameOwner: anObject [ -{ #category : 'navigation' } -FASTTypeScriptTypeIdentifier >> extendsTypeClauseTypeOwnerGroup [ + - - ^ MooseSpecializedGroup with: self extendsTypeClauseTypeOwner + interfaceDeclarationNameOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> genericTypeNameOwner [ - "Relation named: #genericTypeNameOwner type: #FASTTypeScriptGenericType opposite: #name" +FASTTypeScriptTypeIdentifier >> mappedTypeClauseNameOwner [ + "Relation named: #mappedTypeClauseNameOwner type: #FASTTypeScriptMappedTypeClause opposite: #name" + - - ^ genericTypeNameOwner + ^ mappedTypeClauseNameOwner ] { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> genericTypeNameOwner: anObject [ +FASTTypeScriptTypeIdentifier >> mappedTypeClauseNameOwner: anObject [ + - genericTypeNameOwner := anObject -] - -{ #category : 'navigation' } -FASTTypeScriptTypeIdentifier >> genericTypeNameOwnerGroup [ - - - ^ MooseSpecializedGroup with: self genericTypeNameOwner + mappedTypeClauseNameOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> indexSignatureIndexTypeOwner [ - "Relation named: #indexSignatureIndexTypeOwner type: #FASTTypeScriptIndexSignature opposite: #index_type" +FASTTypeScriptTypeIdentifier >> nestedTypeIdentifierNameOwner [ + "Relation named: #nestedTypeIdentifierNameOwner type: #FASTTypeScriptNestedTypeIdentifier opposite: #name" + - - ^ indexSignatureIndexTypeOwner + ^ nestedTypeIdentifierNameOwner ] { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> indexSignatureIndexTypeOwner: anObject [ +FASTTypeScriptTypeIdentifier >> nestedTypeIdentifierNameOwner: anObject [ + - indexSignatureIndexTypeOwner := anObject + nestedTypeIdentifierNameOwner := anObject ] -{ #category : 'navigation' } -FASTTypeScriptTypeIdentifier >> indexSignatureIndexTypeOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptTypeIdentifier >> typeAliasDeclarationNameOwner [ + "Relation named: #typeAliasDeclarationNameOwner type: #FASTTypeScriptTypeAliasDeclaration opposite: #name" + + - - ^ MooseSpecializedGroup with: self indexSignatureIndexTypeOwner + + + ^ typeAliasDeclarationNameOwner ] { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> interfaceDeclarationNameOwner [ - "Relation named: #interfaceDeclarationNameOwner type: #FASTTypeScriptInterfaceDeclaration opposite: #name" +FASTTypeScriptTypeIdentifier >> typeAliasDeclarationNameOwner: anObject [ + - - - - ^ interfaceDeclarationNameOwner + typeAliasDeclarationNameOwner := anObject ] { #category : 'accessing' } -FASTTypeScriptTypeIdentifier >> interfaceDeclarationNameOwner: anObject [ +FASTTypeScriptTypeIdentifier >> typeParameterNameOwner [ + "Relation named: #typeParameterNameOwner type: #FASTTypeScriptTypeParameter opposite: #name" + - interfaceDeclarationNameOwner := anObject + + + ^ typeParameterNameOwner ] -{ #category : 'navigation' } -FASTTypeScriptTypeIdentifier >> interfaceDeclarationNameOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptTypeIdentifier >> typeParameterNameOwner: anObject [ + + - - ^ MooseSpecializedGroup with: self interfaceDeclarationNameOwner + typeParameterNameOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeParameter.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypeParameter.class.st index c09f528..f56c2f9 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypeParameter.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypeParameter.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,54 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `constraint` | `FASTTypeScriptTypeParameter` | `typeParameterConstraintOwner` | `FASTTypeScriptConstraint` | | +| `name` | `FASTTypeScriptTypeParameter` | `typeParameterNameOwner` | `FASTTypeScriptTypeIdentifier` | | +| `value` | `FASTTypeScriptTypeParameter` | `typeParameterValueOwner` | `FASTTypeScriptDefaultType` | | ## Properties @@ -51,6 +84,11 @@ Class { #superclass : 'FASTTypeScriptEntity', #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#constraint => FMOne type: #FASTTypeScriptConstraint opposite: #typeParameterConstraintOwner', + '#name => FMOne type: #FASTTypeScriptTypeIdentifier opposite: #typeParameterNameOwner', + '#value => FMOne type: #FASTTypeScriptDefaultType opposite: #typeParameterValueOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +97,59 @@ Class { { #category : 'meta' } FASTTypeScriptTypeParameter class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTypeParameter class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptTypeParameter >> constraint [ + "Relation named: #constraint type: #FASTTypeScriptConstraint opposite: #typeParameterConstraintOwner" + + + + ^ constraint +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameter >> constraint: anObject [ + + + + constraint := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameter >> name [ + "Relation named: #name type: #FASTTypeScriptTypeIdentifier opposite: #typeParameterNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameter >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameter >> value [ + "Relation named: #value type: #FASTTypeScriptDefaultType opposite: #typeParameterValueOwner" + + + + ^ value +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameter >> value: anObject [ - self deprecatedAliases: { #FASTTypescriptType_parameter } - - + + + value := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeParameters.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypeParameters.class.st index e008a80..7f3f836 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypeParameters.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypeParameters.class.st @@ -5,36 +5,84 @@ ### Parents | Relation | Origin | Opposite | Type | Comment | |---| +| `abstractMethodSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptAbstractMethodSignature` | | | `argumentOwner` | `FASTTExpression` | `arguments` | `FASTTWithArguments` | my owner| | `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| | `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `arrowFunctionTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptArrowFunction` | | | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| | `binaryExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptBinaryExpression` | My Owner| +| `callSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptCallSignature` | | +| `classDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptClassDeclaration` | | +| `classTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptClass` | | | `conditionalTypeAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptConditionalType` | Alternative owner| | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptConstructSignature` | | +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `constructorTypeTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptConstructorType` | | +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | +| `functionDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptFunctionDeclaration` | | +| `functionExpressionTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptFunctionExpression` | | +| `functionSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptFunctionSignature` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `functionTypeTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptFunctionType` | | +| `generatorFunctionDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptGeneratorFunctionDeclaration` | | +| `generatorFunctionTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptGeneratorFunction` | | +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `interfaceDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptInterfaceDeclaration` | | +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| +| `methodDefinitionTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptMethodDefinition` | | +| `methodSignatureTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptMethodSignature` | | | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationTypeParametersOwner` | `FASTTypeScriptTypeParameters` | `type_parameters` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptTypeParameters` | `typeParametersOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -51,6 +99,26 @@ Class { #superclass : 'FASTTypeScriptEntity', #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#abstractMethodSignatureTypeParametersOwner => FMOne type: #FASTTypeScriptAbstractMethodSignature opposite: #type_parameters', + '#arrowFunctionTypeParametersOwner => FMOne type: #FASTTypeScriptArrowFunction opposite: #type_parameters', + '#callSignatureTypeParametersOwner => FMOne type: #FASTTypeScriptCallSignature opposite: #type_parameters', + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #typeParametersOwner', + '#classDeclarationTypeParametersOwner => FMOne type: #FASTTypeScriptClassDeclaration opposite: #type_parameters', + '#classTypeParametersOwner => FMOne type: #FASTTypeScriptClass opposite: #type_parameters', + '#constructSignatureTypeParametersOwner => FMOne type: #FASTTypeScriptConstructSignature opposite: #type_parameters', + '#constructorTypeTypeParametersOwner => FMOne type: #FASTTypeScriptConstructorType opposite: #type_parameters', + '#functionDeclarationTypeParametersOwner => FMOne type: #FASTTypeScriptFunctionDeclaration opposite: #type_parameters', + '#functionExpressionTypeParametersOwner => FMOne type: #FASTTypeScriptFunctionExpression opposite: #type_parameters', + '#functionSignatureTypeParametersOwner => FMOne type: #FASTTypeScriptFunctionSignature opposite: #type_parameters', + '#functionTypeTypeParametersOwner => FMOne type: #FASTTypeScriptFunctionType opposite: #type_parameters', + '#generatorFunctionDeclarationTypeParametersOwner => FMOne type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #type_parameters', + '#generatorFunctionTypeParametersOwner => FMOne type: #FASTTypeScriptGeneratorFunction opposite: #type_parameters', + '#interfaceDeclarationTypeParametersOwner => FMOne type: #FASTTypeScriptInterfaceDeclaration opposite: #type_parameters', + '#methodDefinitionTypeParametersOwner => FMOne type: #FASTTypeScriptMethodDefinition opposite: #type_parameters', + '#methodSignatureTypeParametersOwner => FMOne type: #FASTTypeScriptMethodSignature opposite: #type_parameters', + '#typeAliasDeclarationTypeParametersOwner => FMOne type: #FASTTypeScriptTypeAliasDeclaration opposite: #type_parameters' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,15 +127,357 @@ Class { { #category : 'meta' } FASTTypeScriptTypeParameters class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTypeParameters class >> initialize [ - self deprecatedAliases: { #FASTTypescriptType_parameters } - - +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> abstractMethodSignatureTypeParametersOwner [ + "Relation named: #abstractMethodSignatureTypeParametersOwner type: #FASTTypeScriptAbstractMethodSignature opposite: #type_parameters" + + + + + + ^ abstractMethodSignatureTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> abstractMethodSignatureTypeParametersOwner: anObject [ + + + + abstractMethodSignatureTypeParametersOwner := anObject +] + +{ #category : 'adding' } +FASTTypeScriptTypeParameters >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> arrowFunctionTypeParametersOwner [ + "Relation named: #arrowFunctionTypeParametersOwner type: #FASTTypeScriptArrowFunction opposite: #type_parameters" + + + + + + ^ arrowFunctionTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> arrowFunctionTypeParametersOwner: anObject [ + + + + arrowFunctionTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> callSignatureTypeParametersOwner [ + "Relation named: #callSignatureTypeParametersOwner type: #FASTTypeScriptCallSignature opposite: #type_parameters" + + + + + + ^ callSignatureTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> callSignatureTypeParametersOwner: anObject [ + + + + callSignatureTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #typeParametersOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> childrenNodes: anObject [ + + + + childrenNodes value: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> classDeclarationTypeParametersOwner [ + "Relation named: #classDeclarationTypeParametersOwner type: #FASTTypeScriptClassDeclaration opposite: #type_parameters" + + + + + + ^ classDeclarationTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> classDeclarationTypeParametersOwner: anObject [ + + + + classDeclarationTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> classTypeParametersOwner [ + "Relation named: #classTypeParametersOwner type: #FASTTypeScriptClass opposite: #type_parameters" + + + + + + ^ classTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> classTypeParametersOwner: anObject [ + + + + classTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> constructSignatureTypeParametersOwner [ + "Relation named: #constructSignatureTypeParametersOwner type: #FASTTypeScriptConstructSignature opposite: #type_parameters" + + + + + + ^ constructSignatureTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> constructSignatureTypeParametersOwner: anObject [ + + + + constructSignatureTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> constructorTypeTypeParametersOwner [ + "Relation named: #constructorTypeTypeParametersOwner type: #FASTTypeScriptConstructorType opposite: #type_parameters" + + + + + + ^ constructorTypeTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> constructorTypeTypeParametersOwner: anObject [ + + + + constructorTypeTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> functionDeclarationTypeParametersOwner [ + "Relation named: #functionDeclarationTypeParametersOwner type: #FASTTypeScriptFunctionDeclaration opposite: #type_parameters" + + + + + + ^ functionDeclarationTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> functionDeclarationTypeParametersOwner: anObject [ + + + + functionDeclarationTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> functionExpressionTypeParametersOwner [ + "Relation named: #functionExpressionTypeParametersOwner type: #FASTTypeScriptFunctionExpression opposite: #type_parameters" + + + + + + ^ functionExpressionTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> functionExpressionTypeParametersOwner: anObject [ + + + + functionExpressionTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> functionSignatureTypeParametersOwner [ + "Relation named: #functionSignatureTypeParametersOwner type: #FASTTypeScriptFunctionSignature opposite: #type_parameters" + + + + + + ^ functionSignatureTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> functionSignatureTypeParametersOwner: anObject [ + + + + functionSignatureTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> functionTypeTypeParametersOwner [ + "Relation named: #functionTypeTypeParametersOwner type: #FASTTypeScriptFunctionType opposite: #type_parameters" + + + + + + ^ functionTypeTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> functionTypeTypeParametersOwner: anObject [ + + + + functionTypeTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> generatorFunctionDeclarationTypeParametersOwner [ + "Relation named: #generatorFunctionDeclarationTypeParametersOwner type: #FASTTypeScriptGeneratorFunctionDeclaration opposite: #type_parameters" + + + + + + ^ generatorFunctionDeclarationTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> generatorFunctionDeclarationTypeParametersOwner: anObject [ + + + + generatorFunctionDeclarationTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> generatorFunctionTypeParametersOwner [ + "Relation named: #generatorFunctionTypeParametersOwner type: #FASTTypeScriptGeneratorFunction opposite: #type_parameters" + + + + + + ^ generatorFunctionTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> generatorFunctionTypeParametersOwner: anObject [ + + + + generatorFunctionTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> interfaceDeclarationTypeParametersOwner [ + "Relation named: #interfaceDeclarationTypeParametersOwner type: #FASTTypeScriptInterfaceDeclaration opposite: #type_parameters" + + + + + + ^ interfaceDeclarationTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> interfaceDeclarationTypeParametersOwner: anObject [ + + + + interfaceDeclarationTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> methodDefinitionTypeParametersOwner [ + "Relation named: #methodDefinitionTypeParametersOwner type: #FASTTypeScriptMethodDefinition opposite: #type_parameters" + + + + + + ^ methodDefinitionTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> methodDefinitionTypeParametersOwner: anObject [ + + + + methodDefinitionTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> methodSignatureTypeParametersOwner [ + "Relation named: #methodSignatureTypeParametersOwner type: #FASTTypeScriptMethodSignature opposite: #type_parameters" + + + + + + ^ methodSignatureTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> methodSignatureTypeParametersOwner: anObject [ + + + + methodSignatureTypeParametersOwner := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> typeAliasDeclarationTypeParametersOwner [ + "Relation named: #typeAliasDeclarationTypeParametersOwner type: #FASTTypeScriptTypeAliasDeclaration opposite: #type_parameters" + + + + + + ^ typeAliasDeclarationTypeParametersOwner +] + +{ #category : 'accessing' } +FASTTypeScriptTypeParameters >> typeAliasDeclarationTypeParametersOwner: anObject [ + + + + typeAliasDeclarationTypeParametersOwner := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypePredicate.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypePredicate.class.st index ecd0b3b..1134206 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypePredicate.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypePredicate.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,53 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `name` | `FASTTypeScriptTypePredicate` | `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | | +| `type` | `FASTTypeScriptTypePredicate` | `typePredicateTypeOwner` | `FASTTExpression` | | ## Properties @@ -51,6 +83,9 @@ Class { #superclass : 'FASTTypeScriptEntity', #traits : 'FASTTExpression', #classTraits : 'FASTTExpression classTrait', + #instVars : [ + '#name => FMOne type: #FASTTypeScriptTPrimaryExpression opposite: #typePredicateNameOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,16 +94,50 @@ Class { { #category : 'meta' } FASTTypeScriptTypePredicate class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTypePredicate class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptTypePredicate >> name [ + "Relation named: #name type: #FASTTypeScriptTPrimaryExpression opposite: #typePredicateNameOwner" + + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptTypePredicate >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptTypePredicate >> type [ + "Relation named: #type type: #FASTTExpression opposite: #typePredicateTypeOwner" + + + + + ^ self attributeAt: #type ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptTypePredicate >> type: anObject [ - self deprecatedAliases: { #FASTTypescriptType_predicate } - - + + + (self attributeAt: #type ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self type. + self attributeAt: #type put: anObject. + otherSide typePredicateTypeOwner: nil ] + ifNotNil: [ + self attributeAt: #type put: anObject. + anObject typePredicateTypeOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypePredicateAnnotation.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypePredicateAnnotation.class.st index aea798e..cddc815 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypePredicateAnnotation.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypePredicateAnnotation.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,47 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -59,17 +85,8 @@ Class { { #category : 'meta' } FASTTypeScriptTypePredicateAnnotation class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptTypePredicateAnnotation class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptType_predicate_annotation } - - - ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeQuery.class.st b/FAST-TypeScript-Model/FASTTypeScriptTypeQuery.class.st index 621cdc6..361f396 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptTypeQuery.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptTypeQuery.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptTypeQuery` | `typeQueryOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +80,11 @@ Class { #name : 'FASTTypeScriptTypeQuery', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #typeQueryOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,17 +93,25 @@ Class { { #category : 'meta' } FASTTypeScriptTypeQuery class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptTypeQuery class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptTypeQuery >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #typeQueryOwner" - self deprecatedAliases: { #FASTTypescriptType_query } + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptTypeQuery >> childrenNode: anObject [ - - + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptUnaryExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptUnaryExpression.class.st index 00e8d1a..3954029 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptUnaryExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptUnaryExpression.class.st @@ -6,6 +6,7 @@ | Relation | Origin | Opposite | Type | Comment | |---| | `argument` | `FASTTypeScriptUnaryExpression` | `unaryExpressionArgumentOwner` | `FASTTExpression` | My argument| +| `operator` | `FASTTypeScriptUnaryExpression` | `unaryExpressionOperatorOwner` | `FASTTypeScriptEntity` | | @@ -13,6 +14,9 @@ Class { #name : 'FASTTypeScriptUnaryExpression', #superclass : 'FASTTypeScriptExpression', + #instVars : [ + '#operator => FMOne type: #FASTTypeScriptEntity opposite: #unaryExpressionOperatorOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -21,24 +25,17 @@ Class { { #category : 'meta' } FASTTypeScriptUnaryExpression class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptUnaryExpression class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptUnary_expression } - - ] { #category : 'accessing' } FASTTypeScriptUnaryExpression >> argument [ "Relation named: #argument type: #FASTTExpression opposite: #unaryExpressionArgumentOwner" + @@ -48,6 +45,7 @@ FASTTypeScriptUnaryExpression >> argument [ { #category : 'accessing' } FASTTypeScriptUnaryExpression >> argument: anObject [ + (self attributeAt: #argument ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | @@ -59,9 +57,19 @@ FASTTypeScriptUnaryExpression >> argument: anObject [ anObject unaryExpressionArgumentOwner: self ] ] -{ #category : 'navigation' } -FASTTypeScriptUnaryExpression >> argumentGroup [ +{ #category : 'accessing' } +FASTTypeScriptUnaryExpression >> operator [ + "Relation named: #operator type: #FASTTypeScriptEntity opposite: #unaryExpressionOperatorOwner" + + + + ^ operator +] + +{ #category : 'accessing' } +FASTTypeScriptUnaryExpression >> operator: anObject [ + + - - ^ MooseSpecializedGroup with: self argument + operator := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptUndefined.class.st b/FAST-TypeScript-Model/FASTTypeScriptUndefined.class.st index 0eb0b56..1d280f5 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptUndefined.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptUndefined.class.st @@ -11,6 +11,8 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternLeftOwner` | `FASTTypeScriptTPattern` | `left` | `FASTTypeScriptAssignmentPattern` | | +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +21,49 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `importSpecifierNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptImportSpecifier` | | +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateNameOwner` | `FASTTypeScriptTPrimaryExpression` | `name` | `FASTTypeScriptTypePredicate` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | ## Properties @@ -49,8 +78,8 @@ Class { #name : 'FASTTypeScriptUndefined', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTypeScriptTPattern + FASTTypeScriptTPrimaryExpression', + #classTraits : 'FASTTypeScriptTPattern classTrait + FASTTypeScriptTPrimaryExpression classTrait', #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,14 +88,8 @@ Class { { #category : 'meta' } FASTTypeScriptUndefined class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptUndefined class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptUndefined } ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptUnionType.class.st b/FAST-TypeScript-Model/FASTTypeScriptUnionType.class.st index ca20270..c73e845 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptUnionType.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptUnionType.class.st @@ -11,6 +11,7 @@ | `assignedIn` | `FASTTExpression` | `expression` | `FASTTAssignment` | Optional assignment where this expression is used| | `assignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAssignmentExpression` | The expression parent| | `assignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentExpression` | The expression parent| +| `assignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAssignmentPattern` | | | `augmentedAssignmentExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptAugmentedAssignmentExpression` | The left operand (if possible)| | `augmentedAssignmentExpressionRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptAugmentedAssignmentExpression` | The right operand (if possible)| | `binaryExpressionLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptBinaryExpression` | My Owner| @@ -19,22 +20,52 @@ | `conditionalTypeConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptConditionalType` | Consequence owner| | `conditionalTypeLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptConditionalType` | The left operand (if possible)| | `conditionalTypeRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptConditionalType` | The right operand (if possible)| +| `constructorTypeTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptConstructorType` | The owner of this type identifier| +| `enumAssignmentValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptEnumAssignment` | | +| `exportStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExportStatement` | | | `expressionStatementOwner` | `FASTTExpression` | `expression` | `FASTTExpressionStatement` | The expression statement that own me (if it's the case| -| `forStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| -| `forStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `extendsClauseValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptExtendsClause` | | +| `extendsTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptExtendsTypeClause` | The owner of this type identifier| +| `forInStatementLeftOwner` | `FASTTExpression` | `left` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptForInStatement` | My owner| +| `forInStatementValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptForInStatement` | | | `functionTypeReturnTypeOwner` | `FASTTExpression` | `return_type` | `FASTTypeScriptFunctionType` | The owner of this type| +| `genericTypeNameOwner` | `FASTTExpression` | `name` | `FASTTypeScriptGenericType` | The owner of this type identifier| +| `indexSignatureIndexTypeOwner` | `FASTTExpression` | `index_type` | `FASTTypeScriptIndexSignature` | The owner of this index type| +| `indexSignatureTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptIndexSignature` | The owner of this type| +| `mappedTypeClauseAliasOwner` | `FASTTExpression` | `alias` | `FASTTypeScriptMappedTypeClause` | | +| `mappedTypeClauseTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptMappedTypeClause` | | | `memberExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptMemberExpression` | This owner| | `memberExpressionPropertyOwner` | `FASTTExpression` | `property` | `FASTTypeScriptMemberExpression` | My owner| | `newExpressionConstructorOwner` | `FASTTExpression` | `constructor` | `FASTTypeScriptNewExpression` | The owner of this constructor| -| `parentConditionalStatement` | `FASTTExpression` | `condition` | `FASTTConditionalStatement` | Optional condition statement where this expression is used| +| `objectAssignmentPatternRightOwner` | `FASTTExpression` | `right` | `FASTTypeScriptObjectAssignmentPattern` | | +| `optionalParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptOptionalParameter` | The owner of this identifier| +| `optionalParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptOptionalParameter` | | +| `pairValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPair` | | +| `parentConditional` | `FASTTExpression` | `condition` | `FASTTWithCondition` | Optional condition statement/expression where this expression is used| | `parentExpression` | `FASTTExpression` | `expression` | `FASTTUnaryExpression` | Parent (unary) expression| | `parentExpressionLeft` | `FASTTExpression` | `leftOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am left side| | `parentExpressionRight` | `FASTTExpression` | `rightOperand` | `FASTTBinaryExpression` | Parent (binary) expression of which I am right side| | `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `publicFieldDefinitionValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptPublicFieldDefinition` | | +| `requiredParameterPatternOwner` | `FASTTExpression` | `pattern` | `FASTTypeScriptRequiredParameter` | | +| `requiredParameterValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptRequiredParameter` | | | `returnOwner` | `FASTTExpression` | `expression` | `FASTTReturnStatement` | The return statement that own the expression (if it's the case)| | `subscriptExpressionIndexOwner` | `FASTTExpression` | `index` | `FASTTypeScriptSubscriptExpression` | My owner| | `subscriptExpressionObjectOwner` | `FASTTExpression` | `object` | `FASTTypeScriptSubscriptExpression` | My owner| +| `ternaryExpressionAlternativeOwner` | `FASTTExpression` | `alternative` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConditionOwner` | `FASTTExpression` | `condition` | `FASTTypeScriptTernaryExpression` | | +| `ternaryExpressionConsequenceOwner` | `FASTTExpression` | `consequence` | `FASTTypeScriptTernaryExpression` | | +| `typeAliasDeclarationValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptTypeAliasDeclaration` | | +| `typePredicateTypeOwner` | `FASTTExpression` | `type` | `FASTTypeScriptTypePredicate` | | | `unaryExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUnaryExpression` | The owner of this class| +| `updateExpressionArgumentOwner` | `FASTTExpression` | `argument` | `FASTTypeScriptUpdateExpression` | | +| `variableDeclaratorValueOwner` | `FASTTExpression` | `value` | `FASTTypeScriptVariableDeclarator` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptUnionType` | `unionTypeOwner` | `FASTTypeScriptEntity` | | ## Properties @@ -49,8 +80,11 @@ Class { #name : 'FASTTypeScriptUnionType', #superclass : 'FASTTypeScriptEntity', - #traits : 'FASTTExpression', - #classTraits : 'FASTTExpression classTrait', + #traits : 'FASTTExpression + FASTTypeScriptTPrimaryType', + #classTraits : 'FASTTExpression classTrait + FASTTypeScriptTPrimaryType classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #unionTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -59,17 +93,34 @@ Class { { #category : 'meta' } FASTTypeScriptUnionType class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptUnionType class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptUnionType >> addChildrenNode: anObject [ + + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptUnionType >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #unionTypeOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptUnionType >> childrenNodes: anObject [ - self deprecatedAliases: { #FASTTypescriptUnion_type } - - - + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptUpdateExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptUpdateExpression.class.st index cc00b95..516431e 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptUpdateExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptUpdateExpression.class.st @@ -2,10 +2,11 @@ ## Relations ====================== -### Parents +### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `forIncrementOwner` | `FASTTypeScriptUpdateExpression` | `increment` | `FASTTypeScriptForStatement` | | +| `argument` | `FASTTypeScriptUpdateExpression` | `updateExpressionArgumentOwner` | `FASTTExpression` | | +| `operator` | `FASTTypeScriptUpdateExpression` | `updateExpressionOperatorOwner` | `FASTTypeScriptEntity` | | @@ -14,7 +15,7 @@ Class { #name : 'FASTTypeScriptUpdateExpression', #superclass : 'FASTTypeScriptExpression', #instVars : [ - '#forIncrementOwner => FMOne type: #FASTTypeScriptForStatement opposite: #increment' + '#operator => FMOne type: #FASTTypeScriptEntity opposite: #updateExpressionOperatorOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -24,40 +25,50 @@ Class { { #category : 'meta' } FASTTypeScriptUpdateExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptUpdateExpression class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptUpdateExpression >> argument [ + "Relation named: #argument type: #FASTTExpression opposite: #updateExpressionArgumentOwner" - self deprecatedAliases: { #FASTTypescriptUpdate_expression } - - + + + + ^ self attributeAt: #argument ifAbsent: [ nil ] ] { #category : 'accessing' } -FASTTypeScriptUpdateExpression >> forIncrementOwner [ - "Relation named: #forIncrementOwner type: #FASTTypeScriptForStatement opposite: #increment" +FASTTypeScriptUpdateExpression >> argument: anObject [ + - - - ^ forIncrementOwner + (self attributeAt: #argument ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self argument. + self attributeAt: #argument put: anObject. + otherSide updateExpressionArgumentOwner: nil ] + ifNotNil: [ + self attributeAt: #argument put: anObject. + anObject updateExpressionArgumentOwner: self ] ] { #category : 'accessing' } -FASTTypeScriptUpdateExpression >> forIncrementOwner: anObject [ +FASTTypeScriptUpdateExpression >> operator [ + "Relation named: #operator type: #FASTTypeScriptEntity opposite: #updateExpressionOperatorOwner" + - forIncrementOwner := anObject + ^ operator ] -{ #category : 'navigation' } -FASTTypeScriptUpdateExpression >> forIncrementOwnerGroup [ +{ #category : 'accessing' } +FASTTypeScriptUpdateExpression >> operator: anObject [ + + - - ^ MooseSpecializedGroup with: self forIncrementOwner + operator := anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptVariableDeclaration.class.st b/FAST-TypeScript-Model/FASTTypeScriptVariableDeclaration.class.st index aa7c18b..2fa4fd1 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptVariableDeclaration.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptVariableDeclaration.class.st @@ -1,6 +1,47 @@ +" +## Relations +====================== + +### Parents +| Relation | Origin | Opposite | Type | Comment | +|---| +| `argumentsOwner` | `FASTTEntity` | `argumentsList` | `FASTTypeScriptArguments` | The arguments node that owns me| +| `arrowFunctionBodyOwner` | `FASTTEntity` | `body` | `FASTTypeScriptArrowFunction` | My owner| +| `doStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptDoStatement` | | +| `exportStatementDeclarationOwner` | `FASTTypeScriptTDeclaration` | `declaration` | `FASTTypeScriptExportStatement` | | +| `forStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptForStatement` | | +| `labeledStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptLabeledStatement` | | +| `parentFormalParameters` | `FASTTEntity` | `parameters` | `FASTTypeScriptFormalParameters` | My owner| +| `parentLoopStatement` | `FASTTStatement` | `body` | `FASTTLoopStatement` | Optional loop of which this statement is the body| +| `statementContainer` | `FASTTStatement` | `statements` | `FASTTStatementBlock` | Block containing this statement.| +| `switchCaseBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchCase` | | +| `switchDefaultBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptSwitchDefault` | | +| `tWithDeclarationsDeclarationsOwner` | `FASTTypeScriptTDeclaration` | `declarations` | `FASTTypeScriptTWithDeclarations` | The element that declares me| +| `whileStatementBodyOwner` | `FASTTStatement` | `body` | `FASTTypeScriptWhileStatement` | | + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNodes` | `FASTTypeScriptVariableDeclaration` | `variableDeclarationOwner` | `FASTTypeScriptEntity` | | + + +## Properties +====================== + +| Name | Type | Default value | Comment | +|---| +| `endPos` | `Number` | nil | | +| `startPos` | `Number` | nil | | + +" Class { #name : 'FASTTypeScriptVariableDeclaration', #superclass : 'FASTTypeScriptEntity', + #traits : 'FASTTypeScriptTDeclaration', + #classTraits : 'FASTTypeScriptTDeclaration classTrait', + #instVars : [ + '#childrenNodes => FMMany type: #FASTTypeScriptEntity opposite: #variableDeclarationOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +50,34 @@ Class { { #category : 'meta' } FASTTypeScriptVariableDeclaration class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptVariableDeclaration class >> initialize [ +{ #category : 'adding' } +FASTTypeScriptVariableDeclaration >> addChildrenNode: anObject [ - self deprecatedAliases: { #FASTTypescriptVariable_declaration } - - + + + ^ self childrenNodes add: anObject +] + +{ #category : 'accessing' } +FASTTypeScriptVariableDeclaration >> childrenNodes [ + "Relation named: #childrenNodes type: #FASTTypeScriptEntity opposite: #variableDeclarationOwner" + + + + + ^ childrenNodes +] + +{ #category : 'accessing' } +FASTTypeScriptVariableDeclaration >> childrenNodes: anObject [ + + + + childrenNodes value: anObject ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptVariableDeclarator.class.st b/FAST-TypeScript-Model/FASTTypeScriptVariableDeclarator.class.st index bc3b60a..3500e84 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptVariableDeclarator.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptVariableDeclarator.class.st @@ -5,8 +5,9 @@ ### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `name` | `FASTTypeScriptVariableDeclarator` | `variableDeclaratorNameOwner` | `FASTTypeScriptIdentifier` | The identifier| -| `value` | `FASTTypeScriptVariableDeclarator` | `variableDeclaratorValueOwner` | `FASTTExpression` | The value| +| `name` | `FASTTypeScriptVariableDeclarator` | `variableDeclaratorNameOwner` | `FASTTypeScriptEntity` | | +| `type` | `FASTTypeScriptVariableDeclarator` | `variableDeclaratorTypeOwner` | `FASTTypeScriptTypeAnnotation` | | +| `value` | `FASTTypeScriptVariableDeclarator` | `variableDeclaratorValueOwner` | `FASTTExpression` | | @@ -14,6 +15,10 @@ Class { #name : 'FASTTypeScriptVariableDeclarator', #superclass : 'FASTTypeScriptEntity', + #instVars : [ + '#name => FMOne type: #FASTTypeScriptEntity opposite: #variableDeclaratorNameOwner', + '#type => FMOne type: #FASTTypeScriptTypeAnnotation opposite: #variableDeclaratorTypeOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -22,16 +27,67 @@ Class { { #category : 'meta' } FASTTypeScriptVariableDeclarator class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptVariableDeclarator class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptVariableDeclarator >> name [ + "Relation named: #name type: #FASTTypeScriptEntity opposite: #variableDeclaratorNameOwner" - self deprecatedAliases: { #FASTTypescriptVariable_declarator } - - + + + ^ name +] + +{ #category : 'accessing' } +FASTTypeScriptVariableDeclarator >> name: anObject [ + + + + name := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptVariableDeclarator >> type [ + "Relation named: #type type: #FASTTypeScriptTypeAnnotation opposite: #variableDeclaratorTypeOwner" + + + + ^ type +] + +{ #category : 'accessing' } +FASTTypeScriptVariableDeclarator >> type: anObject [ + + + + type := anObject +] + +{ #category : 'accessing' } +FASTTypeScriptVariableDeclarator >> value [ + "Relation named: #value type: #FASTTExpression opposite: #variableDeclaratorValueOwner" + + + + + ^ self attributeAt: #value ifAbsent: [ nil ] +] + +{ #category : 'accessing' } +FASTTypeScriptVariableDeclarator >> value: anObject [ + + + + (self attributeAt: #value ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. + anObject ifNil: [ | otherSide | + otherSide := self value. + self attributeAt: #value put: anObject. + otherSide variableDeclaratorValueOwner: nil ] + ifNotNil: [ + self attributeAt: #value put: anObject. + anObject variableDeclaratorValueOwner: self ] ] diff --git a/FAST-TypeScript-Model/FASTTypeScriptWhileStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptWhileStatement.class.st index 4c37b2d..09647f1 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptWhileStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptWhileStatement.class.st @@ -5,8 +5,8 @@ ### Children | Relation | Origin | Opposite | Type | Comment | |---| -| `body` | `FASTTypeScriptWhileStatement` | `whileBodyOwner` | `FASTTStatement` | | -| `condition` | `FASTTypeScriptWhileStatement` | `whileConditionOwner` | `FASTTypeScriptParenthesizedExpression` | | +| `body` | `FASTTypeScriptWhileStatement` | `whileStatementBodyOwner` | `FASTTStatement` | | +| `condition` | `FASTTypeScriptWhileStatement` | `whileStatementConditionOwner` | `FASTTypeScriptParenthesizedExpression` | | @@ -15,7 +15,7 @@ Class { #name : 'FASTTypeScriptWhileStatement', #superclass : 'FASTTypeScriptStatement', #instVars : [ - '#condition => FMOne type: #FASTTypeScriptParenthesizedExpression opposite: #whileConditionOwner' + '#condition => FMOne type: #FASTTypeScriptParenthesizedExpression opposite: #whileStatementConditionOwner' ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', @@ -25,54 +25,42 @@ Class { { #category : 'meta' } FASTTypeScriptWhileStatement class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptWhileStatement class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptWhile_statement } - - ] { #category : 'accessing' } FASTTypeScriptWhileStatement >> body [ - "Relation named: #body type: #FASTTStatement opposite: #whileBodyOwner" + "Relation named: #body type: #FASTTStatement opposite: #whileStatementBodyOwner" + - + ^ self attributeAt: #body ifAbsent: [ nil ] ] { #category : 'accessing' } FASTTypeScriptWhileStatement >> body: anObject [ + (self attributeAt: #body ifAbsentPut: [nil]) == anObject ifTrue: [ ^ anObject ]. anObject ifNil: [ | otherSide | otherSide := self body. self attributeAt: #body put: anObject. - otherSide whileBodyOwner: nil ] + otherSide whileStatementBodyOwner: nil ] ifNotNil: [ self attributeAt: #body put: anObject. - anObject whileBodyOwner: self ] -] - -{ #category : 'navigation' } -FASTTypeScriptWhileStatement >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body + anObject whileStatementBodyOwner: self ] ] { #category : 'accessing' } FASTTypeScriptWhileStatement >> condition [ - "Relation named: #condition type: #FASTTypeScriptParenthesizedExpression opposite: #whileConditionOwner" + "Relation named: #condition type: #FASTTypeScriptParenthesizedExpression opposite: #whileStatementConditionOwner" + ^ condition ] @@ -80,13 +68,7 @@ FASTTypeScriptWhileStatement >> condition [ { #category : 'accessing' } FASTTypeScriptWhileStatement >> condition: anObject [ + condition := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptWhileStatement >> conditionGroup [ - - - ^ MooseSpecializedGroup with: self condition -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptWithStatement.class.st b/FAST-TypeScript-Model/FASTTypeScriptWithStatement.class.st index a11d410..f5ae5d3 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptWithStatement.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptWithStatement.class.st @@ -26,24 +26,17 @@ Class { { #category : 'meta' } FASTTypeScriptWithStatement class >> annotation [ + - ^ self -] - -{ #category : 'class initialization' } -FASTTypeScriptWithStatement class >> initialize [ - - self deprecatedAliases: { #FASTTypescriptWith_statement } - - ] { #category : 'accessing' } FASTTypeScriptWithStatement >> body [ "Relation named: #body type: #FASTTypeScriptStatementBlock opposite: #withStatementBodyOwner" + ^ body @@ -52,21 +45,16 @@ FASTTypeScriptWithStatement >> body [ { #category : 'accessing' } FASTTypeScriptWithStatement >> body: anObject [ + body := anObject ] -{ #category : 'navigation' } -FASTTypeScriptWithStatement >> bodyGroup [ - - - ^ MooseSpecializedGroup with: self body -] - { #category : 'accessing' } FASTTypeScriptWithStatement >> object [ "Relation named: #object type: #FASTTypeScriptParenthesizedExpression opposite: #withStatementObjectOwner" + ^ object @@ -75,13 +63,7 @@ FASTTypeScriptWithStatement >> object [ { #category : 'accessing' } FASTTypeScriptWithStatement >> object: anObject [ + object := anObject ] - -{ #category : 'navigation' } -FASTTypeScriptWithStatement >> objectGroup [ - - - ^ MooseSpecializedGroup with: self object -] diff --git a/FAST-TypeScript-Model/FASTTypeScriptYieldExpression.class.st b/FAST-TypeScript-Model/FASTTypeScriptYieldExpression.class.st index 0452b35..50db719 100644 --- a/FAST-TypeScript-Model/FASTTypeScriptYieldExpression.class.st +++ b/FAST-TypeScript-Model/FASTTypeScriptYieldExpression.class.st @@ -1,6 +1,21 @@ +" +## Relations +====================== + +### Children +| Relation | Origin | Opposite | Type | Comment | +|---| +| `childrenNode` | `FASTTypeScriptYieldExpression` | `yieldExpressionOwner` | `FASTTypeScriptEntity` | | + + + +" Class { #name : 'FASTTypeScriptYieldExpression', #superclass : 'FASTTypeScriptExpression', + #instVars : [ + '#childrenNode => FMOne type: #FASTTypeScriptEntity opposite: #yieldExpressionOwner' + ], #category : 'FAST-TypeScript-Model-Entities', #package : 'FAST-TypeScript-Model', #tag : 'Entities' @@ -9,16 +24,25 @@ Class { { #category : 'meta' } FASTTypeScriptYieldExpression class >> annotation [ + - ^ self ] -{ #category : 'class initialization' } -FASTTypeScriptYieldExpression class >> initialize [ +{ #category : 'accessing' } +FASTTypeScriptYieldExpression >> childrenNode [ + "Relation named: #childrenNode type: #FASTTypeScriptEntity opposite: #yieldExpressionOwner" - self deprecatedAliases: { #FASTTypescriptYield_expression } - - + + + ^ childrenNode +] + +{ #category : 'accessing' } +FASTTypeScriptYieldExpression >> childrenNode: anObject [ + + + + childrenNode := anObject ] diff --git a/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st b/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st new file mode 100644 index 0000000..4436694 --- /dev/null +++ b/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st @@ -0,0 +1,12 @@ +Class { + #name : 'FASTTypeScriptImporter', + #superclass : 'TSFASTAbstractImporter', + #category : 'FAST-TypeScript-Tools', + #package : 'FAST-TypeScript-Tools' +} + +{ #category : 'accessing' } +FASTTypeScriptImporter >> tsLanguage [ + + ^ TSLanguage typescript +] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptAbstractMethodSignature.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptAbstractMethodSignature.extension.st deleted file mode 100644 index b8a0d3a..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptAbstractMethodSignature.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptAbstractMethodSignature' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptAbstractMethodSignature >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptAbstractMethodSignature: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptAccessibilityModifier.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptAccessibilityModifier.extension.st deleted file mode 100644 index 460ad1b..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptAccessibilityModifier.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptAccessibilityModifier' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptAccessibilityModifier >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptAccessibilityModifier: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptAmbientDeclaration.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptAmbientDeclaration.extension.st deleted file mode 100644 index 6dbca4d..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptAmbientDeclaration.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptAmbientDeclaration' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptAmbientDeclaration >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptAmbientDeclaration: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptArguments.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptArguments.extension.st deleted file mode 100644 index 160ae91..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptArguments.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptArguments' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptArguments >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptArguments: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptArray.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptArray.extension.st deleted file mode 100644 index 9c7cf29..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptArray.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptArray' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptArray >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptArray: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptArrowFunction.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptArrowFunction.extension.st deleted file mode 100644 index 2530899..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptArrowFunction.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptArrowFunction' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptArrowFunction >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptArrowFunction: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptAssertsAnnotation.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptAssertsAnnotation.extension.st deleted file mode 100644 index beba043..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptAssertsAnnotation.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptAssertsAnnotation' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptAssertsAnnotation >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptAssertsAnnotation: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptAssignmentExpression.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptAssignmentExpression.extension.st deleted file mode 100644 index 4fb8602..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptAssignmentExpression.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : 'FASTTypeScriptAssignmentExpression' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptAssignmentExpression >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptAssignmentExpression: - self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptCatchClause.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptCatchClause.extension.st deleted file mode 100644 index 6a18270..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptCatchClause.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptCatchClause' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptCatchClause >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptCatchClause: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptClassBody.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptClassBody.extension.st deleted file mode 100644 index b33f3f6..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptClassBody.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptClassBody' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptClassBody >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptClassBody: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptClassDeclaration.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptClassDeclaration.extension.st deleted file mode 100644 index c01c733..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptClassDeclaration.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptClassDeclaration' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptClassDeclaration >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptClassDeclaration: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptClassStaticBlock.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptClassStaticBlock.extension.st deleted file mode 100644 index 1d372f9..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptClassStaticBlock.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptClassStaticBlock' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptClassStaticBlock >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptClassStaticBlock: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptCompilationUnit.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptCompilationUnit.extension.st deleted file mode 100644 index 1084625..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptCompilationUnit.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptCompilationUnit' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptCompilationUnit >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptCompilationUnit: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptDecorator.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptDecorator.extension.st deleted file mode 100644 index 956f680..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptDecorator.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptDecorator' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptDecorator >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptDecorator: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptElseClause.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptElseClause.extension.st deleted file mode 100644 index ce74697..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptElseClause.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptElseClause' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptElseClause >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptElseClause: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptEnumAssignment.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptEnumAssignment.extension.st deleted file mode 100644 index b56804d..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptEnumAssignment.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptEnumAssignment' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptEnumAssignment >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptEnumAssignment: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptEnumBody.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptEnumBody.extension.st deleted file mode 100644 index 2f0ed40..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptEnumBody.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptEnumBody' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptEnumBody >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptEnumAssignment: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptEnumDeclaration.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptEnumDeclaration.extension.st deleted file mode 100644 index a83d2f8..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptEnumDeclaration.extension.st +++ /dev/null @@ -1,8 +0,0 @@ -Extension { #name : 'FASTTypeScriptEnumDeclaration' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptEnumDeclaration >> accept: aFASTTypeScriptVisitor [ - - ^ aFASTTypeScriptVisitor visitFASTTypeScriptEnumDeclaration: self - -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptExistentialType.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptExistentialType.extension.st deleted file mode 100644 index 91fcd9f..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptExistentialType.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptExistentialType' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptExistentialType >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptExistentialType: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptExtendsClause.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptExtendsClause.extension.st deleted file mode 100644 index fa435bc..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptExtendsClause.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptExtendsClause' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptExtendsClause >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptExtendsClause: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptExtendsTypeClause.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptExtendsTypeClause.extension.st deleted file mode 100644 index 59a1da3..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptExtendsTypeClause.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptExtendsTypeClause' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptExtendsTypeClause >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptExtendsTypeClause: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptFinallyClause.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptFinallyClause.extension.st deleted file mode 100644 index 0386593..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptFinallyClause.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptFinallyClause' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptFinallyClause >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptFinallyClause: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptFormalParameters.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptFormalParameters.extension.st deleted file mode 100644 index 3de4277..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptFormalParameters.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptFormalParameters' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptFormalParameters >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptFormalParameters: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptFunctionDeclaration.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptFunctionDeclaration.extension.st deleted file mode 100644 index b2da02f..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptFunctionDeclaration.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : 'FASTTypeScriptFunctionDeclaration' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptFunctionDeclaration >> accept: aFASTTypeScriptVisitor [ - - ^ aFASTTypeScriptVisitor visitFASTTypeScriptFunctionDeclaration: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptFunctionSignature.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptFunctionSignature.extension.st deleted file mode 100644 index 7410e4d..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptFunctionSignature.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptFunctionSignature' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptFunctionSignature >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptFunctionSignature: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptImplementsClause.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptImplementsClause.extension.st deleted file mode 100644 index 23c94d6..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptImplementsClause.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptImplementsClause' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptImplementsClause >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptImplementsClause: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptMethodDefinition.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptMethodDefinition.extension.st deleted file mode 100644 index c3f2736..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptMethodDefinition.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptMethodDefinition' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptMethodDefinition >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptMethodDefinition: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptMethodSignature.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptMethodSignature.extension.st deleted file mode 100644 index 144824d..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptMethodSignature.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : 'FASTTypeScriptMethodSignature' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptMethodSignature >> accept: aFASTTypeScriptVisitor [ - - ^ aFASTTypeScriptVisitor visitFASTTypeScriptMethodSignature: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptPredefinedType.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptPredefinedType.extension.st deleted file mode 100644 index 1768a7d..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptPredefinedType.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptPredefinedType' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptPredefinedType >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptPredefinedType: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptPropertyIdentifier.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptPropertyIdentifier.extension.st deleted file mode 100644 index a91d080..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptPropertyIdentifier.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptPropertyIdentifier' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptPropertyIdentifier >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptPropertyIdentifier: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptPublicFieldDefinition.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptPublicFieldDefinition.extension.st deleted file mode 100644 index 2efcdb1..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptPublicFieldDefinition.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptPublicFieldDefinition' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptPublicFieldDefinition >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptPublicFieldDefinition: self -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptTypeAnnotation.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptTypeAnnotation.extension.st deleted file mode 100644 index b81566c..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptTypeAnnotation.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'FASTTypeScriptTypeAnnotation' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptTypeAnnotation >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptTypeAnnotation: self. -] diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptTypeIdentifier.extension.st b/FAST-TypeScript-Visitor/FASTTypeScriptTypeIdentifier.extension.st deleted file mode 100644 index c48143a..0000000 --- a/FAST-TypeScript-Visitor/FASTTypeScriptTypeIdentifier.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : 'FASTTypeScriptTypeIdentifier' } - -{ #category : '*FAST-TypeScript-Visitor' } -FASTTypeScriptTypeIdentifier >> accept: aFASTTypeScriptVisitor [ - ^ aFASTTypeScriptVisitor visitFASTTypeScriptTypeIdentifier: self - -] From 50cfd628f2faba34d3d2e4903d882c64922f06df Mon Sep 17 00:00:00 2001 From: mohaTlg Date: Sun, 27 Sep 2026 14:17:20 +0200 Subject: [PATCH 02/10] parser changed for generated tests --- .../FASTTypeScriptImporterTest.class.st | 830 +++++++++--------- .../FASTTypeScriptImporter.class.st | 64 ++ 2 files changed, 498 insertions(+), 396 deletions(-) diff --git a/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st b/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st index 77f696e..32f9316 100644 --- a/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st +++ b/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st @@ -1,10 +1,24 @@ Class { #name : 'FASTTypeScriptImporterTest', #superclass : 'TSFASTAbstractImporterTest', + #instVars : [ + 'parser' + ], #category : 'FAST-TypeScript-Model-Tests', #package : 'FAST-TypeScript-Model-Tests' } +{ #category : 'running' } +FASTTypeScriptImporterTest >> setUp [ + + super setUp. +] + +{ #category : 'running' } +FASTTypeScriptImporterTest >> tearDown [ + super tearDown +] + { #category : 'tests' } FASTTypeScriptImporterTest >> testGeneratedAbstract [ @@ -425,10 +439,10 @@ abstract class Foo { self assert: self topEntity sourceCode equals: 'console.log("roaming the earth...");'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'console.log("roaming the earth...")'. self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). @@ -439,10 +453,10 @@ abstract class Foo { self assert: self topEntity sourceCode equals: '("roaming the earth...")'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: '"roaming the earth..."'. self assert: (self topEntity isOfType: FASTTypeScriptString). self assert: (self topEntity isOfType: FASTTLiteral). @@ -612,10 +626,10 @@ FASTTypeScriptImporterTest >> testGeneratedAccessibilityModifiersAsPairKeywords self assert: self topEntity sourceCode equals: 'x = { name, description, private: private_ };'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'x = { name, description, private: private_ }'. self assert: (self topEntity isOfType: FASTTypeScriptAssignmentExpression). @@ -1026,10 +1040,10 @@ declare module Foo { self assert: self topEntity sourceCode equals: '(greeting: string)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'greeting: string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -1153,10 +1167,10 @@ declare module Foo { self assert: self topEntity sourceCode equals: '(s: string)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 's: string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -1482,10 +1496,10 @@ declare module Foo { self assert: self topEntity sourceCode equals: '(greeting: string)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'greeting: string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -1912,10 +1926,10 @@ declare module Foo { self assert: self topEntity sourceCode equals: '1;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '1'. self assert: (self topEntity isOfType: FASTTypeScriptNumber). self assert: (self topEntity isOfType: FASTTLiteral). @@ -2256,10 +2270,10 @@ FASTTypeScriptImporterTest >> testGeneratedAmbientExportFunctionDeclarations [ self assert: self topEntity sourceCode equals: '(iter: Iterable.Keyed)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'iter: Iterable.Keyed'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -2560,10 +2574,10 @@ export async function readFile(filename: string): Promise;' withPlatform self assert: self topEntity sourceCode equals: '(x: number, y: number)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 2. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 2. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'x: number'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -2592,7 +2606,7 @@ export async function readFile(filename: string): Promise;' withPlatform stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'y: number'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -2684,10 +2698,10 @@ export async function readFile(filename: string): Promise;' withPlatform self assert: self topEntity sourceCode equals: '(filename: string)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'filename: string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -2905,10 +2919,10 @@ declare module "example" { };' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(value?: Thenable)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'value?: Thenable'. self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). @@ -3711,10 +3725,10 @@ function foo(): () => { [key: foo]: bar } {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(bar)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'bar'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -3748,10 +3762,10 @@ function foo(): () => { [key: foo]: bar } {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(bar)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'bar'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -3801,10 +3815,10 @@ function foo(): () => { [key: foo]: bar } {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(bar)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'bar'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -4107,10 +4121,10 @@ function foo() self assert: self topEntity sourceCode equals: 'foo();'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'foo()'. self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). @@ -4320,10 +4334,10 @@ FASTTypeScriptImporterTest >> testGeneratedArrayWithEmptyElements [ self assert: self topEntity sourceCode equals: '[, a, , b, , , , s, , , ];'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '[, a, , b, , , , s, , , ]'. self assert: (self topEntity isOfType: FASTTypeScriptArray). @@ -4471,10 +4485,10 @@ function* foo(amount, interestRate, duration): number { self assert: self topEntity sourceCode equals: '(amount, interestRate, duration): number => 2'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '(amount, interestRate, duration): number => 2'. self assert: (self topEntity isOfType: FASTTypeScriptArrowFunction). @@ -4494,10 +4508,10 @@ function* foo(amount, interestRate, duration): number { self assert: self topEntity sourceCode equals: '(amount, interestRate, duration)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 3. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 3. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'amount'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -4510,7 +4524,7 @@ function* foo(amount, interestRate, duration): number { stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'interestRate'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -4523,7 +4537,7 @@ function* foo(amount, interestRate, duration): number { stack pop. stack pop. - stack push: (stack top genericChildren at: 3). + stack push: (stack top parameters at: 3). self assert: self topEntity sourceCode equals: 'duration'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -4601,10 +4615,10 @@ function* foo(amount, interestRate, duration): number { self assert: self topEntity sourceCode equals: 'yield amount * interestRate * duration / 12'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'yield amount * interestRate * duration / 12'. self assert: (self topEntity isOfType: FASTTypeScriptYieldExpression). @@ -4683,10 +4697,10 @@ function* foo(amount, interestRate, duration): number { self assert: self topEntity sourceCode equals: '(amount, interestRate, duration)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 3. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 3. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'amount'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -4699,7 +4713,7 @@ function* foo(amount, interestRate, duration): number { stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'interestRate'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -4712,7 +4726,7 @@ function* foo(amount, interestRate, duration): number { stack pop. stack pop. - stack push: (stack top genericChildren at: 3). + stack push: (stack top parameters at: 3). self assert: self topEntity sourceCode equals: 'duration'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -4771,10 +4785,10 @@ function* foo(amount, interestRate, duration): number { self assert: self topEntity sourceCode equals: '(module: any): number => 2;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '(module: any): number => 2'. self assert: (self topEntity isOfType: FASTTypeScriptArrowFunction). @@ -4794,10 +4808,10 @@ function* foo(amount, interestRate, duration): number { self assert: self topEntity sourceCode equals: '(module: any)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'module: any'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -4890,10 +4904,10 @@ T as {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'h as `hello`'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'h as `hello`'. self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). @@ -4924,10 +4938,10 @@ T as {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'T as {} & { [t: T]: T }'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'T as {} & { [t: T]: T }'. self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). @@ -5003,10 +5017,10 @@ T as {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'T as {} & { [t: T]: T } & { [g: G]: G };'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'T as {} & { [t: T]: T } & { [g: G]: G }'. self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). @@ -5223,10 +5237,10 @@ function isT(t: T): t is T { self assert: self topEntity sourceCode equals: '(x: any)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'x: any'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -5459,10 +5473,10 @@ function isT(t: T): t is T { self assert: self topEntity sourceCode equals: '(t: T)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 't: T'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -5601,10 +5615,10 @@ FASTTypeScriptImporterTest >> testGeneratedAssertionFunctionsCheckingAValue [ self assert: self topEntity sourceCode equals: '(x: any)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'x: any'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -5703,10 +5717,10 @@ foo! += bar; self assert: self topEntity sourceCode equals: 'foo! = bar;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'foo! = bar'. self assert: (self topEntity isOfType: FASTTypeScriptAssignmentExpression). @@ -5740,10 +5754,10 @@ foo! += bar; self assert: self topEntity sourceCode equals: 'foo! += bar;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'foo! += bar'. self assert: (self topEntity isOfType: FASTTypeScriptAugmentedAssignmentExpression). @@ -5777,10 +5791,10 @@ foo! += bar; self assert: self topEntity sourceCode equals: '(foo)! = bar;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '(foo)! = bar'. self assert: (self topEntity isOfType: FASTTypeScriptAssignmentExpression). @@ -5822,10 +5836,10 @@ foo! += bar; self assert: self topEntity sourceCode equals: '(foo)! += bar;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '(foo)! += bar'. self assert: (self topEntity isOfType: FASTTypeScriptAugmentedAssignmentExpression). @@ -5950,10 +5964,10 @@ f self assert: self topEntity sourceCode equals: '''a'';'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '''a'''. self assert: (self topEntity isOfType: FASTTypeScriptString). self assert: (self topEntity isOfType: FASTTLiteral). @@ -5973,10 +5987,10 @@ f self assert: self topEntity sourceCode equals: '''b'';'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '''b'''. self assert: (self topEntity isOfType: FASTTypeScriptString). self assert: (self topEntity isOfType: FASTTLiteral). @@ -6054,10 +6068,10 @@ f self assert: self topEntity sourceCode equals: '''a'''. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '''a'''. self assert: (self topEntity isOfType: FASTTypeScriptString). self assert: (self topEntity isOfType: FASTTLiteral). @@ -6077,10 +6091,10 @@ f self assert: self topEntity sourceCode equals: '''b'''. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '''b'''. self assert: (self topEntity isOfType: FASTTypeScriptString). self assert: (self topEntity isOfType: FASTTLiteral). @@ -6607,10 +6621,10 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithDecorators [ self assert: self topEntity sourceCode equals: '(grue)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'grue'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -6796,10 +6810,10 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithDecorators [ self assert: self topEntity sourceCode equals: '(@required param: any, @optional param2?: any)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 2. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 2. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: '@required param: any'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -6844,7 +6858,7 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithDecorators [ stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: '@optional param2?: any'. self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). @@ -7026,10 +7040,10 @@ export class A extends B implements C {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(D)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'D'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -7071,10 +7085,10 @@ export class A extends B implements C {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(D)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'D'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -7176,10 +7190,10 @@ export class A extends B implements C {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(D)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'D'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -7221,10 +7235,10 @@ export class A extends B implements C {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(D)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'D'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -7336,10 +7350,10 @@ export class A extends B implements C {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(D)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'D'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -7381,10 +7395,10 @@ export class A extends B implements C {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(D)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'D'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -7502,10 +7516,10 @@ export class A extends B implements C {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(D)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'D'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -7547,10 +7561,10 @@ export class A extends B implements C {};' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(D)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'D'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -8023,10 +8037,10 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodSignatures [ self assert: self topEntity sourceCode equals: '(func: () => T | Promise, accept?: (result: T) => boolean | Promise, timeoutMessage?: string, retryCount?: number)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 4. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 4. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'func: () => T | Promise'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -8129,7 +8143,7 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodSignatures [ stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'accept?: (result: T) => boolean | Promise'. self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). @@ -8162,10 +8176,10 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodSignatures [ self assert: self topEntity sourceCode equals: '(result: T)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'result: T'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -8243,7 +8257,7 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodSignatures [ stack pop. stack pop. - stack push: (stack top genericChildren at: 3). + stack push: (stack top parameters at: 3). self assert: self topEntity sourceCode equals: 'timeoutMessage?: string'. self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). @@ -8272,7 +8286,7 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodSignatures [ stack pop. stack pop. - stack push: (stack top genericChildren at: 4). + stack push: (stack top parameters at: 4). self assert: self topEntity sourceCode equals: 'retryCount?: number'. self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). @@ -8632,10 +8646,10 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodsWithAndWithoutTrail self assert: self topEntity sourceCode equals: '(a)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'a'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -8693,10 +8707,10 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodsWithAndWithoutTrail self assert: self topEntity sourceCode equals: '(b)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'b'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -8754,10 +8768,10 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithMethodsWithAndWithoutTrail self assert: self topEntity sourceCode equals: '(c)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'c'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -9296,10 +9310,10 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithStaticBlocks [ self assert: self topEntity sourceCode equals: 'this.#bar = '''';'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'this.#bar = '''''. self assert: (self topEntity isOfType: FASTTypeScriptAssignmentExpression). @@ -9363,10 +9377,10 @@ FASTTypeScriptImporterTest >> testGeneratedClassesWithStaticBlocks [ self assert: self topEntity sourceCode equals: 'this.baz();'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'this.baz()'. self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). @@ -9712,10 +9726,10 @@ type T = T extends { x: infer X extends number } ? X : never;;' withPlatformL self assert: self topEntity sourceCode equals: '(t: T)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 't: T'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -9808,10 +9822,10 @@ type T = T extends { x: infer X extends number } ? X : never;;' withPlatformL self assert: self topEntity sourceCode equals: '(t: T)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 't: T'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -9961,10 +9975,10 @@ type T = T extends { x: infer X extends number } ? X : never;;' withPlatformL self assert: self topEntity sourceCode equals: '(t: T)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 't: T'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -10046,10 +10060,10 @@ type T = T extends { x: infer X extends number } ? X : never;;' withPlatformL self assert: self topEntity sourceCode equals: '(t: T)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 't: T'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -10694,10 +10708,10 @@ FASTTypeScriptImporterTest >> testGeneratedConstructorTypes [ self assert: self topEntity sourceCode equals: '( p1, p2 )'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 2. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 2. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'p1'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -10710,7 +10724,7 @@ FASTTypeScriptImporterTest >> testGeneratedConstructorTypes [ stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'p2'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -11160,10 +11174,10 @@ enum Style { self assert: self topEntity sourceCode equals: '(Math.random() * 1000)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'Math.random() * 1000'. self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). @@ -12102,10 +12116,10 @@ type Foo any> = T;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(...args: any)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: '...args: any'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -12219,10 +12233,10 @@ type Foo any> = T;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(...args: any)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: '...args: any'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -14192,10 +14206,10 @@ a();;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'a.b<[C]>();'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'a.b<[C]>()'. self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). @@ -14261,10 +14275,10 @@ a();;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'a();'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'a()'. self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). @@ -14364,10 +14378,10 @@ FASTTypeScriptImporterTest >> testGeneratedFunctionCallsWithOptionalChainingAndT self assert: self topEntity sourceCode equals: 'A?.();'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'A?.()'. self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). @@ -14543,10 +14557,10 @@ const foo: (this: Readable, size?: number) => any;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(result: string)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'result: string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -14628,10 +14642,10 @@ const foo: (this: Readable, size?: number) => any;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(this: Readable, size?: number)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 2. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 2. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'this: Readable'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -14660,7 +14674,7 @@ const foo: (this: Readable, size?: number) => any;;' withPlatformLineEndings. stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'size?: number'. self assert: (self topEntity isOfType: FASTTypeScriptOptionalParameter). @@ -14771,10 +14785,10 @@ FASTTypeScriptImporterTest >> testGeneratedFunctionsWithDestructuredParameters [ self assert: self topEntity sourceCode equals: '({a}: Foo)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: '{a}: Foo'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -14968,10 +14982,10 @@ function foo(x: T, y: U) { self assert: self topEntity sourceCode equals: '(person: string)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'person: string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -15033,10 +15047,10 @@ function foo(x: T, y: U) { self assert: self topEntity sourceCode equals: '(x: T)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'x: T'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -15138,10 +15152,10 @@ function foo(x: T, y: U) { self assert: self topEntity sourceCode equals: '(a: T[], f: (x: T) => U)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 2. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 2. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'a: T[]'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -15178,7 +15192,7 @@ function foo(x: T, y: U) { stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'f: (x: T) => U'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -15211,10 +15225,10 @@ function foo(x: T, y: U) { self assert: self topEntity sourceCode equals: '(x: T)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'x: T'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -15365,10 +15379,10 @@ function foo(x: T, y: U) { self assert: self topEntity sourceCode equals: '(this: T[])'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'this: T[]'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -15499,10 +15513,10 @@ function foo(x: T, y: U) { self assert: self topEntity sourceCode equals: '(x: T, y: U)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 2. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 2. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'x: T'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -15531,7 +15545,7 @@ function foo(x: T, y: U) { stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'y: U'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -15660,10 +15674,10 @@ FASTTypeScriptImporterTest >> testGeneratedGenericCalls [ self assert: self topEntity sourceCode equals: 'f(x);'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'f(x)'. self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). @@ -15674,10 +15688,10 @@ FASTTypeScriptImporterTest >> testGeneratedGenericCalls [ self assert: self topEntity sourceCode equals: '(x)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'x'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -16524,10 +16538,10 @@ FASTTypeScriptImporterTest >> testGeneratedImportInType [ self assert: self topEntity sourceCode equals: '(''node:fs'')'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: '''node:fs'''. self assert: (self topEntity isOfType: FASTTypeScriptString). self assert: (self topEntity isOfType: FASTTLiteral). @@ -17700,10 +17714,10 @@ interface Enum extends Bar, Baz, Foo { self assert: self topEntity sourceCode equals: '(key: Key)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'key: Key'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -17966,10 +17980,10 @@ FASTTypeScriptImporterTest >> testGeneratedLanguagetsx [ <>fragment;' withPlatformLineEndings. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '>hi; />; <>fragment' withPlatformLineEndings. @@ -18109,8 +18123,32 @@ FASTTypeScriptImporterTest >> testGeneratedLanguagetsx [ "Testing value of multivalued relation genericChildren" self assert: self topEntity genericChildren size equals: 1. - - self assert: self topEntity sourceText equals: '>hi; + "Testing value of monovalue relation pattern" + self assert: self topEntity pattern isNotNil. + + stack push: self topEntity pattern. + self assert: self topEntity sourceCode equals: '>; +'. + self assert: (self topEntity isOfType: FASTTypeScriptRegexPattern). + stack pop. + stack pop. + stack pop. + + "Testing value of monovalue relation right" + self assert: self topEntity right isNotNil. + + stack push: self topEntity right. + self assert: self topEntity sourceCode equals: ''. + self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). + stack pop. + stack pop. + stack pop. + + stack push: (stack top childrenNodes at: 2). + self assert: self topEntity sourceCode equals: ';'. + self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). + stack pop. + self assert: self topEntity source equals: '>hi; />; <>fragment;;' withPlatformLineEndings ] @@ -18149,10 +18187,10 @@ FASTTypeScriptImporterTest >> testGeneratedLanguagetypescript [ self assert: self topEntity sourceCode equals: 'b;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'b'. self assert: (self topEntity isOfType: FASTTypeScriptTypeAssertion). @@ -18183,10 +18221,10 @@ FASTTypeScriptImporterTest >> testGeneratedLanguagetypescript [ self assert: self topEntity sourceCode equals: '>e.f;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '>e.f'. self assert: (self topEntity isOfType: FASTTypeScriptTypeAssertion). @@ -19663,10 +19701,10 @@ FASTTypeScriptImporterTest >> testGeneratedMethodDeclarationsWithKeywordsAsNames self assert: self topEntity sourceCode equals: '(plugin)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'plugin'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -19829,10 +19867,10 @@ namespace Bar { }' withPlatformLineEndings. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'namespace Foo { }' withPlatformLineEndings. self assert: (self topEntity isOfType: FASTTypeScriptInternalModule). @@ -20904,10 +20942,10 @@ FASTTypeScriptImporterTest >> testGeneratedObjectTypesWithAutomaticSemicolonInse self assert: self topEntity sourceCode equals: '(string)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -21069,10 +21107,10 @@ FASTTypeScriptImporterTest >> testGeneratedObjectTypesWithCallSignatures [ self assert: self topEntity sourceCode equals: '(string)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -21200,10 +21238,10 @@ FASTTypeScriptImporterTest >> testGeneratedObjectsWithReservedWordsAsKeys [ };' withPlatformLineEndings. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '{ public: true, private: true, @@ -21293,10 +21331,10 @@ FASTTypeScriptImporterTest >> testGeneratedObjectsWithReservedWordsAsKeys [ };' withPlatformLineEndings. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '{ readonly: 1, abstract: 1, @@ -21830,10 +21868,10 @@ FASTTypeScriptImporterTest >> testGeneratedPredefinedTypesAsIdentifiers [ self assert: self topEntity sourceCode equals: '(string: string, query: string)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 2. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 2. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'string: string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -21862,7 +21900,7 @@ FASTTypeScriptImporterTest >> testGeneratedPredefinedTypesAsIdentifiers [ stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'query: string'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -22434,10 +22472,10 @@ T satisfies {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'h satisfies `hello`'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'h satisfies `hello`'. self assert: (self topEntity isOfType: FASTTypeScriptSatisfiesExpression). @@ -22468,10 +22506,10 @@ T satisfies {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'T satisfies {} & { [t: T]: T }'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'T satisfies {} & { [t: T]: T }'. self assert: (self topEntity isOfType: FASTTypeScriptSatisfiesExpression). @@ -22547,10 +22585,10 @@ T satisfies {} & { [t: T]: T } & { [g: G]: G };' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'T satisfies {} & { [t: T]: T } & { [g: G]: G };'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'T satisfies {} & { [t: T]: T } & { [g: G]: G }'. self assert: (self topEntity isOfType: FASTTypeScriptSatisfiesExpression). @@ -22871,10 +22909,10 @@ FASTTypeScriptImporterTest >> testGeneratedSubscriptExpressionsInIfStatements [ self assert: self topEntity sourceCode equals: 'set[ 1 ].apply()'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'set[ 1 ].apply()'. self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). @@ -23048,10 +23086,10 @@ FASTTypeScriptImporterTest >> testGeneratedSuper [ self assert: self topEntity sourceCode equals: 'super(x);'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'super(x)'. self assert: (self topEntity isOfType: FASTTypeScriptCallExpression). @@ -23062,10 +23100,10 @@ FASTTypeScriptImporterTest >> testGeneratedSuper [ self assert: self topEntity sourceCode equals: '(x)'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: 'x'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. @@ -23097,10 +23135,10 @@ FASTTypeScriptImporterTest >> testGeneratedSuper [ self assert: self topEntity sourceCode equals: '(x: number, y: number)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 2. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 2. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'x: number'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -23129,7 +23167,7 @@ FASTTypeScriptImporterTest >> testGeneratedSuper [ stack pop. stack pop. - stack push: (stack top genericChildren at: 2). + stack push: (stack top parameters at: 2). self assert: self topEntity sourceCode equals: 'y: number'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -23442,10 +23480,10 @@ const symBar: symbol = Symbol.for("bar");;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '("foo")'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: '"foo"'. self assert: (self topEntity isOfType: FASTTypeScriptString). self assert: (self topEntity isOfType: FASTTLiteral). @@ -23521,10 +23559,10 @@ const symBar: symbol = Symbol.for("bar");;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '("bar")'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: '"bar"'. self assert: (self topEntity isOfType: FASTTypeScriptString). self assert: (self topEntity isOfType: FASTTLiteral). @@ -24600,10 +24638,10 @@ FASTTypeScriptImporterTest >> testGeneratedTernaryExpression [ self assert: self topEntity sourceCode equals: 'a ? function(){ return true } : b;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'a ? function(){ return true } : b'. self assert: (self topEntity isOfType: FASTTypeScriptTernaryExpression). @@ -24707,10 +24745,10 @@ i < string.length;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'i < foo.length;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'i < foo.length'. self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). @@ -24752,10 +24790,10 @@ i < string.length;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'i < type.length;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'i < type.length'. self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). @@ -24797,10 +24835,10 @@ i < string.length;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'i < string.length;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'i < string.length'. self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). @@ -25945,10 +25983,10 @@ bar satisfies number[] self assert: self topEntity sourceCode equals: 'foo as any as Array'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'foo as any as Array'. self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). @@ -26008,10 +26046,10 @@ bar satisfies number[] self assert: self topEntity sourceCode equals: 'bar satisfies number[]'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'bar satisfies number[]'. self assert: (self topEntity isOfType: FASTTypeScriptSatisfiesExpression). @@ -26042,10 +26080,10 @@ bar satisfies number[] self assert: self topEntity sourceCode equals: '"foobar" as const;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: '"foobar" as const'. self assert: (self topEntity isOfType: FASTTypeScriptAsExpression). @@ -26153,10 +26191,10 @@ declare const g: (x: any) => asserts x is number;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(x: any)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'x: any'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -26254,10 +26292,10 @@ declare const g: (x: any) => asserts x is number;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(x: any)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'x: any'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -26398,10 +26436,10 @@ function isFish(object: Fish): object is Fish { self assert: self topEntity sourceCode equals: '(pet: Fish)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'pet: Fish'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -26493,10 +26531,10 @@ function isFish(object: Fish): object is Fish { self assert: self topEntity sourceCode equals: '(object: Fish)'. self assert: (self topEntity isOfType: FASTTypeScriptFormalParameters). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation parameters" + self assert: self topEntity parameters size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top parameters at: 1). self assert: self topEntity sourceCode equals: 'object: Fish'. self assert: (self topEntity isOfType: FASTTypeScriptRequiredParameter). @@ -26908,10 +26946,10 @@ type T = typeof array[number];;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: '(''person'')'. self assert: (self topEntity isOfType: FASTTypeScriptArguments). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. + "Testing value of multivalued relation argumentsList" + self assert: self topEntity argumentsList size equals: 1. - stack push: (stack top genericChildren at: 1). + stack push: (stack top argumentsList at: 1). self assert: self topEntity sourceCode equals: '''person'''. self assert: (self topEntity isOfType: FASTTypeScriptString). self assert: (self topEntity isOfType: FASTTLiteral). @@ -27159,10 +27197,10 @@ typeof module === "object" && typeof module.exports === "object";' withPlatformL self assert: self topEntity sourceCode equals: 'typeof class {} === "function";'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'typeof class {} === "function"'. self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). @@ -27214,10 +27252,10 @@ typeof module === "object" && typeof module.exports === "object";' withPlatformL self assert: self topEntity sourceCode equals: 'typeof module === "object" && typeof module.exports === "object";'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'typeof module === "object" && typeof module.exports === "object"'. self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). @@ -28446,10 +28484,10 @@ module;;' withPlatformLineEndings. self assert: self topEntity sourceCode equals: 'module;'. self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - "Testing value of multivalued relation genericChildren" - self assert: self topEntity genericChildren size equals: 1. - - stack push: (stack top genericChildren at: 1). + "Testing value of monovalue relation expression" + self assert: self topEntity expression isNotNil. + + stack push: self topEntity expression. self assert: self topEntity sourceCode equals: 'module'. self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). stack pop. diff --git a/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st b/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st index 4436694..e5d643a 100644 --- a/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st +++ b/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st @@ -1,10 +1,74 @@ Class { #name : 'FASTTypeScriptImporter', #superclass : 'TSFASTAbstractImporter', + #instVars : [ + 'representations' + ], #category : 'FAST-TypeScript-Tools', #package : 'FAST-TypeScript-Tools' } +{ #category : 'as yet unclassified' } +FASTTypeScriptImporter >> importToFAST: tsTree usingSourceCode: aString [ + + | importer | + + "needs cleaning" + importer := FASTTypeScriptCustomImporter new. + importer languageName: 'TypeScript'. + importer originString: aString. + + ^ importer import: tsTree. +] + +{ #category : 'accessing' } +FASTTypeScriptImporter >> initialize [ + + super initialize. + self representations: OrderedCollection new. + +] + +{ #category : 'parsing' } +FASTTypeScriptImporter >> parse: aString [ + + |tsTree fastTree| + + "1- create a parser" + self initialiseTreeSitterParser. + + "2- parseString" + tsTree := self tsParser parseString: aString. + + "3- Convert it to FAST" + fastTree := self importToFAST: tsTree rootNode usingSourceCode: aString. + + "4- store the TSTree + FAST tree in the treeRepresantion object and store it in collection" + self representations add: ( TreeRepresentation new + treeSitterTree:tsTree; + fastTree: fastTree). + + "5- delete the TreeSitter Parser" + self deleteTreeSitterParser. + + "6- return fastTree" + "^ self getASTFromString: aString " + ^ fastTree + +] + +{ #category : 'accessing' } +FASTTypeScriptImporter >> representations [ + + ^ representations +] + +{ #category : 'accessing' } +FASTTypeScriptImporter >> representations: anObject [ + + representations := anObject +] + { #category : 'accessing' } FASTTypeScriptImporter >> tsLanguage [ From 85a7dafe534f2b05dd51744e9dea05335b8e84b7 Mon Sep 17 00:00:00 2001 From: mohaTlg Date: Sun, 27 Sep 2026 14:34:07 +0200 Subject: [PATCH 03/10] adding all FASTTypeScriptParser method to FASTTypeScriptImporter --- .../FASTTypeScriptImporter.class.st | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st b/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st index e5d643a..9cfb74f 100644 --- a/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st +++ b/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st @@ -8,6 +8,54 @@ Class { #package : 'FAST-TypeScript-Tools' } +{ #category : 'initialization' } +FASTTypeScriptImporter >> deleteTreeSitterParser [ + + self tsParser delete +] + +{ #category : 'initialization' } +FASTTypeScriptImporter >> editTree: aFastTree using: inputEdit [ + + |treeRepresentation | + + "1- create a parser" + self initialiseTreeSitterParser. + + "2- find treeSitter tree in representation collection" + treeRepresentation := (self representations select: [:each | each fastTree mooseID = aFastTree mooseID]) first. + + "3- edit treeSitterTree using inputEdits" + self tsParser editTree: treeRepresentation treeSitterTree usingInputEdit: inputEdit. + + "4- delete the TreeSitter Parser" + self deleteTreeSitterParser. +] + +{ #category : 'utilities' } +FASTTypeScriptImporter >> getASTFromString: string [ + + | parser tsLanguage importer | + self + deprecated: 'Use parse: instead of current one' + on: '24 June 2025' + in: + 'Pharo-12.0.0+SNAPSHOT.build.1571.sha.cf5fcd22e66957962c97dffc58b0393b7f368147 (64 Bit)'. + + Smalltalk image garbageCollect. + + parser := TSParser new. + tsLanguage := TSLanguage typescript. + parser language: tsLanguage. + + importer := TSFASTImporter new. + importer tsLanguage: tsLanguage. + importer languageName: 'Typescript'. + importer originString: string. + + ^ importer import: (parser parseString: string) rootNode +] + { #category : 'as yet unclassified' } FASTTypeScriptImporter >> importToFAST: tsTree usingSourceCode: aString [ @@ -21,6 +69,13 @@ FASTTypeScriptImporter >> importToFAST: tsTree usingSourceCode: aString [ ^ importer import: tsTree. ] +{ #category : 'initialization' } +FASTTypeScriptImporter >> initialiseTreeSitterParser [ + + self tsParser: TSParser new. + self tsParser language: TSLanguage typescript. +] + { #category : 'accessing' } FASTTypeScriptImporter >> initialize [ @@ -57,6 +112,33 @@ FASTTypeScriptImporter >> parse: aString [ ] +{ #category : 'parsing' } +FASTTypeScriptImporter >> parse: aString usingOldTree: aFastTree [ + + | treeRepresentation newFastTree newTreeSitterTree | + + "1- create a parser" + self initialiseTreeSitterParser. + + "2- find treeSitter tree in representation collection" + treeRepresentation := (self representations select: [:each | each fastTree mooseID = aFastTree mooseID]) first. + + "3- parseString using treeSitter tree" + newTreeSitterTree := self tsParser parseString: aString usingTree: treeRepresentation treeSitterTree. + + "4- convert treeSitter tree to fast" + newFastTree := self importToFAST: newTreeSitterTree rootNode usingSourceCode: aString. + + "5- update the representation collection: fill both new trees" + treeRepresentation treeSitterTree: newTreeSitterTree; fastTree: newFastTree. + + "6- delete the TreeSitter Parser" + self deleteTreeSitterParser. + + "7- return fastTree" + ^ newFastTree. +] + { #category : 'accessing' } FASTTypeScriptImporter >> representations [ @@ -74,3 +156,15 @@ FASTTypeScriptImporter >> tsLanguage [ ^ TSLanguage typescript ] + +{ #category : 'accessing' } +FASTTypeScriptImporter >> tsParser [ + + ^ tsParser +] + +{ #category : 'accessing' } +FASTTypeScriptImporter >> tsParser: anObject [ + + tsParser := anObject +] From 74d1342961f583952a6ee20c089d3746dfbcb407 Mon Sep 17 00:00:00 2001 From: Aless Hosry Date: Mon, 28 Sep 2026 11:37:21 +0200 Subject: [PATCH 04/10] Add WorkOfTrainee branch to CI workflow --- .github/workflows/continuous.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index 015406e..982e487 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -7,9 +7,11 @@ on: push: branches: - main + - WorkOfTrainee pull_request: branches: - main + - WorkOfTrainee jobs: build: runs-on: ubuntu-latest From 6a00fbb41f87cba9afeacc5bd902eb9909926eba Mon Sep 17 00:00:00 2001 From: Aless Hosry Date: Mon, 28 Sep 2026 11:39:33 +0200 Subject: [PATCH 05/10] Remove testing Pharo in CI; keep only Moose Removed Pharo64 versions from the smalltalk matrix. --- .github/workflows/continuous.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index 982e487..b3f18f3 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - smalltalk: [ Pharo64-12, Pharo64-13, Pharo64-14, Moose64-12, Moose64-13 ] + smalltalk: [ Moose64-12, Moose64-13 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v7 From 61430308a5446e64f63f2728be797c8c9cd70983 Mon Sep 17 00:00:00 2001 From: alesshosry Date: Tue, 29 Sep 2026 13:40:16 +0200 Subject: [PATCH 06/10] Fix baseline to link it to main pharo tree sitter --- BaselineOfFASTTypeScript/BaselineOfFASTTypeScript.class.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaselineOfFASTTypeScript/BaselineOfFASTTypeScript.class.st b/BaselineOfFASTTypeScript/BaselineOfFASTTypeScript.class.st index 7cf27f5..186358f 100644 --- a/BaselineOfFASTTypeScript/BaselineOfFASTTypeScript.class.st +++ b/BaselineOfFASTTypeScript/BaselineOfFASTTypeScript.class.st @@ -49,7 +49,7 @@ BaselineOfFASTTypeScript >> defineDependencies: spec [ spec baseline: 'TreeSitter' with: [ spec loads: #( 'moose' ); - repository: 'github://Evref-BL/Pharo-Tree-Sitter:v.2.1.1/src' ]. + repository: 'github://Evref-BL/Pharo-Tree-Sitter:main/src' ]. ] From 2758efda1983b6ba3fb43fed475dfbd28f402800 Mon Sep 17 00:00:00 2001 From: alesshosry Date: Tue, 29 Sep 2026 13:46:59 +0200 Subject: [PATCH 07/10] removing unncessary test for tsx --- .../FASTTypeScriptImporterTest.class.st | 213 ------------------ 1 file changed, 213 deletions(-) diff --git a/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st b/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st index 32f9316..8166fec 100644 --- a/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st +++ b/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st @@ -17940,219 +17940,6 @@ interface Enum extends Bar, Baz, Foo { };' withPlatformLineEndings ] -{ #category : 'tests' } -FASTTypeScriptImporterTest >> testGeneratedLanguagetsx [ - - "Generated as regression test by TSFASTImporterTestGenerator>>#generateTestNamed:fromCode:protocol: - Regenerate executing: self regenerateTest: #testGeneratedLanguagetsx " - - self parse: '>hi; - />; -<>fragment;;'. - - self assert: (fast allWithType: FASTTypeScriptBinaryExpression) size equals: 5. - self assert: (fast allWithType: FASTTypeScriptERROR) size equals: 1. - self assert: (fast allWithType: FASTTypeScriptEmptyStatement) size equals: 1. - self assert: (fast allWithType: FASTTypeScriptExpressionStatement) size equals: 1. - self assert: (fast allWithType: FASTTypeScriptGenericType) size equals: 1. - self assert: (fast allWithType: FASTTypeScriptIdentifier) size equals: 5. - self assert: (fast allWithType: FASTTypeScriptProgram) size equals: 1. - self assert: (fast allWithType: FASTTypeScriptRegex) size equals: 2. - self assert: (fast allWithType: FASTTypeScriptRegexPattern) size equals: 2. - self assert: (fast allWithType: FASTTypeScriptTypeArguments) size equals: 2. - self assert: (fast allWithType: FASTTypeScriptTypeAssertion) size equals: 1. - self assert: (fast allWithType: FASTTypeScriptTypeIdentifier) size equals: 2. - - stack push: fast rootEntities anyOne. - self assert: self topEntity sourceCode equals: '>hi; - />; -<>fragment;;' withPlatformLineEndings. - self assert: (self topEntity isOfType: FASTTypeScriptProgram). - self assert: (self topEntity isOfType: FamixTHasImmediateSource). - self assert: (self topEntity isOfType: FamixTSourceAnchor). - - "Testing value of multivalued relation childrenNodes" - self assert: self topEntity childrenNodes size equals: 2. - - stack push: (stack top childrenNodes at: 1). - self assert: self topEntity sourceCode equals: '>hi; - />; -<>fragment;' withPlatformLineEndings. - self assert: (self topEntity isOfType: FASTTypeScriptExpressionStatement). - - "Testing value of monovalue relation expression" - self assert: self topEntity expression isNotNil. - - stack push: self topEntity expression. - self assert: self topEntity sourceCode equals: '>hi; - />; -<>fragment' withPlatformLineEndings. - self assert: (self topEntity isOfType: FASTTypeScriptBinaryExpression). - - "Testing value of monovalue relation left" - self assert: self topEntity left isNotNil. - - stack push: self topEntity left. - self assert: self topEntity sourceCode equals: '>hi; - />; -<>fragment>hi; ->'. - self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). - - "Testing value of multivalued relation childrenNodes" - self assert: self topEntity childrenNodes size equals: 1. - - stack push: (stack top childrenNodes at: 1). - self assert: self topEntity sourceCode equals: 'Element'. - self assert: (self topEntity isOfType: FASTTypeScriptGenericType). - - "Testing value of monovalue relation name" - self assert: self topEntity name isNotNil. - - stack push: self topEntity name. - self assert: self topEntity sourceCode equals: 'Element'. - self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). - stack pop. - - "Testing value of monovalue relation type_arguments" - self assert: self topEntity type_arguments isNotNil. - - stack push: self topEntity type_arguments. - self assert: self topEntity sourceCode equals: ''. - self assert: (self topEntity isOfType: FASTTypeScriptTypeArguments). - - "Testing value of multivalued relation childrenNodes" - self assert: self topEntity childrenNodes size equals: 1. - - stack push: (stack top childrenNodes at: 1). - self assert: self topEntity sourceCode equals: 'T'. - self assert: (self topEntity isOfType: FASTTypeScriptTypeIdentifier). - stack pop. - stack pop. - stack pop. - stack pop. - - stack push: (stack top childrenNodes at: 2). - self assert: self topEntity sourceCode equals: 'hi; -; -; -'. - self assert: (self topEntity isOfType: FASTTypeScriptRegex). - - "Testing value of monovalue relation pattern" - self assert: self topEntity pattern isNotNil. - - stack push: self topEntity pattern. - self assert: self topEntity sourceCode equals: 'Element>; -'. - self assert: (self topEntity isOfType: FASTTypeScriptRegexPattern). - stack pop. - stack pop. - - "Testing value of monovalue relation right" - self assert: self topEntity right isNotNil. - - stack push: self topEntity right. - self assert: self topEntity sourceCode equals: 'Element; -<>fragment; -'. - self assert: (self topEntity isOfType: FASTTypeScriptRegexPattern). - stack pop. - stack pop. - stack pop. - - "Testing value of monovalue relation right" - self assert: self topEntity right isNotNil. - - stack push: self topEntity right. - self assert: self topEntity sourceCode equals: ''. - self assert: (self topEntity isOfType: FASTTypeScriptIdentifier). - stack pop. - stack pop. - stack pop. - - stack push: (stack top childrenNodes at: 2). - self assert: self topEntity sourceCode equals: ';'. - self assert: (self topEntity isOfType: FASTTypeScriptEmptyStatement). - stack pop. - self assert: self topEntity source equals: '>hi; - />; -<>fragment;;' withPlatformLineEndings -] - { #category : 'tests' } FASTTypeScriptImporterTest >> testGeneratedLanguagetypescript [ From 7399cc5372e3b1caf898cd8554499455df51370a Mon Sep 17 00:00:00 2001 From: Aless Hosry Date: Thu, 1 Oct 2026 16:51:44 +0200 Subject: [PATCH 08/10] Update readme Updated project status and contribution guidelines in README. --- README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ecf441e..a41fc74 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ But for more details, you can have a look at this [blog-post][tree-sitter-blog]. To use it in Pharo, you can check the example below: ```smalltalk -res := FASTTypeScriptParser new parse: 'class SimpleClass { +res := FASTTypeScriptImporter new parse: 'class SimpleClass { integerProperty = 1; doubleProperty = 1.2; booleanProperty = true; @@ -39,15 +39,10 @@ res := FASTTypeScriptParser new parse: 'class SimpleClass { ## NB -The project is still at the very beginning. But at least now it can parse and generate a basic model of FASTTypescript. -Still need to: -- Reorder classes -- Add new properties -- Check traits -- Add tests +The project is updated starting October 1 2026. It works on Moose 12+ (despite making the ci runs only for Moose 13, and this is because some tests are using a slot that is not defined in Moose 12, which makes the tests fail). The metamodel is complete following the description of tree sitter typescript original repo. + +If you think an update is recommended or new feature is requested ... Your contribution is more than welcome. Happy coding with Pharo and typescript :) -Your contribution is more than welcome. -Happy coding with TypeScript :) [fast]: https://github.com/moosetechnology/FAST [pharo-tree-sitter]: https://github.com/Evref-BL/Pharo-Tree-Sitter From 4c665da8a8d42a4cbdac659c9a6aa6e32e51f2ab Mon Sep 17 00:00:00 2001 From: Aless Hosry Date: Thu, 1 Oct 2026 16:56:00 +0200 Subject: [PATCH 09/10] Update CI workflow to use Moose64-13 only --- .github/workflows/continuous.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index b3f18f3..b9fcb5e 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - smalltalk: [ Moose64-12, Moose64-13 ] + smalltalk: [ Moose64-13 ] name: ${{ matrix.smalltalk }} steps: - uses: actions/checkout@v7 @@ -31,7 +31,7 @@ jobs: - name: Coveralls uses: coverallsapp/github-action@v2 - if: ${{ matrix.smalltalk == 'Pharo64-12' }} + if: ${{ matrix.smalltalk == ' Moose64-13 ' }} with: github-token: ${{ secrets.GITHUB_TOKEN }} file: ./coverage/lcov.info From 1c056911c2f3e2a846f5c581eef971b57801abe0 Mon Sep 17 00:00:00 2001 From: alesshosry Date: Fri, 2 Oct 2026 12:06:03 +0200 Subject: [PATCH 10/10] reorganising FASTTypeScript forlders and fixing ci files --- .project | 2 +- .smalltalk.ston | 2 +- README.md | 2 +- .properties => src/.properties | 0 .../BaselineOfFASTTypeScript}/BaselineOfFASTTypeScript.class.st | 0 .../BaselineOfFASTTypeScript}/package.st | 0 .../FASTTypeScriptEntity.extension.st | 0 .../MooseAbstractGroup.extension.st | 0 .../FAST-TypeScript-Model-Extension}/package.st | 0 .../FASTTypeScriptMetamodelGenerator.class.st | 0 .../FAST-TypeScript-Model-Generator}/package.st | 0 .../FASTTypeScriptImporterTest.class.st | 0 .../TypeScriptParsingClassesTest.class.st | 0 .../FAST-TypeScript-Model-Tests}/package.st | 0 .../FAST-TypeScript-Model}/FASTTEntity.extension.st | 0 .../FAST-TypeScript-Model}/FASTTExpression.extension.st | 0 .../FAST-TypeScript-Model}/FASTTStatement.extension.st | 0 .../FASTTypeScriptAbstractClassDeclaration.class.st | 0 .../FASTTypeScriptAbstractMethodSignature.class.st | 0 .../FASTTypeScriptAccessibilityModifier.class.st | 0 .../FASTTypeScriptAddingTypeAnnotation.class.st | 0 .../FASTTypeScriptAmbientDeclaration.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptArguments.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptArray.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptArrayPattern.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptArrayType.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptArrowFunction.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptAsExpression.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptAsserts.class.st | 0 .../FASTTypeScriptAssertsAnnotation.class.st | 0 .../FASTTypeScriptAssignmentExpression.class.st | 0 .../FASTTypeScriptAssignmentPattern.class.st | 0 .../FASTTypeScriptAugmentedAssignmentExpression.class.st | 0 .../FASTTypeScriptAwaitExpression.class.st | 0 .../FASTTypeScriptBinaryExpression.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptBoolean.class.st | 0 .../FASTTypeScriptBreakStatement.class.st | 0 .../FASTTypeScriptCallExpression.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptCallSignature.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptCatchClause.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptClass.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptClassBody.class.st | 0 .../FASTTypeScriptClassDeclaration.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptClassHeritage.class.st | 0 .../FASTTypeScriptClassStaticBlock.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptComment.class.st | 0 .../FASTTypeScriptCompilationUnit.class.st | 0 .../FASTTypeScriptComputedPropertyName.class.st | 0 .../FASTTypeScriptConditionalType.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptConstraint.class.st | 0 .../FASTTypeScriptConstructSignature.class.st | 0 .../FASTTypeScriptConstructorType.class.st | 0 .../FASTTypeScriptContinueStatement.class.st | 0 .../FASTTypeScriptDebuggerStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptDecorator.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptDefaultType.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptDoStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptERROR.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptElseClause.class.st | 0 .../FASTTypeScriptEmptyStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptEntity.class.st | 0 .../FASTTypeScriptEnumAssignment.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptEnumBody.class.st | 0 .../FASTTypeScriptEnumDeclaration.class.st | 0 .../FASTTypeScriptEscapeSequence.class.st | 0 .../FASTTypeScriptExistentialType.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptExportClause.class.st | 0 .../FASTTypeScriptExportSpecifier.class.st | 0 .../FASTTypeScriptExportStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptExpression.class.st | 0 .../FASTTypeScriptExpressionStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptExtendsClause.class.st | 0 .../FASTTypeScriptExtendsTypeClause.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptFalse.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptFinallyClause.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptFlowMaybeType.class.st | 0 .../FASTTypeScriptForInStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptForStatement.class.st | 0 .../FASTTypeScriptFormalParameters.class.st | 0 .../FASTTypeScriptFunctionDeclaration.class.st | 0 .../FASTTypeScriptFunctionExpression.class.st | 0 .../FASTTypeScriptFunctionSignature.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptFunctionType.class.st | 0 .../FASTTypeScriptGeneratorFunction.class.st | 0 .../FASTTypeScriptGeneratorFunctionDeclaration.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptGenericType.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptHashBangLine.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptHtmlComment.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptIdentifier.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptIfStatement.class.st | 0 .../FASTTypeScriptImplementsClause.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptImport.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptImportAlias.class.st | 0 .../FASTTypeScriptImportAttribute.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptImportClause.class.st | 0 .../FASTTypeScriptImportRequireClause.class.st | 0 .../FASTTypeScriptImportSpecifier.class.st | 0 .../FASTTypeScriptImportStatement.class.st | 0 .../FASTTypeScriptIndexSignature.class.st | 0 .../FASTTypeScriptIndexTypeQuery.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptInferType.class.st | 0 .../FASTTypeScriptInstantiationExpression.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptInterfaceBody.class.st | 0 .../FASTTypeScriptInterfaceDeclaration.class.st | 0 .../FASTTypeScriptInternalModule.class.st | 0 .../FASTTypeScriptIntersectionType.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptJsxText.class.st | 0 .../FASTTypeScriptLabeledStatement.class.st | 0 .../FASTTypeScriptLexicalDeclaration.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptLiteral.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptLiteralType.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptLookupType.class.st | 0 .../FASTTypeScriptMappedTypeClause.class.st | 0 .../FASTTypeScriptMemberExpression.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptMetaProperty.class.st | 0 .../FASTTypeScriptMethodDefinition.class.st | 0 .../FASTTypeScriptMethodSignature.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptModel.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptModule.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptNamedImports.class.st | 0 .../FASTTypeScriptNamespaceExport.class.st | 0 .../FASTTypeScriptNamespaceImport.class.st | 0 .../FASTTypeScriptNestedIdentifier.class.st | 0 .../FASTTypeScriptNestedTypeIdentifier.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptNewExpression.class.st | 0 .../FASTTypeScriptNonNullExpression.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptNull.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptNumber.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptObject.class.st | 0 .../FASTTypeScriptObjectAssignmentPattern.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptObjectPattern.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptObjectType.class.st | 0 .../FASTTypeScriptOmittingTypeAnnotation.class.st | 0 .../FASTTypeScriptOptingTypeAnnotation.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptOptionalChain.class.st | 0 .../FASTTypeScriptOptionalParameter.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptOptionalType.class.st | 0 .../FASTTypeScriptOverrideModifier.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptPair.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptPairPattern.class.st | 0 .../FASTTypeScriptParenthesizedExpression.class.st | 0 .../FASTTypeScriptParenthesizedType.class.st | 0 .../FASTTypeScriptPredefinedType.class.st | 0 .../FASTTypeScriptPrivatePropertyIdentifier.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptProgram.class.st | 0 .../FASTTypeScriptPropertyIdentifier.class.st | 0 .../FASTTypeScriptPropertySignature.class.st | 0 .../FASTTypeScriptPublicFieldDefinition.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptReadonlyType.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptRegex.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptRegexFlags.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptRegexPattern.class.st | 0 .../FASTTypeScriptRequiredParameter.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptRestPattern.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptRestType.class.st | 0 .../FASTTypeScriptReturnStatement.class.st | 0 .../FASTTypeScriptSatisfiesExpression.class.st | 0 .../FASTTypeScriptSequenceExpression.class.st | 0 .../FASTTypeScriptShorthandPropertyIdentifier.class.st | 0 .../FASTTypeScriptShorthandPropertyIdentifierPattern.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptSpreadElement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptStatement.class.st | 0 .../FASTTypeScriptStatementBlock.class.st | 0 .../FASTTypeScriptStatementIdentifier.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptString.class.st | 0 .../FASTTypeScriptStringFragment.class.st | 0 .../FASTTypeScriptSubscriptExpression.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptSuper.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptSwitchBody.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptSwitchCase.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptSwitchDefault.class.st | 0 .../FASTTypeScriptSwitchStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTDeclaration.trait.st | 0 .../FASTTypeScriptTEntityCreator.trait.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTModifier.trait.st | 0 .../FASTTypeScriptTOptionalField.trait.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTPattern.trait.st | 0 .../FASTTypeScriptTPrimaryExpression.trait.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTPrimaryType.trait.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTReturnType.trait.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTType.trait.st | 0 .../FASTTypeScriptTWithDeclarations.trait.st | 0 .../FASTTypeScriptTWithModifiers.trait.st | 0 .../FASTTypeScriptTemplateLiteralType.class.st | 0 .../FASTTypeScriptTemplateString.class.st | 0 .../FASTTypeScriptTemplateSubstitution.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTemplateType.class.st | 0 .../FASTTypeScriptTernaryExpression.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptThis.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptThisType.class.st | 0 .../FASTTypeScriptThrowStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTrue.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTryStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTupleType.class.st | 0 .../FASTTypeScriptTypeAliasDeclaration.class.st | 0 .../FASTTypeScriptTypeAnnotation.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTypeArguments.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTypeAssertion.class.st | 0 .../FASTTypeScriptTypeIdentifier.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTypeParameter.class.st | 0 .../FASTTypeScriptTypeParameters.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTypePredicate.class.st | 0 .../FASTTypeScriptTypePredicateAnnotation.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptTypeQuery.class.st | 0 .../FASTTypeScriptUnaryExpression.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptUndefined.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptUnionType.class.st | 0 .../FASTTypeScriptUpdateExpression.class.st | 0 .../FASTTypeScriptVariableDeclaration.class.st | 0 .../FASTTypeScriptVariableDeclarator.class.st | 0 .../FASTTypeScriptWhileStatement.class.st | 0 .../FAST-TypeScript-Model}/FASTTypeScriptWithStatement.class.st | 0 .../FASTTypeScriptYieldExpression.class.st | 0 {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/package.st | 0 .../FASTTypeScriptCustomImporter.class.st | 0 .../FAST-TypeScript-Tools}/FASTTypeScriptImporter.class.st | 0 .../FAST-TypeScript-Tools}/FASTTypeScriptParser.class.st | 0 .../FAST-TypeScript-Tools}/TreeRepresentation.class.st | 0 {FAST-TypeScript-Tools => src/FAST-TypeScript-Tools}/package.st | 0 .../FAST-TypeScript-Visitor}/FASTTypeScriptVisitor.class.st | 0 .../FAST-TypeScript-Visitor}/package.st | 0 221 files changed, 3 insertions(+), 3 deletions(-) rename .properties => src/.properties (100%) rename {BaselineOfFASTTypeScript => src/BaselineOfFASTTypeScript}/BaselineOfFASTTypeScript.class.st (100%) rename {BaselineOfFASTTypeScript => src/BaselineOfFASTTypeScript}/package.st (100%) rename {FAST-TypeScript-Model-Extension => src/FAST-TypeScript-Model-Extension}/FASTTypeScriptEntity.extension.st (100%) rename {FAST-TypeScript-Model-Extension => src/FAST-TypeScript-Model-Extension}/MooseAbstractGroup.extension.st (100%) rename {FAST-TypeScript-Model-Extension => src/FAST-TypeScript-Model-Extension}/package.st (100%) rename {FAST-TypeScript-Model-Generator => src/FAST-TypeScript-Model-Generator}/FASTTypeScriptMetamodelGenerator.class.st (100%) rename {FAST-TypeScript-Model-Generator => src/FAST-TypeScript-Model-Generator}/package.st (100%) rename {FAST-TypeScript-Model-Tests => src/FAST-TypeScript-Model-Tests}/FASTTypeScriptImporterTest.class.st (100%) rename {FAST-TypeScript-Model-Tests => src/FAST-TypeScript-Model-Tests}/TypeScriptParsingClassesTest.class.st (100%) rename {FAST-TypeScript-Model-Tests => src/FAST-TypeScript-Model-Tests}/package.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTEntity.extension.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTExpression.extension.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTStatement.extension.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAbstractClassDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAbstractMethodSignature.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAccessibilityModifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAddingTypeAnnotation.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAmbientDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptArguments.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptArray.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptArrayPattern.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptArrayType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptArrowFunction.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAsExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAsserts.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAssertsAnnotation.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAssignmentExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAssignmentPattern.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAugmentedAssignmentExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptAwaitExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptBinaryExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptBoolean.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptBreakStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptCallExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptCallSignature.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptCatchClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptClass.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptClassBody.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptClassDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptClassHeritage.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptClassStaticBlock.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptComment.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptCompilationUnit.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptComputedPropertyName.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptConditionalType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptConstraint.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptConstructSignature.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptConstructorType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptContinueStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptDebuggerStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptDecorator.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptDefaultType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptDoStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptERROR.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptElseClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptEmptyStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptEntity.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptEnumAssignment.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptEnumBody.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptEnumDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptEscapeSequence.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptExistentialType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptExportClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptExportSpecifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptExportStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptExpressionStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptExtendsClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptExtendsTypeClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptFalse.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptFinallyClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptFlowMaybeType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptForInStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptForStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptFormalParameters.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptFunctionDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptFunctionExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptFunctionSignature.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptFunctionType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptGeneratorFunction.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptGeneratorFunctionDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptGenericType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptHashBangLine.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptHtmlComment.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptIdentifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptIfStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptImplementsClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptImport.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptImportAlias.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptImportAttribute.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptImportClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptImportRequireClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptImportSpecifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptImportStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptIndexSignature.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptIndexTypeQuery.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptInferType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptInstantiationExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptInterfaceBody.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptInterfaceDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptInternalModule.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptIntersectionType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptJsxText.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptLabeledStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptLexicalDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptLiteral.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptLiteralType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptLookupType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptMappedTypeClause.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptMemberExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptMetaProperty.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptMethodDefinition.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptMethodSignature.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptModel.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptModule.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptNamedImports.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptNamespaceExport.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptNamespaceImport.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptNestedIdentifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptNestedTypeIdentifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptNewExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptNonNullExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptNull.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptNumber.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptObject.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptObjectAssignmentPattern.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptObjectPattern.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptObjectType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptOmittingTypeAnnotation.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptOptingTypeAnnotation.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptOptionalChain.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptOptionalParameter.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptOptionalType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptOverrideModifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptPair.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptPairPattern.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptParenthesizedExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptParenthesizedType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptPredefinedType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptPrivatePropertyIdentifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptProgram.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptPropertyIdentifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptPropertySignature.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptPublicFieldDefinition.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptReadonlyType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptRegex.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptRegexFlags.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptRegexPattern.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptRequiredParameter.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptRestPattern.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptRestType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptReturnStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptSatisfiesExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptSequenceExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptShorthandPropertyIdentifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptShorthandPropertyIdentifierPattern.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptSpreadElement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptStatementBlock.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptStatementIdentifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptString.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptStringFragment.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptSubscriptExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptSuper.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptSwitchBody.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptSwitchCase.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptSwitchDefault.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptSwitchStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTDeclaration.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTEntityCreator.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTModifier.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTOptionalField.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTPattern.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTPrimaryExpression.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTPrimaryType.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTReturnType.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTType.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTWithDeclarations.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTWithModifiers.trait.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTemplateLiteralType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTemplateString.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTemplateSubstitution.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTemplateType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTernaryExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptThis.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptThisType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptThrowStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTrue.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTryStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTupleType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypeAliasDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypeAnnotation.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypeArguments.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypeAssertion.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypeIdentifier.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypeParameter.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypeParameters.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypePredicate.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypePredicateAnnotation.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptTypeQuery.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptUnaryExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptUndefined.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptUnionType.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptUpdateExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptVariableDeclaration.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptVariableDeclarator.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptWhileStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptWithStatement.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/FASTTypeScriptYieldExpression.class.st (100%) rename {FAST-TypeScript-Model => src/FAST-TypeScript-Model}/package.st (100%) rename {FAST-TypeScript-Tools => src/FAST-TypeScript-Tools}/FASTTypeScriptCustomImporter.class.st (100%) rename {FAST-TypeScript-Tools => src/FAST-TypeScript-Tools}/FASTTypeScriptImporter.class.st (100%) rename {FAST-TypeScript-Tools => src/FAST-TypeScript-Tools}/FASTTypeScriptParser.class.st (100%) rename {FAST-TypeScript-Tools => src/FAST-TypeScript-Tools}/TreeRepresentation.class.st (100%) rename {FAST-TypeScript-Tools => src/FAST-TypeScript-Tools}/package.st (100%) rename {FAST-TypeScript-Visitor => src/FAST-TypeScript-Visitor}/FASTTypeScriptVisitor.class.st (100%) rename {FAST-TypeScript-Visitor => src/FAST-TypeScript-Visitor}/package.st (100%) diff --git a/.project b/.project index 5e7754f..81083cc 100644 --- a/.project +++ b/.project @@ -1,3 +1,3 @@ { - 'srcDirectory' : '' + 'srcDirectory' : 'src' } \ No newline at end of file diff --git a/.smalltalk.ston b/.smalltalk.ston index fe08470..3a42f1f 100644 --- a/.smalltalk.ston +++ b/.smalltalk.ston @@ -2,7 +2,7 @@ SmalltalkCISpec { #loading : [ SCIMetacelloLoadSpec { #baseline : 'FASTTypeScript', - #directory : '.', + #directory : 'src', #platforms : [ #pharo ] } ], diff --git a/README.md b/README.md index a41fc74..ef6b6ea 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ To load FASTTypeScript in Pharo, execute the following in a Moose image: ```smalltalk Metacello new baseline: 'FASTTypeScript'; - repository: 'github://moosetechnology/FASTTypescript:main'; + repository: 'github://moosetechnology/FASTTypescript:main/src'; load. ``` diff --git a/.properties b/src/.properties similarity index 100% rename from .properties rename to src/.properties diff --git a/BaselineOfFASTTypeScript/BaselineOfFASTTypeScript.class.st b/src/BaselineOfFASTTypeScript/BaselineOfFASTTypeScript.class.st similarity index 100% rename from BaselineOfFASTTypeScript/BaselineOfFASTTypeScript.class.st rename to src/BaselineOfFASTTypeScript/BaselineOfFASTTypeScript.class.st diff --git a/BaselineOfFASTTypeScript/package.st b/src/BaselineOfFASTTypeScript/package.st similarity index 100% rename from BaselineOfFASTTypeScript/package.st rename to src/BaselineOfFASTTypeScript/package.st diff --git a/FAST-TypeScript-Model-Extension/FASTTypeScriptEntity.extension.st b/src/FAST-TypeScript-Model-Extension/FASTTypeScriptEntity.extension.st similarity index 100% rename from FAST-TypeScript-Model-Extension/FASTTypeScriptEntity.extension.st rename to src/FAST-TypeScript-Model-Extension/FASTTypeScriptEntity.extension.st diff --git a/FAST-TypeScript-Model-Extension/MooseAbstractGroup.extension.st b/src/FAST-TypeScript-Model-Extension/MooseAbstractGroup.extension.st similarity index 100% rename from FAST-TypeScript-Model-Extension/MooseAbstractGroup.extension.st rename to src/FAST-TypeScript-Model-Extension/MooseAbstractGroup.extension.st diff --git a/FAST-TypeScript-Model-Extension/package.st b/src/FAST-TypeScript-Model-Extension/package.st similarity index 100% rename from FAST-TypeScript-Model-Extension/package.st rename to src/FAST-TypeScript-Model-Extension/package.st diff --git a/FAST-TypeScript-Model-Generator/FASTTypeScriptMetamodelGenerator.class.st b/src/FAST-TypeScript-Model-Generator/FASTTypeScriptMetamodelGenerator.class.st similarity index 100% rename from FAST-TypeScript-Model-Generator/FASTTypeScriptMetamodelGenerator.class.st rename to src/FAST-TypeScript-Model-Generator/FASTTypeScriptMetamodelGenerator.class.st diff --git a/FAST-TypeScript-Model-Generator/package.st b/src/FAST-TypeScript-Model-Generator/package.st similarity index 100% rename from FAST-TypeScript-Model-Generator/package.st rename to src/FAST-TypeScript-Model-Generator/package.st diff --git a/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st b/src/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st similarity index 100% rename from FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st rename to src/FAST-TypeScript-Model-Tests/FASTTypeScriptImporterTest.class.st diff --git a/FAST-TypeScript-Model-Tests/TypeScriptParsingClassesTest.class.st b/src/FAST-TypeScript-Model-Tests/TypeScriptParsingClassesTest.class.st similarity index 100% rename from FAST-TypeScript-Model-Tests/TypeScriptParsingClassesTest.class.st rename to src/FAST-TypeScript-Model-Tests/TypeScriptParsingClassesTest.class.st diff --git a/FAST-TypeScript-Model-Tests/package.st b/src/FAST-TypeScript-Model-Tests/package.st similarity index 100% rename from FAST-TypeScript-Model-Tests/package.st rename to src/FAST-TypeScript-Model-Tests/package.st diff --git a/FAST-TypeScript-Model/FASTTEntity.extension.st b/src/FAST-TypeScript-Model/FASTTEntity.extension.st similarity index 100% rename from FAST-TypeScript-Model/FASTTEntity.extension.st rename to src/FAST-TypeScript-Model/FASTTEntity.extension.st diff --git a/FAST-TypeScript-Model/FASTTExpression.extension.st b/src/FAST-TypeScript-Model/FASTTExpression.extension.st similarity index 100% rename from FAST-TypeScript-Model/FASTTExpression.extension.st rename to src/FAST-TypeScript-Model/FASTTExpression.extension.st diff --git a/FAST-TypeScript-Model/FASTTStatement.extension.st b/src/FAST-TypeScript-Model/FASTTStatement.extension.st similarity index 100% rename from FAST-TypeScript-Model/FASTTStatement.extension.st rename to src/FAST-TypeScript-Model/FASTTStatement.extension.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAbstractClassDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAbstractClassDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAbstractClassDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAbstractClassDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAbstractMethodSignature.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAbstractMethodSignature.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAbstractMethodSignature.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAbstractMethodSignature.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAccessibilityModifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAccessibilityModifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAccessibilityModifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAccessibilityModifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAddingTypeAnnotation.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAddingTypeAnnotation.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAddingTypeAnnotation.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAddingTypeAnnotation.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAmbientDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAmbientDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAmbientDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAmbientDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptArguments.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptArguments.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptArguments.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptArguments.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptArray.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptArray.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptArray.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptArray.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptArrayPattern.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptArrayPattern.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptArrayPattern.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptArrayPattern.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptArrayType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptArrayType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptArrayType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptArrayType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptArrowFunction.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptArrowFunction.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptArrowFunction.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptArrowFunction.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAsExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAsExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAsExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAsExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAsserts.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAsserts.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAsserts.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAsserts.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAssertsAnnotation.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAssertsAnnotation.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAssertsAnnotation.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAssertsAnnotation.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAssignmentExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAssignmentExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAssignmentExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAssignmentExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAssignmentPattern.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAssignmentPattern.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAssignmentPattern.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAssignmentPattern.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAugmentedAssignmentExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAugmentedAssignmentExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAugmentedAssignmentExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAugmentedAssignmentExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptAwaitExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptAwaitExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptAwaitExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptAwaitExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptBinaryExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptBinaryExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptBinaryExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptBinaryExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptBoolean.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptBoolean.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptBoolean.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptBoolean.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptBreakStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptBreakStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptBreakStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptBreakStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptCallExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptCallExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptCallExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptCallExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptCallSignature.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptCallSignature.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptCallSignature.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptCallSignature.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptCatchClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptCatchClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptCatchClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptCatchClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptClass.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptClass.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptClass.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptClass.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptClassBody.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptClassBody.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptClassBody.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptClassBody.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptClassDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptClassDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptClassDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptClassDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptClassHeritage.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptClassHeritage.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptClassHeritage.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptClassHeritage.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptClassStaticBlock.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptClassStaticBlock.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptClassStaticBlock.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptClassStaticBlock.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptComment.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptComment.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptComment.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptComment.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptCompilationUnit.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptCompilationUnit.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptCompilationUnit.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptCompilationUnit.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptComputedPropertyName.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptComputedPropertyName.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptComputedPropertyName.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptComputedPropertyName.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptConditionalType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptConditionalType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptConditionalType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptConditionalType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptConstraint.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptConstraint.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptConstraint.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptConstraint.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptConstructSignature.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptConstructSignature.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptConstructSignature.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptConstructSignature.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptConstructorType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptConstructorType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptConstructorType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptConstructorType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptContinueStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptContinueStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptContinueStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptContinueStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptDebuggerStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptDebuggerStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptDebuggerStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptDebuggerStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptDecorator.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptDecorator.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptDecorator.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptDecorator.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptDefaultType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptDefaultType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptDefaultType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptDefaultType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptDoStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptDoStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptDoStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptDoStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptERROR.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptERROR.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptERROR.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptERROR.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptElseClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptElseClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptElseClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptElseClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptEmptyStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptEmptyStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptEmptyStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptEmptyStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptEntity.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptEntity.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptEntity.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptEntity.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptEnumAssignment.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptEnumAssignment.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptEnumAssignment.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptEnumAssignment.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptEnumBody.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptEnumBody.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptEnumBody.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptEnumBody.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptEnumDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptEnumDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptEnumDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptEnumDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptEscapeSequence.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptEscapeSequence.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptEscapeSequence.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptEscapeSequence.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptExistentialType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptExistentialType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptExistentialType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptExistentialType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptExportClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptExportClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptExportClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptExportClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptExportSpecifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptExportSpecifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptExportSpecifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptExportSpecifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptExportStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptExportStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptExportStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptExportStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptExpressionStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptExpressionStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptExpressionStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptExpressionStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptExtendsClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptExtendsClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptExtendsClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptExtendsClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptExtendsTypeClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptExtendsTypeClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptExtendsTypeClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptExtendsTypeClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptFalse.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptFalse.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptFalse.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptFalse.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptFinallyClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptFinallyClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptFinallyClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptFinallyClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptFlowMaybeType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptFlowMaybeType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptFlowMaybeType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptFlowMaybeType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptForInStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptForInStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptForInStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptForInStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptForStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptForStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptForStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptForStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptFormalParameters.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptFormalParameters.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptFormalParameters.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptFormalParameters.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptFunctionDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptFunctionDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptFunctionDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptFunctionDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptFunctionExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptFunctionExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptFunctionExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptFunctionExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptFunctionSignature.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptFunctionSignature.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptFunctionSignature.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptFunctionSignature.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptFunctionType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptFunctionType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptFunctionType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptFunctionType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunction.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunction.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptGeneratorFunction.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunction.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunctionDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunctionDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptGeneratorFunctionDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptGeneratorFunctionDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptGenericType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptGenericType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptGenericType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptGenericType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptHashBangLine.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptHashBangLine.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptHashBangLine.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptHashBangLine.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptHtmlComment.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptHtmlComment.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptHtmlComment.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptHtmlComment.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptIdentifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptIdentifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptIdentifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptIdentifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptIfStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptIfStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptIfStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptIfStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptImplementsClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptImplementsClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptImplementsClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptImplementsClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptImport.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptImport.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptImport.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptImport.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportAlias.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptImportAlias.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptImportAlias.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptImportAlias.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportAttribute.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptImportAttribute.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptImportAttribute.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptImportAttribute.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptImportClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptImportClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptImportClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportRequireClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptImportRequireClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptImportRequireClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptImportRequireClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportSpecifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptImportSpecifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptImportSpecifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptImportSpecifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptImportStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptImportStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptImportStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptImportStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptIndexSignature.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptIndexSignature.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptIndexSignature.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptIndexSignature.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptIndexTypeQuery.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptIndexTypeQuery.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptIndexTypeQuery.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptIndexTypeQuery.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptInferType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptInferType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptInferType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptInferType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptInstantiationExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptInstantiationExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptInstantiationExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptInstantiationExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptInterfaceBody.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptInterfaceBody.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptInterfaceBody.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptInterfaceBody.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptInterfaceDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptInterfaceDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptInterfaceDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptInterfaceDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptInternalModule.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptInternalModule.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptInternalModule.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptInternalModule.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptIntersectionType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptIntersectionType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptIntersectionType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptIntersectionType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptJsxText.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptJsxText.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptJsxText.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptJsxText.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptLabeledStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptLabeledStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptLabeledStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptLabeledStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptLexicalDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptLexicalDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptLexicalDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptLexicalDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptLiteral.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptLiteral.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptLiteral.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptLiteral.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptLiteralType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptLiteralType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptLiteralType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptLiteralType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptLookupType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptLookupType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptLookupType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptLookupType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptMappedTypeClause.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptMappedTypeClause.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptMappedTypeClause.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptMappedTypeClause.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptMemberExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptMemberExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptMemberExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptMemberExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptMetaProperty.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptMetaProperty.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptMetaProperty.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptMetaProperty.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptMethodDefinition.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptMethodDefinition.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptMethodDefinition.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptMethodDefinition.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptMethodSignature.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptMethodSignature.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptMethodSignature.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptMethodSignature.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptModel.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptModel.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptModel.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptModel.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptModule.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptModule.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptModule.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptModule.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptNamedImports.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptNamedImports.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptNamedImports.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptNamedImports.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptNamespaceExport.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptNamespaceExport.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptNamespaceExport.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptNamespaceExport.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptNamespaceImport.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptNamespaceImport.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptNamespaceImport.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptNamespaceImport.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptNestedIdentifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptNestedIdentifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptNestedIdentifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptNestedIdentifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptNestedTypeIdentifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptNestedTypeIdentifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptNestedTypeIdentifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptNestedTypeIdentifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptNewExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptNewExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptNewExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptNewExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptNonNullExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptNonNullExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptNonNullExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptNonNullExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptNull.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptNull.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptNull.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptNull.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptNumber.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptNumber.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptNumber.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptNumber.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptObject.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptObject.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptObject.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptObject.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptObjectAssignmentPattern.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptObjectAssignmentPattern.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptObjectAssignmentPattern.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptObjectAssignmentPattern.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptObjectPattern.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptObjectPattern.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptObjectPattern.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptObjectPattern.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptObjectType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptObjectType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptObjectType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptObjectType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptOmittingTypeAnnotation.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptOmittingTypeAnnotation.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptOmittingTypeAnnotation.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptOmittingTypeAnnotation.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptOptingTypeAnnotation.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptOptingTypeAnnotation.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptOptingTypeAnnotation.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptOptingTypeAnnotation.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptOptionalChain.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptOptionalChain.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptOptionalChain.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptOptionalChain.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptOptionalParameter.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptOptionalParameter.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptOptionalParameter.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptOptionalParameter.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptOptionalType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptOptionalType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptOptionalType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptOptionalType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptOverrideModifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptOverrideModifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptOverrideModifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptOverrideModifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptPair.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptPair.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptPair.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptPair.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptPairPattern.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptPairPattern.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptPairPattern.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptPairPattern.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptParenthesizedExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptParenthesizedExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptParenthesizedExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptParenthesizedExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptParenthesizedType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptParenthesizedType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptParenthesizedType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptParenthesizedType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptPredefinedType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptPredefinedType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptPredefinedType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptPredefinedType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptPrivatePropertyIdentifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptPrivatePropertyIdentifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptPrivatePropertyIdentifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptPrivatePropertyIdentifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptProgram.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptProgram.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptProgram.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptProgram.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptPropertyIdentifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptPropertyIdentifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptPropertyIdentifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptPropertyIdentifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptPropertySignature.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptPropertySignature.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptPropertySignature.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptPropertySignature.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptPublicFieldDefinition.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptPublicFieldDefinition.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptPublicFieldDefinition.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptPublicFieldDefinition.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptReadonlyType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptReadonlyType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptReadonlyType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptReadonlyType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptRegex.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptRegex.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptRegex.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptRegex.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptRegexFlags.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptRegexFlags.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptRegexFlags.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptRegexFlags.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptRegexPattern.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptRegexPattern.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptRegexPattern.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptRegexPattern.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptRequiredParameter.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptRequiredParameter.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptRequiredParameter.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptRequiredParameter.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptRestPattern.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptRestPattern.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptRestPattern.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptRestPattern.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptRestType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptRestType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptRestType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptRestType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptReturnStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptReturnStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptReturnStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptReturnStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptSatisfiesExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptSatisfiesExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptSatisfiesExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptSatisfiesExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptSequenceExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptSequenceExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptSequenceExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptSequenceExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifierPattern.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifierPattern.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifierPattern.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptShorthandPropertyIdentifierPattern.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptSpreadElement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptSpreadElement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptSpreadElement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptSpreadElement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptStatementBlock.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptStatementBlock.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptStatementBlock.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptStatementBlock.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptStatementIdentifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptStatementIdentifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptStatementIdentifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptStatementIdentifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptString.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptString.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptString.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptString.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptStringFragment.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptStringFragment.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptStringFragment.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptStringFragment.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptSubscriptExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptSubscriptExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptSubscriptExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptSubscriptExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptSuper.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptSuper.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptSuper.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptSuper.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptSwitchBody.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptSwitchBody.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptSwitchBody.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptSwitchBody.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptSwitchCase.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptSwitchCase.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptSwitchCase.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptSwitchCase.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptSwitchDefault.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptSwitchDefault.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptSwitchDefault.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptSwitchDefault.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptSwitchStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptSwitchStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptSwitchStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptSwitchStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTDeclaration.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTDeclaration.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTDeclaration.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTDeclaration.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTEntityCreator.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTEntityCreator.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTEntityCreator.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTEntityCreator.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTModifier.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTModifier.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTModifier.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTModifier.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTOptionalField.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTOptionalField.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTOptionalField.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTOptionalField.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTPattern.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTPattern.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTPattern.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTPattern.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTPrimaryExpression.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTPrimaryExpression.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTPrimaryExpression.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTPrimaryExpression.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTPrimaryType.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTPrimaryType.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTPrimaryType.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTPrimaryType.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTReturnType.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTReturnType.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTReturnType.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTReturnType.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTType.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTType.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTType.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTType.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTWithDeclarations.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTWithDeclarations.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTWithDeclarations.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTWithDeclarations.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTWithModifiers.trait.st b/src/FAST-TypeScript-Model/FASTTypeScriptTWithModifiers.trait.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTWithModifiers.trait.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTWithModifiers.trait.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTemplateLiteralType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTemplateLiteralType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTemplateLiteralType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTemplateLiteralType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTemplateString.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTemplateString.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTemplateString.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTemplateString.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTemplateSubstitution.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTemplateSubstitution.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTemplateSubstitution.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTemplateSubstitution.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTemplateType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTemplateType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTemplateType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTemplateType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTernaryExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTernaryExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTernaryExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTernaryExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptThis.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptThis.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptThis.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptThis.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptThisType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptThisType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptThisType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptThisType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptThrowStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptThrowStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptThrowStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptThrowStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTrue.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTrue.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTrue.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTrue.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTryStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTryStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTryStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTryStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTupleType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTupleType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTupleType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTupleType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeAliasDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypeAliasDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypeAliasDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypeAliasDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeAnnotation.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypeAnnotation.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypeAnnotation.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypeAnnotation.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeArguments.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypeArguments.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypeArguments.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypeArguments.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeAssertion.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypeAssertion.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypeAssertion.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypeAssertion.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeIdentifier.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypeIdentifier.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypeIdentifier.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypeIdentifier.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeParameter.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypeParameter.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypeParameter.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypeParameter.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeParameters.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypeParameters.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypeParameters.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypeParameters.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypePredicate.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypePredicate.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypePredicate.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypePredicate.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypePredicateAnnotation.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypePredicateAnnotation.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypePredicateAnnotation.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypePredicateAnnotation.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptTypeQuery.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptTypeQuery.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptTypeQuery.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptTypeQuery.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptUnaryExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptUnaryExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptUnaryExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptUnaryExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptUndefined.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptUndefined.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptUndefined.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptUndefined.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptUnionType.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptUnionType.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptUnionType.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptUnionType.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptUpdateExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptUpdateExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptUpdateExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptUpdateExpression.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptVariableDeclaration.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptVariableDeclaration.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptVariableDeclaration.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptVariableDeclaration.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptVariableDeclarator.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptVariableDeclarator.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptVariableDeclarator.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptVariableDeclarator.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptWhileStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptWhileStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptWhileStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptWhileStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptWithStatement.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptWithStatement.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptWithStatement.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptWithStatement.class.st diff --git a/FAST-TypeScript-Model/FASTTypeScriptYieldExpression.class.st b/src/FAST-TypeScript-Model/FASTTypeScriptYieldExpression.class.st similarity index 100% rename from FAST-TypeScript-Model/FASTTypeScriptYieldExpression.class.st rename to src/FAST-TypeScript-Model/FASTTypeScriptYieldExpression.class.st diff --git a/FAST-TypeScript-Model/package.st b/src/FAST-TypeScript-Model/package.st similarity index 100% rename from FAST-TypeScript-Model/package.st rename to src/FAST-TypeScript-Model/package.st diff --git a/FAST-TypeScript-Tools/FASTTypeScriptCustomImporter.class.st b/src/FAST-TypeScript-Tools/FASTTypeScriptCustomImporter.class.st similarity index 100% rename from FAST-TypeScript-Tools/FASTTypeScriptCustomImporter.class.st rename to src/FAST-TypeScript-Tools/FASTTypeScriptCustomImporter.class.st diff --git a/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st b/src/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st similarity index 100% rename from FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st rename to src/FAST-TypeScript-Tools/FASTTypeScriptImporter.class.st diff --git a/FAST-TypeScript-Tools/FASTTypeScriptParser.class.st b/src/FAST-TypeScript-Tools/FASTTypeScriptParser.class.st similarity index 100% rename from FAST-TypeScript-Tools/FASTTypeScriptParser.class.st rename to src/FAST-TypeScript-Tools/FASTTypeScriptParser.class.st diff --git a/FAST-TypeScript-Tools/TreeRepresentation.class.st b/src/FAST-TypeScript-Tools/TreeRepresentation.class.st similarity index 100% rename from FAST-TypeScript-Tools/TreeRepresentation.class.st rename to src/FAST-TypeScript-Tools/TreeRepresentation.class.st diff --git a/FAST-TypeScript-Tools/package.st b/src/FAST-TypeScript-Tools/package.st similarity index 100% rename from FAST-TypeScript-Tools/package.st rename to src/FAST-TypeScript-Tools/package.st diff --git a/FAST-TypeScript-Visitor/FASTTypeScriptVisitor.class.st b/src/FAST-TypeScript-Visitor/FASTTypeScriptVisitor.class.st similarity index 100% rename from FAST-TypeScript-Visitor/FASTTypeScriptVisitor.class.st rename to src/FAST-TypeScript-Visitor/FASTTypeScriptVisitor.class.st diff --git a/FAST-TypeScript-Visitor/package.st b/src/FAST-TypeScript-Visitor/package.st similarity index 100% rename from FAST-TypeScript-Visitor/package.st rename to src/FAST-TypeScript-Visitor/package.st