santazhang / simple-rpc

Simple RPC in C++, with Python binding
http://www.yzhang.net/simple-rpc/
BSD 3-Clause "New" or "Revised" License
27 stars 6 forks source link

Dump current parse position when an error occurs. #2

Closed rjpower closed 11 years ago

rjpower commented 11 years ago

Hey Yang,

This just changes the parser to dump the current position of the parse when it encounters an error, rather then the Python stack:

../external/simple-rpc/rpc/rpcgen.py ../sparrow/sparrow_service.rpc
<f.0>:40:7: please use i32 or i64 for any integer types
>    bool done;
>        ^
while parsing type():
>    bool done;
>        ^
while parsing struct_field():
>    bool done;
>        ^
while parsing struct_fields():
>  struct IteratorResp {
>                       ^
while parsing struct_decl():
>  struct IteratorResp {
>        ^
while parsing structs_and_services():
santazhang commented 11 years ago

Thanks Russell! :D