/arkcompiler/ets_frontend/arkguard/src/transformers/layout/ |
D | SimplifyTransformer.ts | 104 let modifiers: ModifiersArray = undefined; 131 if (!modifiers && !child.modifiers) { 136 if (modifiers && child.modifiers && modifiers.length === child.modifiers.length) { 137 modifiers.forEach((modifier, index) => { 138 if (modifier.kind !== child.modifiers[index].kind) { 153 modifiers = child.modifiers; 160 modifiers = undefined; 184 modifiers = child.modifiers; 226 variableStatements[0].modifiers,
|
/arkcompiler/ets_frontend/ets2panda/parser/ |
D | parserImpl.cpp | 116 ir::ModifierFlags ParserImpl::GetAccessability(ir::ModifierFlags modifiers) in GetAccessability() argument 118 if ((modifiers & ir::ModifierFlags::PUBLIC) != 0) { in GetAccessability() 122 if ((modifiers & ir::ModifierFlags::PRIVATE) != 0) { in GetAccessability() 126 if ((modifiers & ir::ModifierFlags::PROTECTED) != 0) { in GetAccessability() 130 if ((modifiers & ir::ModifierFlags::INTERNAL) != 0) { in GetAccessability() 302 if (((desc->modifiers & ir::ModifierFlags::ASYNC) != 0 || desc->isGenerator) && in ValidateClassKey() 316 if ((desc->modifiers & ir::ModifierFlags::STATIC) == 0) { in ValidateClassKey() 317 if ((desc->modifiers & ir::ModifierFlags::ASYNC) != 0 || in ValidateClassKey() 332 ThrowErrorIfStaticConstructor(desc->modifiers); in ValidateClassKey() 333 } else if (propNameStr.Is("prototype") && (desc->modifiers & ir::ModifierFlags::STATIC) != 0) { in ValidateClassKey() [all …]
|
D | ETSparser.h | 150 ir::ClassDefinitionModifiers modifiers, 152 ir::MethodDefinition *ParseInterfaceGetterSetterMethod(ir::ModifierFlags modifiers); 154 …ement *ParseTypeDeclarationAbstractFinal(bool allowStatic, ir::ClassDefinitionModifiers modifiers); 165 …thodDefinition *ParseClassMethodDefinition(ir::Identifier *methodName, ir::ModifierFlags modifiers, 178 void ParseClassFieldDefinition(ir::Identifier *fieldName, ir::ModifierFlags modifiers, 250 ir::Identifier *ParseClassIdent(ir::ClassDefinitionModifiers modifiers) override; 252 …claration *ParseClassStatement(StatementParsingFlags flags, ir::ClassDefinitionModifiers modifiers, 255 …laration *ParseStructStatement(StatementParsingFlags flags, ir::ClassDefinitionModifiers modifiers, 258 …eClassElement(const ArenaVector<ir::AstNode *> &properties, ir::ClassDefinitionModifiers modifiers, 265 …arseInnerRest(const ArenaVector<ir::AstNode *> &properties, ir::ClassDefinitionModifiers modifiers, [all …]
|
D | parserImpl.h | 118 ir::ModifierFlags modifiers {}; 361 ir::ClassDefinitionModifiers modifiers, 365 ir::ClassDefinitionModifiers modifiers, 380 ir::MethodDefinition *BuildImplicitConstructor(ir::ClassDefinitionModifiers modifiers, 384 ir::ClassDefinitionModifiers modifiers, 393 ir::ModifierFlags GetAccessability(ir::ModifierFlags modifiers); 409 ir::ETSStructDeclaration *ParseStructDeclaration(ir::ClassDefinitionModifiers modifiers, 411 ir::ClassDeclaration *ParseClassDeclaration(ir::ClassDefinitionModifiers modifiers, 448 virtual ir::ClassDefinition *ParseClassDefinition(ir::ClassDefinitionModifiers modifiers, 450 virtual ir::Identifier *ParseClassIdent(ir::ClassDefinitionModifiers modifiers); [all …]
|
D | ETSparser.cpp | 1310 void ETSParser::ParseClassFieldDefinition(ir::Identifier *fieldName, ir::ModifierFlags modifiers, in ParseClassFieldDefinition() argument 1334 …if (initFunction != nullptr && (modifiers & ir::ModifierFlags::CONST) == 0U && initializer != null… in ParseClassFieldDefinition() 1339 bool isDeclare = (modifiers & ir::ModifierFlags::DECLARE) != 0; in ParseClassFieldDefinition() 1344 …auto *field = AllocNode<ir::ClassProperty>(fieldName, initializer, typeAnnotation, modifiers, Allo… in ParseClassFieldDefinition() 1359 ParseClassFieldDefinition(nextName, modifiers, declarations); in ParseClassFieldDefinition() 1394 …ion *ETSParser::ParseClassMethodDefinition(ir::Identifier *methodName, ir::ModifierFlags modifiers, in ParseClassMethodDefinition() argument 1405 if ((modifiers & ir::ModifierFlags::CONSTRUCTOR) != 0) { in ParseClassMethodDefinition() 1410 if ((modifiers & ir::ModifierFlags::ASYNC) != 0) { in ParseClassMethodDefinition() 1414 if ((modifiers & ir::ModifierFlags::STATIC) == 0) { in ParseClassMethodDefinition() 1422 func->AddModifier(modifiers); in ParseClassMethodDefinition() [all …]
|
D | TypedParser.cpp | 844 ir::ClassDefinition *TypedParser::ParseClassDefinition(ir::ClassDefinitionModifiers modifiers, ir::… in ParseClassDefinition() argument 848 ir::Identifier *identNode = ParseClassIdent(modifiers); in ParseClassDefinition() 862 modifiers |= ir::ClassDefinitionModifiers::HAS_SUPER; in ParseClassDefinition() 875 auto [ctor, properties, bodyRange] = ParseClassBody(modifiers, flags); in ParseClassDefinition() 883 std::move(properties), modifiers, flags, GetContext().GetLanguge()); in ParseClassDefinition() 892 … ir::ClassDefinitionModifiers modifiers, ir::ModifierFlags flags, in ParseClassElement() argument 904 desc.hasSuperClass = (modifiers & ir::ClassDefinitionModifiers::HAS_SUPER) != 0; in ParseClassElement() 909 desc.modifiers = ParseModifiers(); in ParseClassElement() 911 …if (((desc.modifiers & ir::ModifierFlags::ABSTRACT) != 0) && ((flags & ir::ModifierFlags::ABSTRACT… in ParseClassElement() 919 if ((desc.modifiers & ir::ModifierFlags::STATIC) == 0) { in ParseClassElement() [all …]
|
/arkcompiler/ets_frontend/ts2panda/src/base/ |
D | typeSystem.ts | 313 if (node.modifiers) { 314 for (let modifier of node.modifiers) { 349 if (member.modifiers) { 350 for (let modifier of member.modifiers) { 400 if (member.modifiers) { 401 for (let modifier of member.modifiers) { 534 modifiers: number = 0; // 0 -> non-static, 4 -> static, 8 -> async, 16-> asterisk property in FunctionType 571 if (node.modifiers) { 572 for (let modifier of node.modifiers) { 583 this.modifiers = MethodModifier.STATIC; [all …]
|
D | util.ts | 56 if (node.modifiers) { 57 node.modifiers.forEach((mod) => { 69 if (node.modifiers) { 70 node.modifiers.forEach((mod) => { 387 if (!node.modifiers) { 390 for (let modifier of node.modifiers) {
|
/arkcompiler/ets_frontend/ets2panda/ir/base/ |
D | classDefinition.h | 63 … Expression *superClass, ArenaVector<AstNode *> &&body, ClassDefinitionModifiers modifiers, in DEFINE_BITOPS() 74 modifiers_(modifiers), in DEFINE_BITOPS() 80 ClassDefinitionModifiers modifiers, Language lang) in DEFINE_BITOPS() 85 modifiers_(modifiers), in DEFINE_BITOPS() 90 …t ClassDefinition(ArenaAllocator *allocator, Identifier *ident, ClassDefinitionModifiers modifiers, in DEFINE_BITOPS() 96 modifiers_(modifiers), in DEFINE_BITOPS()
|
D | classElement.h | 33 … ModifierFlags const modifiers, ArenaAllocator *const allocator, bool const isComputed) in ClassElement() argument 34 : TypedStatement(elementType, modifiers), in ClassElement()
|
D | classProperty.h | 38 … ModifierFlags const modifiers, ArenaAllocator *const allocator, bool const isComputed) in ClassProperty() argument 39 : ClassElement(AstNodeType::CLASS_PROPERTY, key, value, modifiers, allocator, isComputed), in ClassProperty()
|
D | methodDefinition.h | 43 … ModifierFlags const modifiers, ArenaAllocator *const allocator, bool const isComputed) in MethodDefinition() argument 44 … : ClassElement(AstNodeType::METHOD_DEFINITION, key, value, modifiers, allocator, isComputed), in MethodDefinition()
|
/arkcompiler/runtime_core/static_core/plugins/ets/tools/declgen_ts2ets/src/ |
D | ASTTransformer.ts | 245 node.modifiers, 279 node.modifiers, 311 node.modifiers, 411 node.modifiers, 465 node.modifiers, 496 node.modifiers, 536 node.modifiers, 623 s.modifiers, 640 s.modifiers, 680 node.modifiers, [all …]
|
/arkcompiler/ets_frontend/arkguard/src/utils/ |
D | NodeUtils.ts | 158 const modifiers = getModifiers(node.parent); constant 159 …if (!modifiers || modifiers.length === 0 || !modifiers.find(modifier => isParameterPropertyModifie…
|
D | OhsUtil.ts | 295 const modifiers = getModifiers(parameter); constant 296 if (isParameter(parameter) && modifiers && modifiers.length > 0) { 298 …let hasParameterPropertyModifier = modifiers.find(modifier => isParameterPropertyModifier(modifier…
|
/arkcompiler/ets_frontend/arkguard/src/common/ |
D | ApiExtractor.ts | 91 const getKeyword = function (modifiers: ModifiersArray): KeywordInfo { 92 if (modifiers === undefined) { 99 for (const modifier of modifiers) { 126 let {hasExport, hasDeclare} = getKeyword(astNode.modifiers); 158 let {hasDeclare} = getKeyword(astNode.modifiers); 198 const modifiers = getModifiers(param); 199 if (!modifiers || modifiers.length <= 0) { 203 const findRet = modifiers.find(modifier => isParameterPropertyModifier(modifier)); 373 let {hasExport} = getKeyword(astNode.modifiers);
|
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/09.classes/04.access_modifiers/ |
D | access_modifiers.ets | 16 {% for mod in modifiers %} 19 desc: Access modifiers.
|
/arkcompiler/ets_frontend/es2panda/ir/base/ |
D | classProperty.h | 37 …ssProperty(Expression *key, Expression *value, Expression *typeAnnotation, ModifierFlags modifiers, in ClassProperty() argument 43 modifiers_(modifiers), in ClassProperty()
|
D | methodDefinition.h | 45 … ModifierFlags modifiers, ArenaAllocator *allocator, ArenaVector<Decorator *> &&decorators, in MethodDefinition() argument 51 modifiers_(modifiers), in MethodDefinition()
|
/arkcompiler/ets_frontend/ets2panda/test/parser/ets/ |
D | access_modifier_4-expected.txt | 1 SyntaxError: Access modifier must precede field and method modifiers. [access_modifier_4.ets:17:12]
|
D | access_modifier_1-expected.txt | 1 SyntaxError: Access modifier must precede field and method modifiers. [access_modifier_1.ets:17:11]
|
D | struct_invalid_abstract-expected.txt | 1 SyntaxError: struct declaration is not allowed to use 'abstract' modifiers. [struct_invalid_abstrac…
|
/arkcompiler/ets_frontend/arkguard/src/transformers/rename/ |
D | RenameFileNameTransformer.ts | 145 …return factory.updateImportDeclaration(node, node.modifiers, node.importClause, mangledModuleSpeci… 147 …return factory.updateExportDeclaration(node, node.modifiers, node.isTypeOnly, node.exportClause, m… 307 …return factory.updateStructDeclaration(node, node.modifiers, node.name, node.typeParameters, node.…
|
/arkcompiler/ets_frontend/es2panda/parser/ |
D | parserImpl.cpp | 2014 static ir::ModifierFlags GetAccessability(ir::ModifierFlags modifiers) in GetAccessability() argument 2016 if (modifiers & ir::ModifierFlags::PUBLIC) { in GetAccessability() 2020 if (modifiers & ir::ModifierFlags::PRIVATE) { in GetAccessability() 2024 if (modifiers & ir::ModifierFlags::PROTECTED) { in GetAccessability() 2277 if ((desc->modifiers & ir::ModifierFlags::ASYNC) && in ValidateClassKey() 2283 if (desc->modifiers & ir::ModifierFlags::ACCESS) { in ValidateClassKey() 2287 if (desc->modifiers & ir::ModifierFlags::DECLARE) { in ValidateClassKey() 2291 if (desc->modifiers & ir::ModifierFlags::ABSTRACT) { in ValidateClassKey() 2305 if (!(desc->modifiers & ir::ModifierFlags::STATIC)) { in ValidateClassKey() 2306 …if ((desc->modifiers & ir::ModifierFlags::ASYNC) || desc->methodKind == ir::MethodDefinitionKind::… in ValidateClassKey() [all …]
|
/arkcompiler/ets_frontend/ets2panda/linter-4.2/src/ |
D | Autofixer.ts | 83 modifiers: readonly ts.Modifier[] | undefined): Autofix { 85 …modifiers, undefined, params, retType, ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken… 116 let newExportDecl = ts.factory.createExportDeclaration(undefined, impExpNode.modifiers, false,
|