Package loop.ast

Examples of loop.ast.ClassDecl


    List<Token> tokens = new Tokenizer(source).tokenize();
    Parser parser = isLisp
        ? new SexprParser(tokens)
        : new LexprParser(tokens);
    FunctionDecl functionDecl = parser.functionDecl();
    ClassDecl classDecl = null;
    Node node;
    if (null == functionDecl) {
      classDecl = parser.classDecl();
      node = classDecl;
    } else
View Full Code Here


  public String name() {
    return name;
  }

  @Override public ClassDecl resolve(String fullyQualifiedName, boolean scanDeps) {
    ClassDecl classDecl = classes.get(fullyQualifiedName);
    if (classDecl == null && scanDeps) {

      // Resolve one-level off, in deps, but no farther.
      for (Executable dep : deps) {
        classDecl = dep.getScope().resolve(fullyQualifiedName, false);
View Full Code Here

  static void compareType(String typeName, String expected, String input) {
    Parser parser = new LexprParser(new Tokenizer(input).tokenize());
    Unit unit = parser.script(null);
    Assert.assertNotNull("Parser returned no output", unit);

    ClassDecl clazz = unit.getType(typeName);
    Assert.assertNotNull("No such type " + typeName, clazz);


    String stringified = LexprParser.stringify(clazz);
View Full Code Here

TOP

Related Classes of loop.ast.ClassDecl

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.