Skip to content

Instantly share code, notes, and snippets.

@TikiTDO
Created June 28, 2013 11:25
Show Gist options
  • Save TikiTDO/5884035 to your computer and use it in GitHub Desktop.
Save TikiTDO/5884035 to your computer and use it in GitHub Desktop.
# Extracts the SourceElementsNode within the function bodyof the
def extract_context()
@parser.extract({
get: :value,
type: Array,
call: {
get: :first,
type: ExpressionStatementNode,
call: {
get: :value,
type: FunctionCallNode,
call: {
get: :value,
type: DotAccessorNode,
call: {
get: :value,
type: ParentheticalNode,
call: {
get: value,
type: FunctionExprNode,
call: {
get: :function_body,
type: FunctionBodyNode,
call: {
get: :value,
type: SourceElementsNode}}}}}}}})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment