@guanlin4924/devflow-pi 0.1.74 → 0.1.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guanlin4924/devflow-pi",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "type": "module",
5
5
  "description": "Devflow 专项研发 Pi,基于固定版本 OMP Runtime 组装研发状态机、代码智能、设计、实现与质量门禁。",
6
6
  "license": "UNLICENSED",
@@ -131,8 +131,39 @@ class StructuredScopeAdapter(Adapter):
131
131
 
132
132
 
133
133
  def _without_strings_and_comments(line: str) -> str:
134
- line = re.sub(r"(['\"])(?:\\.|(?!\1).)*\1", "''", line)
135
- return re.sub(r"//.*$|#.*$", "", line)
134
+ """Mask strings/comments without backtracking on malformed source lines.
135
+
136
+ The old back-reference regex could spend unbounded time on an unterminated
137
+ quote. This scanner is linear and keeps character positions stable for
138
+ declaration matching.
139
+ """
140
+ chars = list(line)
141
+ quote = None
142
+ escaped = False
143
+ index = 0
144
+ while index < len(line):
145
+ character = line[index]
146
+ if quote is not None:
147
+ chars[index] = " "
148
+ if escaped:
149
+ escaped = False
150
+ elif character == "\\":
151
+ escaped = True
152
+ elif character == quote:
153
+ quote = None
154
+ index += 1
155
+ continue
156
+ if character in {"'", '"', "`"}:
157
+ quote = character
158
+ chars[index] = " "
159
+ index += 1
160
+ continue
161
+ if character == "#" or (character == "/" and index + 1 < len(line) and line[index + 1] == "/"):
162
+ for position in range(index, len(chars)):
163
+ chars[position] = " "
164
+ break
165
+ index += 1
166
+ return "".join(chars)
136
167
 
137
168
 
138
169
  def _brace_end(lines: List[str], start: int) -> int:
@@ -273,6 +273,8 @@ def command_scan(args) -> int:
273
273
  rel_path = _workspace_rel(root, path)
274
274
  if rel_path in indexed_paths:
275
275
  continue
276
+ if parsed == 0 or parsed % 100 == 0:
277
+ progress.emit("parse", f"parsing {rel_path}", codebase=codebase.name, parsed=parsed, total=len(all_files), path=rel_path)
276
278
  adapter = adapters[-1]
277
279
  try:
278
280
  text = path.read_text(encoding="utf-8", errors="ignore")
package/src/constants.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export const PRODUCT_NAME = "Devflow Pi";
2
- export const PRODUCT_VERSION = "0.1.74";
2
+ export const PRODUCT_VERSION = "0.1.75";
3
3
  export const PROJECT_SCHEMA_VERSION = 1;
4
4
  export const OMP_RUNTIME_VERSION = "17.2.7";
5
5