use parse failure/success to classify inputs as decl or stmt

the previous way to check for keywords (some were missing) can be
wrong if you have a statement like let classFoo = 1.