Repository navigation
Commit 36e127c
committed
fix(extract): Class node lines property always 0
extract_class_def() sets start_line and end_line from the tree-sitter
node span, but left def.lines = 0 (zeroed by memset at function entry).
The equivalent function push_method_def() correctly computes
def.lines = end_line - start_line + 1
The same one-liner was simply missing from the class extraction path.
This affects all languages — Python, TypeScript, Go, and any other
language where Class nodes are extracted via extract_class_def().
Regression test: after indexing a project, at least one Class node must
have c.lines > 0.
Signed-off-by: Thomas Dyar <tdyar@intersystems.com>1 parent 3d4236e commit 36e127c
2 files changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3323 | 3323 | | |
3324 | 3324 | | |
3325 | 3325 | | |
| 3326 | + | |
3326 | 3327 | | |
3327 | 3328 | | |
3328 | 3329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
964 | 964 | | |
965 | 965 | | |
966 | 966 | | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
967 | 980 | | |
968 | 981 | | |
969 | 982 | | |
| |||
3105 | 3118 | | |
3106 | 3119 | | |
3107 | 3120 | | |
| 3121 | + | |
3108 | 3122 | | |
3109 | 3123 | | |
3110 | 3124 | | |
| |||
0 commit comments