- Add: A
Terminal
can now be defined with more trivial callbacks. The*TerminalFactory
now hasFuncByte()
andFuncRune()
:NewTerm(tInt, "int").FuncByte(isDigit, bytesToInt) NewWhitespace().FuncRune(unicode.IsSpace) func isDigit(b byte) bool { return b >= '0' && b <= '9' } func bytesToInt(b []byte) (int, error) { return strconv.Atoi(string(b)) }
First release.