aboutsummaryrefslogtreecommitdiffstats
path: root/asspb.go
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2025-10-25 14:56:15 -0700
committerRose Hogenson <rosehogenson@posteo.net>2025-10-25 14:56:15 -0700
commitaf56dc0cb5b3a0bbc017beef2b5dfe74e58b9a25 (patch)
treeb4ee355b458f13b2c276a7dadcedca3fc3d27c48 /asspb.go
parent1e9f1ddec62c6807aa44bb75b33e1c36b60def13 (diff)
downloadccl-af56dc0cb5b3a0bbc017beef2b5dfe74e58b9a25.tar.zst
Add support for C-style comments
Diffstat (limited to 'asspb.go')
-rw-r--r--asspb.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/asspb.go b/asspb.go
index 488c731..62f81a7 100644
--- a/asspb.go
+++ b/asspb.go
@@ -36,7 +36,7 @@ type parser struct {
i int
}
-var spaceRE = regexp.MustCompile(`^([[:space:]\p{Zs}]|#[^\n]*)*`)
+var spaceRE = regexp.MustCompile(`^([[:space:]\p{Zs}]|(#|//)[^\n]*|/\*([^*]|\*[^/])*\**\*/)*`)
func (p *parser) skipSpace() {
p.i += len(spaceRE.Find(p.data[p.i:]))