sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Parslet::Atoms::CanFlatten#flatten

Takes a mixed value coming out of a parslet and converts it to a return
value for the user by dropping things and merging hashes. 

Named is set to true if this result will be embedded in a Hash result from 
naming something using <code>.as(...)</code>. It changes the folding 
semantics of repetition.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/parslet/lib/parslet/atoms/can_flatten.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Parslet--Atoms--CanFlatten-flatten-for-pr


# Commit to git

git add app/server/ruby/vendor/parslet/lib/parslet/atoms/can_flatten.rbgit commit -m "better docs for Parslet::Atoms::CanFlatten#flatten"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Parslet--Atoms--CanFlatten-flatten-for-pr

hub pull-request


# Celebrate!