Home
last modified time | relevance | path

Searched refs:re (Results 1 – 25 of 27) sorted by relevance

12

/napi_generator/test/unittest/
Dgenerate.test.js19 const re = require(genDir + "/tools/re"); constant
218 retJsToC = re.replaceAll(retJsToC, "len[0-9]*", "len");
219 retJsToC = re.replaceAll(retJsToC, "i[0-9]*", "i");
220 retJsToC = re.replaceAll(retJsToC, "tt[0-9]*", "tt");
224 retJsToC1 = re.replaceAll(retJsToC1, "len[0-9]*", "len");
225 retJsToC1 = re.replaceAll(retJsToC1, "i[0-9]*", "i");
226 retJsToC1 = re.replaceAll(retJsToC1, "tt[0-9]*", "tt");
230 retJsToC2 = re.replaceAll(retJsToC2, "len[0-9]*", "len");
231 retJsToC2 = re.replaceAll(retJsToC2, "i[0-9]*", "i");
233 retJsToC2 = re.replaceAll(retJsToC2, retQiepian, "tt");
[all …]
Danalyze.test.js16 const re = require(genDir + "tools/re"); constant
241 let matchs = re.match(" *\n*", data)
259 let matchs = re.match(" *\n*", data)
279 let matchs = re.match(" *\n*", data)
297 let matchs = re.match(" *\n*", data)
/napi_generator/src/gen/analyze/
Denum.js16 const re = require("../tools/re"); constant
20 let body = re.replaceAll(data, "\n", "").split(",")
43 let regString = re.match(" *([a-zA-Z0-9_]+) * = *\"([\x21-\x7e]+)*\"", bodyContent)
44 let regSingleQuotes = re.match(" *([a-zA-Z0-9_]+) * = *'([\x21-\x7e]+)*'", bodyContent)
45 let regNumber = re.match(" *([a-zA-Z0-9_]+) * = *([a-zA-Z_0-9<>-]+)", bodyContent)
46 let reg = re.match(" *([a-zA-Z0-9_]+) *", bodyContent)
48 let elementName = re.getReg(bodyContent, regString.regs[1])
49 let elementValue = re.getReg(bodyContent, regString.regs[2])
57 let elementName = re.getReg(bodyContent, regSingleQuotes.regs[1])
58 let elementValue = re.getReg(bodyContent, regSingleQuotes.regs[2])
[all …]
Dnamespace.js15 const re = require("../tools/re"); constant
38 let matchs = re.match(" *\n*", data)
76 matchs = re.match("(export )*namespace ([a-zA-Z0-9]+) ({)", data)
78 let namespaceName = re.getReg(data, matchs.regs[2])
93 matchs = re.match(
104 matchs = re.match("(export )*enum *([A-Za-z_0-9]+) *({)", data)
106 let enumName = re.getReg(data, matchs.regs[2]);
117 matchs = re.match("(export )*const ([A-Za-z_0-9]+) *[:=]{1} ([A-Za-z_0-9]+);", data)
119 let constName = re.getReg(data, matchs.regs[1])
122 body: re.getReg(data, matchs.regs[2])
[all …]
Dclass.js15 const re = require("../tools/re"); constant
23 let body = re.replaceAll(data, "\n", "").split(";")
40 let matcher = re.match(" *([a-zA-Z0-9_]+) *: *([a-zA-Z_0-9<>]+)", classBody)
42 let valueName = re.getReg(classBody, matcher.regs[1])
43 let valueType = re.getReg(classBody, matcher.regs[2])
53 matcher = re.match(rules, classBody)
56 re.getReg(classBody, matcher.regs[1]) != '', re.getReg(classBody, matcher.regs[2]),
57 re.getReg(classBody, matcher.regs[3]), re.getReg(classBody, matcher.regs[4]))
Dinterface.js15 const re = require("../tools/re"); constant
22 valueType = re.replaceAll(valueType, " ", "")
23 …let matchs = re.match("{([A-Za-z0-9_]+:[A-Za-z0-9_,;]+)([A-Za-z0-9_]+:[A-Za-z0-9_]+)}$", valueType)
28 interfaceBody = re.replaceAll(interfaceBody, ",", ";")
50 body = re.replaceAll(body, "\n", "").split(";")
62 let tt = re.match(" *([a-zA-Z0-9_]+) *: *([a-zA-Z_0-9<>,:{}[\\]| ]+)", t)
64 let valueName = re.getReg(t, tt.regs[1])
65 let valueType = re.getReg(t, tt.regs[2])
77 … tt = re.match("(static )* *(\\$*[A-Za-z0-9_]+) *[:]? *\\(([\n 'a-zA-Z:;=,_0-9?<>{}|[\\]]*)\\)"
80 … let funcDetail = analyzeFunction(data, re.getReg(t, tt.regs[1]) != '', re.getReg(t, tt.regs[2]),
[all …]
Dfunction.js15 const re = require("../tools/re"); constant
24 let body = re.replaceAll(data, "\n", "").split(";")// # replace(" ", "").
39 let tt = re.match(" *([a-zA-Z0-9_]+) *: *([a-zA-Z_0-9<>,:{}[\\] ]+)", t)
42 let valueName = re.getReg(t, tt.regs[1])
43 let valueType = re.getReg(t, tt.regs[2])
59 let arrayType = re.match("(Async)*Callback<(Array<([a-zA-Z_0-9]+)>)>", v["type"])
62 parameter = re.getReg(v["type"], arrayType.regs[2])
77 …let interfaceType = re.match("{([A-Za-z0-9_]+:[A-Za-z0-9_,]+)([A-Za-z0-9_]+:[A-Za-z0-9_]+)}$", v["…
89 values = re.replaceAll(re.replaceAll(values, " ", ""), "\n", "")
93 let matchs = re.match(matchNoName, values)
[all …]
Dparams.js15 const re = require("../tools/re"); constant
30 let matchs = re.match("([a-zA-Z_0-9\\.]+)(\\?*): *([a-zA-Z<,>|_0-9\\[\\]\\(\\):='{}]+)", v)
32 let type = re.getReg(v, matchs.regs[3])
37 let optionalFlag = re.getReg(v, matchs.regs[2]) == '?' ? true : false;
48 … result.push({ "name": re.getReg(v, matchs.regs[1]), "type": type , "optional": optionalFlag})
Dreturn.js15 const re = require("../tools/re"); constant
/napi_generator/src/gen/
Danalyze.js15 const re = require("./tools/re"); constant
45 …let matchImport = re.search("import ([{}A-Za-z ,]+) from [\"']{1}([@_./a-zA-Z]+)[\"']{1};*", data);
47 result.imports.push(re.getReg(data, matchImport.regs[0]))
48 data = re.removeReg(data, matchImport.regs[0]);
63 let matchs = re.match(" *\n*", data)
66 matchs = re.match("export default ([a-zA-Z_]+);", data);
68 let exportName = re.getReg(data, matchs.regs[1])
69 data = re.removeReg(data, matchs.regs[0]);
102 matchs = re.match("declare namespace ([a-zA-Z_0-9]+) *({)", data);
105 let namespaceName = re.getReg(data, matchs.regs[1])
[all …]
Dmain.js18 const re = require("./tools/re"); constant
24 let fn = re.getFileInPath(ifname);
25 let tt = re.match('@ohos.([.a-z_A-Z0-9]+).d.ts', fn);
27 let moduleName = re.getReg(fn, tt.regs[1]);
43 let importSearch = re.search("([.,/a-zA-Z {}']+from)", imports[i])
44 let importPath = re.removeReg(imports[i], importSearch.regs[0])
49 let ifnameSearch = re.search("(@[./a-zA-Z]+d.ts)", ifname)
50 let ifnamePath = re.removeReg(ifname, ifnameSearch.regs[0])
Dgenerate.js20 const re = require("./tools/re"); constant
157 writeFile(re.pathJoin(destDir, "%s_middle.cpp".format(ns0.name)),
168 …writeFile(re.pathJoin(destDir, "%s.h".format(ns0.name)), null != license ? (license + "\n" + implH…
172 …writeFile(re.pathJoin(destDir, "%s.cpp".format(ns0.name)), null != license ? (license + "\n" + imp…
Dcmd_gen.js17 const re = require("./tools/re"); constant
96 let fn = re.getFileInPath(fileName);
97 let tt = re.match('@ohos([.a-z_A-Z0-9]+).d.ts', fn);
/napi_generator/src/gen/tools/
Dcommon.js15 const re = require("./re"); constant
102 let tt = re.match("Array<([a-zA-Z_0-9]+)>", type)
104 return re.getReg(type, tt.regs[1])
107 tt = re.match("Array<{([[a-z:]+)([a-z:]]+)([a-zA-Z_1-9:]+)", type)
112 let regs1 = re.getReg(type, tt.regs[i])
118 tt = re.match("Array<map<string", type)
126 tt = re.match("Array<Map<string", type)
137 let tt = re.match("([a-zA-Z_0-9]+)", type)
138 return re.getReg(type, tt.regs[1])
185 let ttKey = re.search("Map<([a-zA-Z_0-9]+),", type)
[all …]
Dtool.js15 const re = require("./re"); constant
110 let tt = re.search("\n *//([a-zA-Z .]+)\n", data)
/napi_generator/test/
Ddebug_entry.js16 const re = require("./tools/re"); constant
19 let fn = re.getFileInPath(filePath)
20 let tt = re.match("@ohos.([.a-z_A-Z0-9]+).d.ts", fn)
/napi_generator/src/gen/extend/
Dtool_utility.js16 const re = require("../tools/re"); constant
1131 …writeFile(re.pathJoin(destDir, "tool_utility.h"), null != license ? (license + "\n" + xNapiToolH) …
1132 …writeFile(re.pathJoin(destDir, "tool_utility.cpp"), null != license ? (license + "\n" + xNapiToolC…
Dbinding_gyp.js16 const re = require("../tools/re"); constant
49 writeFile(re.pathJoin(destDir, "binding.gyp"), null != license ? (license + "\n" + ss) : ss)
51 …writeFile(re.pathJoin(destDir, "test.sh"), "node-gyp configure build && sleep 0.5 && node --expose…
Dbuild_gn.js16 const re = require("../tools/re"); constant
68 … writeFile(re.pathJoin(destDir, "BUILD.gn"), null != license ? (license + "\n" + gnFile) : gnFile)
/napi_generator/hdc/service-gen/src/gen/
Danalyze.js19 const re = require("../tools/re"); constant
124 let filePath = re.pathJoin(destDir, fileInfo.name);
149 createFolder(re.pathJoin(destDir, serviceFolder));
150 createFolder(re.pathJoin(outputPath, "include"));
151 createFolder(re.pathJoin(outputPath, "interface"));
152 createFolder(re.pathJoin(outputPath, "sa_profile"));
153 createFolder(re.pathJoin(outputPath, "etc"));
154 createFolder(re.pathJoin(outputPath, "src"));
Dgenerate.js18 const re = require("../tools/re"); constant
67 let matchs = re.match("(std::)?vector<([\x21-\x7e]+)>", vType);
69 let rowType = re.getReg(vType, matchs.regs[2]);
97 let matchs = re.match("(std::)?vector<([\x21-\x7e]+)>", vType);
99 let rowType = re.getReg(vType, matchs.regs[2]);
/napi_generator/napi_vs_plugin/src/
Dextension.js20 const re = require("./gen/tools/VsPluginRe"); constant
104 let fn = re.getFileInPath(uri.fsPath);
105 let tt = re.match("@ohos.[a-zA-Z_0-9]+.d.ts", fn);
152 name = re.replaceAll(name, " ", "");
/napi_generator/src/tsGen/
DtsMain.js18 const re = require("../gen/tools/re"); constant
95 let matchs = re.match("(std::)?vector<([\x21-\x7e ]+)>", basicCtype);
97 basicCtype = re.getReg(basicCtype, matchs.regs[2]).trim()
321 let tsFilePath = re.pathJoin(destDir, "%s.d.ts".format(hfileName))
/napi_generator/src/gen/generate/
Denum.js15 const re = require("../tools/re"); constant
Dparam_generate.js18 const re = require("../tools/re"); constant
652 let arrayType = re.match("(Async)*Callback<(Array<([a-zA-Z_0-9]+)>)>", type)
655 regType = re.getReg(type, arrayType.regs[2])
658 let arrayType2 = re.match("(Async)*Callback<(([a-zA-Z_0-9]+)\\[\\])>", type)
660 regType = re.getReg(type, arrayType2.regs[2])
663 let tt = re.match("(Async)*Callback<([a-zA-Z_0-9]+)>", type)
665 regType = re.getReg(type, tt.regs[2])
820 let regName = re.match("'([a-zA-Z_0-9]+)'", type)
822 param.eventName = re.getReg(type, regName.regs[1])

12