@whisklabs/grpc
Version:
gRPC generator and http library for typescript
12 lines • 409 B
JavaScript
import { ch, check, cut, cutStr } from '../utils';
import { isProto } from '../validators';
export function ParseSyntax(tokens) {
var _a = check({
type: 'syntax',
tokens: tokens,
rules: [ch('syntax'), ch('='), ch(isProto), ch(';')],
}), range = _a.range, len = _a.len;
cut(tokens, len);
return cutStr(range[2]) === 'proto2' ? 2 : 3;
}
//# sourceMappingURL=syntax.js.map