Add parseDeclaration method to Parser.java