Commit f26d750
fix: correct comment parsing for block comments and update gogen to v1.20.2
This fixes issue #618 by properly handling multi-line C block comments
according to Go's ast.Comment specification.
Changes:
- Fixed ParseComment() in _xtool/internal/parser/parser.go to keep
block comments (/* ... */) as single ast.Comment nodes instead of
splitting them by line
- Line comments (//) continue to be split per line as expected
- Updated gogen dependency from v1.19.7 to v1.20.2
The bug was exposed when gogen v1.20.2 became more spec-compliant with
Go's standard ast printer behavior. The fix ensures llcppg generates
valid Go code that compiles correctly with the updated gogen version.
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <[email protected]>1 parent 46992ed commit f26d750
3 files changed
+23
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | 196 | | |
198 | | - | |
199 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
200 | 216 | | |
| 217 | + | |
201 | 218 | | |
202 | 219 | | |
203 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments