@.buf.match()
APIBuffer
增量匹配Buffer
调用方法
- (buffer, expected, states) -> {index, states}
参数介绍
- buffer: Buffer新输入的
Buffer
- expected流匹配的算子,通过
@.buf.expected()
产生
- states可选前次匹配所返回的状态记录
返回内容
- states: State流匹配状态记录
- index: Number相对于新输入
Buffer
的偏移位置,可能小于0
,表示匹配位置出现在之前已经输入的Buffer
中
关联API
- @.buf.expected()
- @.buf.rejoin()