add syntactic extractor for assignment/update trees

Even though updates and assignments look the same syntactically they
are represented differently on the AST level. We need to abstract over
that.