Home
last modified time | relevance | path

Searched refs:SyntaxKind (Results 1 – 25 of 61) sorted by relevance

123

/arkcompiler/ets_frontend/ets2panda/linter/src/
DTypeScriptLinterConfig.ts35 const keys = Object.keys(ts.SyntaxKind);
36 const values = Object.values(ts.SyntaxKind);
48 static terminalTokens: Set<ts.SyntaxKind> = new Set([
49 ts.SyntaxKind.OpenBraceToken, ts.SyntaxKind.CloseBraceToken, ts.SyntaxKind.OpenParenToken,
50 ts.SyntaxKind.CloseParenToken, ts.SyntaxKind.OpenBracketToken, ts.SyntaxKind.CloseBracketToken,
51 …ts.SyntaxKind.DotToken, ts.SyntaxKind.DotDotDotToken, ts.SyntaxKind.SemicolonToken, ts.SyntaxKind.…
52 ts.SyntaxKind.QuestionDotToken, ts.SyntaxKind.LessThanToken, ts.SyntaxKind.LessThanSlashToken,
53 …ts.SyntaxKind.GreaterThanToken, ts.SyntaxKind.LessThanEqualsToken, ts.SyntaxKind.GreaterThanEquals…
54 …ts.SyntaxKind.EqualsEqualsToken, ts.SyntaxKind.ExclamationEqualsToken, ts.SyntaxKind.EqualsEqualsE…
55 …ts.SyntaxKind.ExclamationEqualsEqualsToken, ts.SyntaxKind.EqualsGreaterThanToken, ts.SyntaxKind.Pl…
[all …]
DTypeScriptLinter.ts121 [ts.SyntaxKind.ObjectLiteralExpression, this.handleObjectLiteralExpression],
122 [ts.SyntaxKind.ArrayLiteralExpression, this.handleArrayLiteralExpression],
123 [ts.SyntaxKind.Parameter, this.handleParameter],
124 [ts.SyntaxKind.EnumDeclaration, this.handleEnumDeclaration],
125 [ts.SyntaxKind.InterfaceDeclaration, this.handleInterfaceDeclaration],
126 [ts.SyntaxKind.ThrowStatement, this.handleThrowStatement],
127 [ts.SyntaxKind.ImportClause, this.handleImportClause],
128 [ts.SyntaxKind.ForStatement, this.handleForStatement],
129 [ts.SyntaxKind.ForInStatement, this.handleForInStatement],
130 [ts.SyntaxKind.ForOfStatement, this.handleForOfStatement],
[all …]
/arkcompiler/ets_frontend/ts2panda/src/
DsyntaxCheckHelper.ts34 return node.kind === ts.SyntaxKind.NewExpression || node.kind === ts.SyntaxKind.CallExpression;
77 export function isLeftHandSideExpressionKind(kind: ts.SyntaxKind): boolean {
79 case ts.SyntaxKind.NumericLiteral:
80 case ts.SyntaxKind.BigIntLiteral:
81 case ts.SyntaxKind.StringLiteral:
82 case ts.SyntaxKind.RegularExpressionLiteral:
83 case ts.SyntaxKind.NoSubstitutionTemplateLiteral:
84 case ts.SyntaxKind.Identifier:
85 case ts.SyntaxKind.FalseKeyword:
86 case ts.SyntaxKind.ImportKeyword:
[all …]
DtypeChecker.ts90 if (modifier.kind === ts.SyntaxKind.ExportKeyword) {
101 if (modifier.kind === ts.SyntaxKind.DeclareKeyword) {
111 case ts.SyntaxKind.Identifier:
113 case ts.SyntaxKind.NewExpression:
116 if (expression.kind === ts.SyntaxKind.ClassExpression) {
120 case ts.SyntaxKind.ClassExpression:
122 case ts.SyntaxKind.PropertyAccessExpression:
181 case ts.SyntaxKind.ClassDeclaration:
182 case ts.SyntaxKind.ClassExpression:
184 case ts.SyntaxKind.ImportSpecifier:
[all …]
Dcompiler.ts166 if (this.rootNode.kind === ts.SyntaxKind.SourceFile) {
242 if (stmt.kind === ts.SyntaxKind.ReturnStatement) {
261 if (body.kind === ts.SyntaxKind.Block) {
265 } else if (kind === ts.SyntaxKind.ArrowFunction) {
316 ts.SyntaxKind.EqualsEqualsEqualsToken,
337 if (decl.modifiers[i].kind === ts.SyntaxKind.AsyncKeyword) {
367 if (decl.kind === ts.SyntaxKind.FunctionExpression) {
391 case ts.SyntaxKind.Block: // line 273
394 case ts.SyntaxKind.EmptyStatement: // line 274
396 case ts.SyntaxKind.VariableStatement: // line 275
[all …]
DsyntaxCheckerForStrcitMode.ts112 case ts.SyntaxKind.ParenthesizedExpression: {
235 case ts.SyntaxKind.NumericLiteral:
238 case ts.SyntaxKind.StringLiteral:
241 case ts.SyntaxKind.FunctionDeclaration:
244 case ts.SyntaxKind.FunctionExpression:
249 case ts.SyntaxKind.SetAccessor:
250 case ts.SyntaxKind.ArrowFunction:
253 case ts.SyntaxKind.ClassDeclaration:
256 case ts.SyntaxKind.VariableDeclaration:
260 case ts.SyntaxKind.BindingElement:
[all …]
DsyntaxChecker.ts78 …if ((node.kind === ts.SyntaxKind.Block) && (node.parent != undefined && node.parent.kind === ts.Sy…
265 if (decl.node.kind === ts.SyntaxKind.FunctionDeclaration) {
287 case ts.SyntaxKind.SwitchStatement: {
288 if (node.kind === ts.SyntaxKind.BreakStatement && !node.label) {
294 case ts.SyntaxKind.LabeledStatement: {
299 if (node.kind === ts.SyntaxKind.ContinueStatement &&
328 if (node.kind === ts.SyntaxKind.BreakStatement) {
334 if (node.kind === ts.SyntaxKind.BreakStatement) {
356 case ts.SyntaxKind.NewKeyword: {
378 case ts.SyntaxKind.ImportKeyword: {
[all …]
Dpandagen.ts27 SyntaxKind
275 if (node.modifiers[i].kind === ts.SyntaxKind.AsyncKeyword) {
820 …this.condition(node, ts.SyntaxKind.EqualsEqualsToken, getVregisterCache(this, CacheList.UNDEFINED)…
825 …this.condition(node, ts.SyntaxKind.ExclamationEqualsToken, getVregisterCache(this, CacheList.UNDEF…
906 condition(node: ts.Node, op: SyntaxKind, lhs: VReg, ifFalse: Label): void {
909 case SyntaxKind.LessThanToken: // line 57
913 case SyntaxKind.GreaterThanToken: // line 59
917 case SyntaxKind.LessThanEqualsToken: // line 60
921 case SyntaxKind.GreaterThanEqualsToken: // line 61
925 case SyntaxKind.EqualsEqualsToken: // line 62
[all …]
Drecorder.ts119 case ts.SyntaxKind.FunctionExpression:
120 case ts.SyntaxKind.MethodDeclaration:
121 case ts.SyntaxKind.Constructor:
122 case ts.SyntaxKind.GetAccessor:
123 case ts.SyntaxKind.SetAccessor:
124 case ts.SyntaxKind.ArrowFunction: {
130 case ts.SyntaxKind.FunctionDeclaration: {
150 case ts.SyntaxKind.Block:
151 case ts.SyntaxKind.IfStatement:
152 case ts.SyntaxKind.SwitchStatement:
[all …]
Dastutils.ts20 if (decl.parent.kind === ts.SyntaxKind.VariableDeclarationList) {
29 } else if (decl.parent.kind === ts.SyntaxKind.CatchClause) {
32 …throw new Error("VariableDeclaration inside " + ts.SyntaxKind[decl.parent] + " is not implemented"…
DlexicalBinder.ts53 case ts.SyntaxKind.Identifier: { // 79
61 case ts.SyntaxKind.SuperKeyword: {
81 case ts.SyntaxKind.ThisKeyword: { // 108
92 case ts.SyntaxKind.Constructor: { // 169
109 case ts.SyntaxKind.ArrowFunction: { //212
114 case ts.SyntaxKind.MetaProperty: { // 229
DstrictMode.ts24 if (node.kind === ts.SyntaxKind.SourceFile) {
29 if (decl.body.kind === ts.SyntaxKind.Block) {
65 while (node && node.parent && node.parent.kind != ts.SyntaxKind.SourceFile) {
/arkcompiler/ets_frontend/ets2panda/linter-4.2/src/
DTypeScriptLinterConfig.ts127 const keys = Object.keys(ts.SyntaxKind);
128 const values = Object.values(ts.SyntaxKind);
140 static terminalTokens: Set<ts.SyntaxKind> = new Set([
141 ts.SyntaxKind.OpenBraceToken, ts.SyntaxKind.CloseBraceToken, ts.SyntaxKind.OpenParenToken,
142 ts.SyntaxKind.CloseParenToken, ts.SyntaxKind.OpenBracketToken, ts.SyntaxKind.CloseBracketToken,
143 …ts.SyntaxKind.DotToken, ts.SyntaxKind.DotDotDotToken, ts.SyntaxKind.SemicolonToken, ts.SyntaxKind.…
144 ts.SyntaxKind.QuestionDotToken, ts.SyntaxKind.LessThanToken, ts.SyntaxKind.LessThanSlashToken,
145 …ts.SyntaxKind.GreaterThanToken, ts.SyntaxKind.LessThanEqualsToken, ts.SyntaxKind.GreaterThanEquals…
146 …ts.SyntaxKind.EqualsEqualsToken, ts.SyntaxKind.ExclamationEqualsToken, ts.SyntaxKind.EqualsEqualsE…
147 …ts.SyntaxKind.ExclamationEqualsEqualsToken, ts.SyntaxKind.EqualsGreaterThanToken, ts.SyntaxKind.Pl…
[all …]
DTypeScriptLinter.ts95 [ts.SyntaxKind.ObjectLiteralExpression, this.handleObjectLiteralExpression],
96 [ts.SyntaxKind.ArrayLiteralExpression, this.handleArrayLiteralExpression],
97 [ts.SyntaxKind.Parameter, this.handleParameter],
98 [ts.SyntaxKind.EnumDeclaration, this.handleEnumDeclaration],
99 [ts.SyntaxKind.InterfaceDeclaration, this.handleInterfaceDeclaration],
100 [ts.SyntaxKind.ThrowStatement, this.handleThrowStatement],
101 [ts.SyntaxKind.ImportClause, this.handleImportClause],
102 [ts.SyntaxKind.ForStatement, this.handleForStatement],
103 [ts.SyntaxKind.ForInStatement, this.handleForInStatement],
104 [ts.SyntaxKind.ForOfStatement, this.handleForOfStatement],
[all …]
DUtils.ts95 …return tsBinOp.kind >= ts.SyntaxKind.FirstAssignment && tsBinOp.kind <= ts.SyntaxKind.LastAssignme…
387 if (node.kind === ts.SyntaxKind.IfStatement)
487 private isTypeDeclSyntaxKind(kind: ts.SyntaxKind) {
489 kind === ts.SyntaxKind.EnumDeclaration ||
490 kind === ts.SyntaxKind.ClassDeclaration ||
491 kind === ts.SyntaxKind.InterfaceDeclaration ||
492 kind === ts.SyntaxKind.TypeAliasDeclaration;
495 public symbolHasDuplicateName(symbol: ts.Symbol, tsDeclKind: ts.SyntaxKind): boolean {
505 (this.isTypeDeclSyntaxKind(declKind) && tsDeclKind === ts.SyntaxKind.ModuleDeclaration) ||
506 (this.isTypeDeclSyntaxKind(tsDeclKind) && declKind === ts.SyntaxKind.ModuleDeclaration)
[all …]
/arkcompiler/ets_frontend/arkguard/src/transformers/layout/
DSimplifyTransformer.ts24 SyntaxKind,
105 let preType: SyntaxKind | undefined = undefined;
113 if (preType === SyntaxKind.VariableStatement) {
118 if (preType === SyntaxKind.ExpressionStatement) {
123 … function doMerge(currentType: SyntaxKind | undefined, childArg: Statement | undefined): void {
125 if (preType !== SyntaxKind.VariableStatement) {
158 if (preType === SyntaxKind.VariableStatement) {
162 } else if (preType === SyntaxKind.ExpressionStatement) {
181 doMerge(SyntaxKind.VariableStatement, child);
189 doMerge(SyntaxKind.ExpressionStatement, child);
[all …]
/arkcompiler/ets_frontend/ets2panda/linter/src/utils/
DTsUtils.ts120 if (node.kind === ts.SyntaxKind.IfStatement)
220 private isTypeDeclSyntaxKind(kind: ts.SyntaxKind) {
222 kind === ts.SyntaxKind.EnumDeclaration ||
223 kind === ts.SyntaxKind.ClassDeclaration ||
224 kind === ts.SyntaxKind.InterfaceDeclaration ||
225 kind === ts.SyntaxKind.TypeAliasDeclaration;
228 public symbolHasDuplicateName(symbol: ts.Symbol, tsDeclKind: ts.SyntaxKind): boolean {
238 (this.isTypeDeclSyntaxKind(declKind) && tsDeclKind === ts.SyntaxKind.ModuleDeclaration) ||
239 (this.isTypeDeclSyntaxKind(tsDeclKind) && declKind === ts.SyntaxKind.ModuleDeclaration)
243 …if (declKind !== ts.SyntaxKind.Identifier && declKind !== tsDeclKind && !isNamespaceTypeCollision)…
[all …]
/arkcompiler/ets_frontend/ts2panda/src/base/
Dproperties.ts124 case ts.SyntaxKind.PropertyAssignment: {
125 if (property.name.kind === ts.SyntaxKind.ComputedPropertyName) {
148 case ts.SyntaxKind.ShorthandPropertyAssignment: {
154 case ts.SyntaxKind.SpreadAssignment: {
158 case ts.SyntaxKind.MethodDeclaration: {
167 case ts.SyntaxKind.GetAccessor:
168 case ts.SyntaxKind.SetAccessor: {
236 case ts.SyntaxKind.StringLiteral:
237 case ts.SyntaxKind.NumericLiteral:
238 case ts.SyntaxKind.NullKeyword:
[all …]
DtypeSystem.ts316 case ts.SyntaxKind.AbstractKeyword: {
352 case ts.SyntaxKind.StaticKeyword: {
356 case ts.SyntaxKind.PrivateKeyword: {
360 case ts.SyntaxKind.ProtectedKeyword: {
364 case ts.SyntaxKind.ReadonlyKeyword: {
402 if (modifier.kind == ts.SyntaxKind.StaticKeyword) {
434 case ts.SyntaxKind.MethodDeclaration:
435 case ts.SyntaxKind.Constructor:
436 case ts.SyntaxKind.GetAccessor:
437 case ts.SyntaxKind.SetAccessor: {
[all …]
/arkcompiler/ets_frontend/arkguard/src/utils/
DScopeAnalyzer.ts26 SyntaxKind
404 case SyntaxKind.SourceFile:
409 case SyntaxKind.ModuleDeclaration:
414 case SyntaxKind.FunctionDeclaration:
415 case SyntaxKind.MethodDeclaration:
416 case SyntaxKind.GetAccessor:
417 case SyntaxKind.SetAccessor:
418 case SyntaxKind.Constructor:
419 case SyntaxKind.FunctionExpression:
420 case SyntaxKind.ArrowFunction:
[all …]
/arkcompiler/ets_frontend/ts2panda/src/expression/
DarrayLiteralExpression.ts133 case ts.SyntaxKind.FalseKeyword:
136 case ts.SyntaxKind.TrueKeyword:
139 case ts.SyntaxKind.StringLiteral:
142 case ts.SyntaxKind.NumericLiteral: {
151 case ts.SyntaxKind.NullKeyword:
172 pandaGen.unary(element, ts.SyntaxKind.PlusPlusToken, indexReg);
DcallExpression.ts32 if (innerExpression.kind === ts.SyntaxKind.ImportKeyword) {
45 if (innerExpression.kind === ts.SyntaxKind.SuperKeyword) {
72 …cessExpression | ts.ElementAccessExpression>expr).expression.kind === ts.SyntaxKind.SuperKeyword) {
122 case ts.SyntaxKind.ElementAccessExpression: {
126 case ts.SyntaxKind.PropertyAccessExpression: {
/arkcompiler/ets_frontend/ets2panda/linter/src/utils/functions/
DisAssignmentOperator.ts19 …return tsBinOp.kind >= ts.SyntaxKind.FirstAssignment && tsBinOp.kind <= ts.SyntaxKind.LastAssignme…
/arkcompiler/ets_frontend/ts2panda/src/statement/
DreturnStatement.ts46 if (ts.isCallExpression(expr) && expr.expression.kind === ts.SyntaxKind.SuperKeyword) {
52 if (expr.kind === ts.SyntaxKind.ThisKeyword) {
56 …pandaGen.binary(stmt, ts.SyntaxKind.EqualsEqualsEqualsToken, getVregisterCache(pandaGen, CacheList…
64 …pandaGen.condition(stmt, ts.SyntaxKind.ExclamationEqualsEqualsToken, getVregisterCache(pandaGen, C…
92 …pandaGen.condition(stmt, ts.SyntaxKind.ExclamationEqualsEqualsToken, getVregisterCache(pandaGen, C…
/arkcompiler/ets_frontend/ts2panda/src/function/
DgeneratorFunctionBuilder.ts115 pandaGen.condition(expr, ts.SyntaxKind.EqualsEqualsToken, modeType, callreturnLabel);
124 pandaGen.condition(expr, ts.SyntaxKind.EqualsEqualsToken, modeType, callthrowLabel);
130 …pandaGen.condition(expr, ts.SyntaxKind.ExclamationEqualsEqualsToken, getVregisterCache(pandaGen, C…
154 …pandaGen.condition(expr, ts.SyntaxKind.ExclamationEqualsEqualsToken, getVregisterCache(pandaGen, C…
166 …pandaGen.condition(expr, ts.SyntaxKind.ExclamationEqualsEqualsToken, getVregisterCache(pandaGen, C…
204 pandaGen.condition(expr, ts.SyntaxKind.EqualsEqualsToken, modeType, outputLabel);
233 pandaGen.condition(node, ts.SyntaxKind.EqualsEqualsToken, modeType, notRetLabel);
252 pandaGen.condition(node, ts.SyntaxKind.EqualsEqualsToken, modeType, notThrowLabel);

123