Skip to content

Commit 7e42505

Browse files
committed
feat: improved typescript GenericParser to detect class methods properly
1 parent ea724bd commit 7e42505

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

codesmart/index/parser/generic_parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
r"^\s*def\s+([A-Za-z_][A-Za-z0-9_]*)\s*\(",
4343
r"^\s*([A-Za-z_][A-Za-z0-9_]*)\s*=\s*\([^)]*\)\s*=>",
4444
r"^\s*(?:export\s+)?const\s+([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(?:async\s*)?\([^)]*\)\s*=>",
45+
r"^\s*(?:(?:public|protected|private|static|async|get|set)\s+)*(?!(?:if|for|while|switch|catch|return|constructor)\b)([A-Za-z_$][A-Za-z0-9_$]*)(?:<[^>{}\n]+>)?\s*\([^;{]*\{",
4546
]
4647
COMBINED_FUNC_PATTERN = re.compile("|".join(FUNC_PATTERNS_RAW), re.MULTILINE)
4748

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "codesmart"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "Codebase intelligence system with CLI and MCP interfaces"
55
readme = "README.md"
66
requires-python = ">=3.12"

0 commit comments

Comments
 (0)