- 包含4个产业方向的前端项目:智能开发、智能制造、大健康、财经商贸 - 已清理node_modules、.yoyo等大文件,项目大小从2.6GB优化至631MB - 配置完善的.gitignore文件 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
42 lines
1.5 KiB
Python
42 lines
1.5 KiB
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
print("查找语法问题...")
|
|
|
|
with open('/Users/apple/Documents/cursor/教务系统/frontend_大健康/src/mocks/resumeInterviewMock.js', 'r', encoding='utf-8') as f:
|
|
lines = f.readlines()
|
|
|
|
# 跟踪括号栈
|
|
stack = []
|
|
line_num = 0
|
|
|
|
for i, line in enumerate(lines, 1):
|
|
for j, char in enumerate(line):
|
|
if char in '{[':
|
|
stack.append((char, i, j))
|
|
elif char in '}]':
|
|
if not stack:
|
|
print(f"第{i}行第{j}列: 多余的关闭符号 '{char}'")
|
|
print(f" 内容: {line.strip()}")
|
|
else:
|
|
opener, open_line, open_col = stack.pop()
|
|
expected = '}' if opener == '{' else ']'
|
|
if char != expected:
|
|
print(f"第{i}行第{j}列: 不匹配的关闭符号")
|
|
print(f" 期望 '{expected}' 但得到 '{char}'")
|
|
print(f" 开始于第{open_line}行第{open_col}列")
|
|
print(f" 内容: {line.strip()}")
|
|
|
|
# 检查未关闭的括号
|
|
if stack:
|
|
print("\n未关闭的括号:")
|
|
for char, line_num, col in stack[-5:]: # 显示最后5个未关闭的
|
|
print(f" 第{line_num}行第{col}列: '{char}' 未关闭")
|
|
if line_num <= len(lines):
|
|
print(f" 内容: {lines[line_num-1].strip()}")
|
|
|
|
# 检查第6518行附近
|
|
print("\n第6518行附近的内容:")
|
|
for i in range(max(0, 6515), min(len(lines), 6525)):
|
|
if i < len(lines):
|
|
print(f"{i+1}: {lines[i].rstrip()}") |