add support for XeTeX web file
web2go
can handle correctly the "original" WEB file from "vanilla" TeX.
it would be great, as noted in star-tex#16, to be able to also process the WEB file from XeTeX (as this project has support for direct PDF output).
right now, with modernc.org/web2go@6897ac4
, running on https://github.com/TeX-Live/texlive-source/blob/15e8900d164e35deaa97779c123698affa707803/texk/web2c/xetexdir/xetex.web, one gets:
$> tangle ./xetex.web
$> ln -s ./xetex.pool ./tex.pool ### it would be great for web2go to infer this by itself.
$> ln -s ./xetex.ch ./tex.ch ### ditto, although I don't remember whether that's used by web2go.
$> web2go -o xetex.go ./xetex.web
web2go -o xetex.go ./xetex.web
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x5c477f]
goroutine 1 [running]:
main.(*parser).variableDeclaration(0xc00007cc30, 0xc00000c240)
/home/binet/dev/go/gocode/src/modernc.org/web2go/parser.go:1882 +0x13f
main.(*parser).variableDeclarationList(0xc00007cc30, 0x3)
/home/binet/dev/go/gocode/src/modernc.org/web2go/parser.go:1856 +0xfa
main.(*parser).variableDeclarationPart(0xc00007cc30, 0x40d0e7)
/home/binet/dev/go/gocode/src/modernc.org/web2go/parser.go:1848 +0x51
main.(*parser).block(0xc000016190, 0x9)
/home/binet/dev/go/gocode/src/modernc.org/web2go/parser.go:407 +0x65
main.(*parser).program(0xc00007cc30)
/home/binet/dev/go/gocode/src/modernc.org/web2go/parser.go:356 +0xdd
main.parse(0xc000016190, {0xc0002da000, 0x6428f4, 0x7ffcf8feba83}, {0xc000016190, 0x4dd95ca3b348fd8d})
/home/binet/dev/go/gocode/src/modernc.org/web2go/parser.go:106 +0x36
main.(*task).main(0xc000168000)
/home/binet/dev/go/gocode/src/modernc.org/web2go/main.go:253 +0x292
main.main()
/home/binet/dev/go/gocode/src/modernc.org/web2go/main.go:192 +0x555
thanks.