Package org.spoofax.jsglr.client.imploder

Examples of org.spoofax.jsglr.client.imploder.Token


    }
   
    HashMap<String, String> cache = new HashMap<String, String>();
   
    for (int i = left.getIndex(), max = right.getIndex(); i <= max; i++) {
      Token tok = ((Token) left.getTokenizer().getTokenAt(i));
      if (tok.getError() == null || tok.getError().isEmpty())
        tok.setError(msg);
      else {
        StringBuilder b = new StringBuilder();
        b.append(tok.getError());
        b.append("<br>");
        b.append(msg);
        String key = b.toString();
        String val = cache.get(key);
        if (val == null) {
          val = key;
          cache.put(key, val);
        }
        tok.setError(val);
      }
     
      if (tok.getTokenizer().getInput().length() <= tok.getStartOffset() || tok.getTokenizer().getInput().charAt(tok.getStartOffset()) == '\n')
        break;
    }
  }
View Full Code Here


    } catch (InvalidParseTableException e) {
      throw new RuntimeException(e);
    }

    Tokenizer tokenizer = new Tokenizer(" ", " ", new KeywordRecognizer(pt) {});
    Token tok = tokenizer.makeToken(0, IToken.TK_UNKNOWN, true);
    IStrategoTerm term = ATermCommands.makeList("CompilationUnit", tok);
   
    Result r = new Result() {
      public boolean isUpToDate(int h, Environment env) { return false; }
    };
View Full Code Here

TOP

Related Classes of org.spoofax.jsglr.client.imploder.Token

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.