reader.js
function read_from_source(codestr, filenameOrLexer, options) {

  var lexer;
  if(typeof filenameOrLexer === 'string') {
    lexer = initLexerFor(codestr, filenameOrLexer, options);
  }
  else {
    lexer = filenameOrLexer;
    lexer.set_source_text(codestr, options);
  }

  // read the forms
  var forms = read(lexer);

  // it's useful to sometimes look "up" the lexical nesting of forms...
  // to make this easy/reliable - walk the form tree setting "parent"
// I SHOULD TIME THIS?  IF IT'S EXPENSIVE - I'M NOT SURE I EVEN NEED IT ANYMORE?
  if(options.setParents !== 'no' && forms.setParents) {
    forms.setParents();
  }

  return forms;
}
function read_from_source(codestr, filenameOrLexer, options) {

  var lexer;
  if(typeof filenameOrLexer === 'string') {
    lexer = initLexerFor(codestr, filenameOrLexer, options);
  }
  else {
    lexer = filenameOrLexer;
    lexer.set_source_text(codestr, options);
  }

  // read the forms
  var forms = read(lexer);

  // it's useful to sometimes look "up" the lexical nesting of forms...
  // to make this easy/reliable - walk the form tree setting "parent"
// I SHOULD TIME THIS?  IF IT'S EXPENSIVE - I'M NOT SURE I EVEN NEED IT ANYMORE?
  if(options.setParents !== 'no' && forms.setParents) {
    forms.setParents();
  }

  return forms;
}
function read_from_source ( codestr , filenameOrLexer , options ) { var lexer ; if ( typeof filenameOrLexer === 'string' ) { lexer = initLexerFor ( codestr , filenameOrLexer , options ) ; } else { lexer = filenameOrLexer ; lexer . set_source_text ( codestr , options ) ; } // read the forms var forms = read ( lexer ) ; // it's useful to sometimes look "up" the lexical nesting of forms... // to make this easy/reliable - walk the form tree setting "parent" // I SHOULD TIME THIS?  IF IT'S EXPENSIVE - I'M NOT SURE I EVEN NEED IT ANYMORE? if ( options . setParents !== 'no' && forms . setParents ) { forms . setParents ( ) ; } return forms ; }
Read the expressions in the provided source code string.
@param codestr = the source code as a string e.g. from reading a source file.
@param filenameOrLexer = the name of source file (or the Lexer for the file)
@return the list (see sl-types) of the expressions in codestr.
Read the expressions in the provided source code string .