-switch bug with cjk character
Opened this issue · 0 comments
fy0 commented
package main
type DiceExprParser Peg {
// <parser state variables>
}
Expr <- 'CJK' / '汉字' / 'test'
peg -switch test.peg ----> crashed.
panic: runtime error: index out of range [0] with length 0
if conditions are more than 2, and one of them contains cjk character, peg will be crashed.