lexer.js
function Lexer(sourcetext, filename, options) {
  options = options || {};
  this.options = options || {};
  this.dialects = []; // the "stack" dialects are pushed/popped from
  if(filename) {
    this.filename = filename;
    this.fileext = utils.getFileExt(filename, "sugar");
  }
  this.set_source_text(sourcetext);
}
function Lexer(sourcetext, filename, options) {
  options = options || {};
  this.options = options || {};
  this.dialects = []; // the "stack" dialects are pushed/popped from
  if(filename) {
    this.filename = filename;
    this.fileext = utils.getFileExt(filename, "sugar");
  }
  this.set_source_text(sourcetext);
}
function Lexer ( sourcetext , filename , options ) { options = options || { } ; this . options = options || { } ; this . dialects = [ ] ; // the "stack" dialects are pushed/popped from if ( filename ) { this . filename = filename ; this . fileext = utils . getFileExt ( filename , "sugar" ) ; } this . set_source_text ( sourcetext ) ; }
A Lexer for the source text we are scanning

note:  Lexer has been done as a javacript prototypal
class with instances that hold all state for a
given source file as it's being read and transpiled.
This is in contrast to the other sugarlisp modules
which are pretty much stateless collections of
functions.  The main exception to this is the
"transpiler-context" which is the non-source-file
related state of the transpiler (essentially a
"singleton").
A Lexer for the source text we are scanning