podusowski / pake

Friendly C++ build system which doesn't follow trends
2 stars 1 forks source link

Pake parsing error does not indicate where error occurs #10

Open Quasek opened 9 years ago

Quasek commented 9 years ago

It'd be great if pake told where an parsing error is located.

podusowski commented 9 years ago

We need a test case for this, because most of the time it tries to, there is a test which checks whenever pake report any kind of error on ill-formed scripts:

expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: /home/wolverine/Development/pake/tests/ErrorsInScripts/__build/001/001.pake:1: expected directive
expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: /home/wolverine/Development/pake/tests/ErrorsInScripts/__build/002/002.pake:1: unexpected (
expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: /home/wolverine/Development/pake/tests/ErrorsInScripts/__build/003/003.pake:1: unexpected literal: unknown
expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: $004.$non_existing does not exist
expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: target hello not found
expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: /home/wolverine/Development/pake/tests/ErrorsInScripts/__build/006/006.pake:1: unknown target type: dummy_target_type
expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: /home/wolverine/Development/pake/tests/ErrorsInScripts/__build/007/007.pake:1: unexpected variable: $hello
expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: expecting { after $
expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: no such module: nonexisting
expecting to fail: /home/wolverine/Development/pake/__build/pake.py hello
fatal: /home/wolverine/Development/pake/tests/ErrorsInScripts/__build/010/010.pake:1: expected variable

Currently there is this case when quoted literal is parsed and it doesn't know where it came from, this needs to be fixed.

Quasek commented 9 years ago

Yeah, this is the case i am talking about :P.