Package com.stuffwithstuff.magpie.parser

Examples of com.stuffwithstuff.magpie.parser.Lexer


  }
 
  @Override
  protected void afterReadLine(Repl repl, String prompt, String line) {
    try {
      Lexer lexer = new Lexer(new StringReader("", line));
 
      Term.moveUp();
 
      // TODO(bob): Now that there are token types for reserved words and
      // operators, should handle them here.
     
      // Redraw the prompt.
      Term.set(Term.ForeColor.GRAY);
      System.out.print(prompt);
      Term.restoreColor();

      while (true) {
        Token token = lexer.readToken();
        if (token.getType() == TokenType.EOF) break;

        switch (token.getType()) {
        case LEFT_PAREN:
        case RIGHT_PAREN:
View Full Code Here

TOP

Related Classes of com.stuffwithstuff.magpie.parser.Lexer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.