sonic-pi

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

C++

Code. Music. Live.

MultiJson::OkJson#tok

Scans the first token in s and
returns a 3-element list, or nil
if s does not begin with a valid token.

The first list element is one of
'{', '}', ':', ',', '[', ']',
:val, :str, and :space.

The second element is the lexeme.

The third element is the value of the
token for :val and :str, otherwise
it is the lexeme.

Source | Google | Stack overflow

Edit

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

cd sonic-pi

open app/server/ruby/vendor/multi_json/lib/multi_json/vendor/okjson.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-MultiJson--OkJson-tok-for-pr


# Commit to git

git add app/server/ruby/vendor/multi_json/lib/multi_json/vendor/okjson.rbgit commit -m "better docs for MultiJson::OkJson#tok"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-MultiJson--OkJson-tok-for-pr

hub pull-request


# Celebrate!