rmosolgo / graphql-libgraphqlparser-ruby

libgraphqlparser + graphql gem
51 stars 12 forks source link

refactor(visitor_functions) remove some macros; make macro deps explicit #18

Closed rmosolgo closed 8 years ago

rmosolgo commented 8 years ago

Trying to remove some jank from those macros. They made assumptions about their surrounding scope, which made for short but brittle code.

So, turn them into plain 'ol functions.

ASSIGN_NAME is a bit tougher because it depends on node and get_name_fn being typed by a specific AST node and I couldn't figure out how to do that well.