lib/parser.rb
# Public: Tokenizes some Lisp code
#
# expressions - the Lisp code to tokenize
#
# Examples
#
#   parser.tokenize('(define foo 3)')
#   # => [ '(', 'define', 'foo', '3', ')' ]
#
# Returns the Lisp code as an array of tokens
Tokenizes some Lisp code
expressions - the Lisp code to tokenize

Examples



Returns the Lisp code as an array of tokens
Tokenizes some Lisp code expressions - the Lisp code to tokenize Examples Returns the Lisp code as an array of tokens
def tokenize(expressions)
    expressions.gsub('(', ' ( ')
               .gsub(')', ' ) ')
               .split(' ')
  end
def tokenize ( expressions ) expressions . gsub ( '(' , ' ( ' ) . gsub ( ')' , ' ) ' ) . split ( ' ' ) end
Public: Tokenizes some Lisp code
expressions - the Lisp code to tokenize
Public : Tokenizes some Lisp code expressions - the Lisp code to tokenize
expressions
<not_specific>