Home
last modified time | relevance | path

Searched refs:sourceFile (Results 1 – 25 of 42) sorted by relevance

12

/arkcompiler/ets_frontend/arkguard/test/ut/utils/
DTypeUtils.spec.ts23 let sourceFile: SourceFile; variable
36 sourceFile = createSourceFile('demo.ts', fileContent, ScriptTarget.ES2015, true);
41 const newSource = TypeUtils.createNewSourceFile(sourceFile);
43 assert.strictEqual(sourceFile.statements.length, newSource.statements.length);
44 assert.notStrictEqual(sourceFile.fileName, newSource.fileName);
51 const checker = TypeUtils.createChecker(sourceFile);
DTransformUtil.spec.ts24 let sourceFile: SourceFile; variable
37 sourceFile = createSourceFile('demo.js', fileContent, ScriptTarget.ES2015, true);
42 const nameSets = collectExistNames(sourceFile);
/arkcompiler/ets_frontend/arkguard/src/utils/
DTransformUtil.ts38 export function collectExistNames(sourceFile: SourceFile): Set<string> {
49 forEachChild(sourceFile, visit);
58 export function collectIdentifiers(sourceFile: SourceFile, context: TransformationContext): Identif…
70 visit(sourceFile);
80 export function isCommentedNode(node: Node, sourceFile: SourceFile): boolean {
81 const ranges: CommentRange[] = getLeadingCommentRangesOfNode(node, sourceFile);
DSourceMapUtil.ts33 export function getSourceMapGenerator(sourceFile: string): SourceMapGenerator {
34 if (!sourceFile) {
77 …return createSourceMapGenerator(host, sourceFile, currentDirectory, currentDirectory, generatorOpt…
/arkcompiler/ets_frontend/ts2panda/tests/utils/
Dbase.ts150 let sourceFile = creatAstFromSnippet(snippet);
151 jshelpers.bindSourceFile(sourceFile, {});
158 setGlobalStrict(jshelpers.isEffectiveStrictModeSourceFile(sourceFile, compileOptions));
160 CompilerDriver.srcNode = sourceFile;
166 compilerDriver.compileUnitTest(sourceFile, literalBufferArray);
203 return (sourceFile: ts.SourceFile) => {
205 makeNameForGeneratedNode(sourceFile);
207 sourceFile = transformCommonjsModule(sourceFile);
209 jshelpers.bindSourceFile(sourceFile, {});
210 … setGlobalStrict(jshelpers.isEffectiveStrictModeSourceFile(sourceFile, compileOptions));
[all …]
Dasthelper.ts20 let sourceFile = ts.createSourceFile("snippet.ts", snippet, ts.ScriptTarget.ES2015, true);
21 return sourceFile;
28 …let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.…
29 return sourceFile;
/arkcompiler/ets_frontend/ts2panda/tests/
Dlexenv.test.ts67 let sourceFile = creatAstFromSnippet(source); variable
69 let globalScope = new GlobalScope(sourceFile);
70 let recorder = new Recorder(sourceFile, globalScope, compilerDriver, false, false, true);
77 …expect(globalScope.getBindingNode() === sourceFile, "functionblock.node should equal to sourceFile…
95 let sourceFile = creatAstFromSnippet(source); variable
97 let globalScope = new GlobalScope(sourceFile);
98 let recorder = new Recorder(sourceFile, globalScope, compilerDriver, false, false, true);
107 … expect(bindingNode, "functionblock.root should equal to sourceFile").to.be.deep.equal(sourceFile);
142 let sourceFile = creatAstFromSnippet(source); variable
144 let globalScope = new GlobalScope(sourceFile);
[all …]
/arkcompiler/ets_frontend/ts2panda/src/
Djshelpers.js42 function bindSourceFile(sourceFile, options) { argument
43 ts.bindSourceFile(sourceFile, options);
62 function getErrorSpanForNode(sourceFile, node) { argument
63 return ts.getErrorSpanForNode(sourceFile, node);
66 function getSpanOfTokenAtPosition(sourceFile, pos) { argument
67 return ts.getSpanOfTokenAtPosition(sourceFile, pos);
86 function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia) { argument
87 return ts.getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia);
Dlog.ts38 export function printAstRecursively(node: ts.Node, indentLevel: number, sourceFile: ts.SourceFile):…
49 printAstRecursively(child, indentLevel + 1, sourceFile)
Dindex.ts45 function checkIsGlobalDeclaration(sourceFile: ts.SourceFile): boolean {
46 for (let statement of sourceFile.statements) {
82 for (let sourceFile of program.getSourceFiles()) {
89 …if (sourceFile.isDeclarationFile && !program.isSourceFileDefaultLibrary(sourceFile) && originFileN…
90 setGlobalDeclare(checkIsGlobalDeclaration(sourceFile));
91 generateDTs(sourceFile, options);
392 …let sourceFile = ts.createSourceFile(fileName, fs.readFileSync(jsFileName).toString(), ts.ScriptTa…
393 let jsFileDiagnostics = watchedProgram.getSyntacticDiagnostics(sourceFile);
415 if (path.basename(node.fileName) === fileName) { node = sourceFile; }
Djshelpers.d.ts24 export function bindSourceFile(sourceFile: ts.SourceFile, options: ts.CompilerOptions);
30 export function getErrorSpanForNode(sourceFile: ts.SourceFile, node: ts.Node): ts.TextSpan;
31 export function getSpanOfTokenAtPosition(sourceFile: ts.SourceFile, pos: number): ts.TextSpan;
36 export function getSourceTextOfNodeFromSourceFile(sourceFile: ts.SourceFile, node: ts.Node, include…
/arkcompiler/ets_frontend/es2panda/compiler/core/
DcompilerContext.cpp25 … std::string sourceFile, std::string pkgName, util::StringView recordName, in CompilerContext() argument
29 …sourceFile_(sourceFile), pkgName_(pkgName), recordName_(recordName), patchFixHelper_(patchFixHelpe… in CompilerContext()
/arkcompiler/ets_frontend/arkguard/src/transformers/layout/
DDisableHilogTransformer.ts62 let sourceFile: SourceFile;
70 sourceFile = node;
101 if (isCommentedNode(child, sourceFile)) {
DSimplifyTransformer.ts66 let sourceFile: SourceFile;
74 sourceFile = node;
169 if (isCommentedNode(child, sourceFile) ||
/arkcompiler/ets_runtime/ecmascript/debugger/tests/
Dhot_reload_manager_test.cpp67 std::string sourceFile = DEBUGGER_JS_DIR "patch/index.js"; in HWTEST_F_L0() local
85 [[maybe_unused]] auto *patchExtractor = hotReloadManager->GetPatchExtractor(sourceFile); in HWTEST_F_L0()
95 EXPECT_TRUE(hotReloadManager->GetPatchExtractor(sourceFile) == nullptr); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/jspandafile/
Ddebug_info_extractor.cpp234 static const std::string sourceFile = ""; in GetSourceFile() local
239 return sourceFile; in GetSourceFile()
241 return methods_[methodId.GetOffset()].sourceFile; in GetSourceFile()
244 return iter->second.sourceFile; in GetSourceFile()
303 const char *sourceFile = ""; in ExtractorMethodDebugInfo() local
305 sourceFile = reinterpret_cast<const char *>(handler.GetFile()); in ExtractorMethodDebugInfo()
313 MethodDebugInfo methodDebugInfo = {sourceFile, sourceCode, handler.GetLineNumberTable(), in ExtractorMethodDebugInfo()
/arkcompiler/ets_runtime/ecmascript/debugger/
Djs_pt_location.h31 const std::string &sourceFile = "") : jsPandaFile_(jsPandaFile), methodId_(methodId), in jsPandaFile_()
32 bytecodeOffset_(bytecodeOffset), sourceFile_(sourceFile) in jsPandaFile_()
/arkcompiler/ets_runtime/ecmascript/dfx/stackinfo/
Djs_stackgetter.cpp98 const std::string &sourceFile = debugExtractor->GetSourceFile(methodId); in ParseMethodInfo() local
99 if (!sourceFile.empty()) { in ParseMethodInfo()
100 if (!CheckAndCopy(codeEntry.url, sizeof(codeEntry.url), sourceFile.c_str())) { in ParseMethodInfo()
239 const std::string &sourceFile = debugExtractor->GetSourceFile(methodId); in GetNativeMethodCallPos() local
241 if (sourceFile.empty()) { in GetNativeMethodCallPos()
244 tempVariable = sourceFile.c_str(); in GetNativeMethodCallPos()
/arkcompiler/toolchain/tooling/test/testcases/
Djs_local_variable_scope_test.h37 std::string sourceFile = DEBUGGER_JS_DIR "local_variable_scope.js"; in JsLocalVariableScopeTest() local
41 location_ = TestUtil::GetLocation(sourceFile.c_str(), 37, 0, pandaFile.c_str()); in JsLocalVariableScopeTest()
98 std::string sourceFile = DEBUGGER_JS_DIR "local_variable_scope.js"; in SendNotification()
103 ASSERT_EQ(parsed->GetUrl(), sourceFile); in SendNotification()
Djs_variable_second_test.h37 std::string sourceFile = DEBUGGER_JS_DIR "variable_second.js"; in JsVariableSecondTest() local
41 location_ = TestUtil::GetLocation(sourceFile.c_str(), 125, 0, panfaFile.c_str()); in JsVariableSecondTest()
97 std::string sourceFile = DEBUGGER_JS_DIR "variable_second.js"; in SendNotification()
103 ASSERT_EQ(parsed->GetUrl(), sourceFile); in SendNotification()
Djs_container_test.h37 std::string sourceFile = DEBUGGER_JS_DIR "container.js"; in JsContainerTest() local
41 location_ = TestUtil::GetLocation(sourceFile.c_str(), 348, 0, pandaFile.c_str()); in JsContainerTest()
98 std::string sourceFile = DEBUGGER_JS_DIR "container.js"; in SendNotification()
104 ASSERT_EQ(parsed->GetUrl(), sourceFile); in SendNotification()
Djs_variable_first_test.h37 std::string sourceFile = DEBUGGER_JS_DIR "variable_first.js"; in JsVariableFirstTest() local
41 location_ = TestUtil::GetLocation(sourceFile.c_str(), 269, 0, pandaFile.c_str()); in JsVariableFirstTest()
97 std::string sourceFile = DEBUGGER_JS_DIR "variable_first.js"; in SendNotification()
103 ASSERT_EQ(parsed->GetUrl(), sourceFile); in SendNotification()
/arkcompiler/ets_frontend/arkguard/src/common/
DApiExtractor.ts424 …const sourceFile: SourceFile = createSourceFile(fileName, fs.readFileSync(fileName).toString(), Sc…
429 forEachChild(sourceFile, visitChildNode);
433 forEachChild(sourceFile, visitExport);
435 forEachChild(sourceFile, visitPropertyAndName);
441 forEachChild(sourceFile, visitChildNode);
446 forEachChild(sourceFile, visitProjectExport);
447 forEachChild(sourceFile, visitProjectNode);
/arkcompiler/ets_frontend/ts2panda/tests/strictmode/
Dstrictmode.test.ts25 let sourceFile = ts.createSourceFile(
32 return sourceFile;
/arkcompiler/ets_frontend/es2panda/parser/program/
Dprogram.h128 void SetSource(const std::string &sourceCode, const std::string &sourceFile, bool isDtsFile) in SetSource() argument
131 sourceFile_ = util::UString(sourceFile, Allocator()); in SetSource()

12