Examples of WyilFile


Examples of wyil.lang.WyilFile

              }
            }
          }
        }
      } else {
        WyilFile m = builder.getModule(candidateID.module());
        WyilFile.FunctionOrMethodDeclaration d = m.functionOrMethod(
            candidateID.name(), candidateType.raw());
        if (!d.hasModifier(Modifier.PUBLIC)
            && !d.hasModifier(Modifier.PROTECTED)) {
          String msg = candidateID.module() + "." + name
              + parameterString(parameters) + " is not visible";
View Full Code Here

Examples of wyil.lang.WyilFile

          candidates.add(new Pair<NameID, Nominal.FunctionOrMethod>(
              nid, ft));
        }
      }
    } else {
      WyilFile m = builder.getModule(mid);
      for (WyilFile.FunctionOrMethodDeclaration mm : m.functionOrMethods()) {
        if ((mm.isFunction() || mm.isMethod())
            && mm.name().equals(nid.name())
            && (nparams == -1 || mm.type().params().size() == nparams)) {
          // FIXME: loss of nominal information
View Full Code Here

Examples of wyil.lang.WyilFile

    // check whether this type is external or not
    WhileyFile wf = builder.getSourceFile(key.module());
    if (wf == null) {
      // indicates a non-local key which we can resolve immediately

      WyilFile mi = builder.getModule(key.module());
      WyilFile.TypeDeclaration td = mi.type(key.name());
      return append(td.type(), states);
    }

    WhileyFile.Type td = wf.typeDecl(key.name());
    if (td == null) {
View Full Code Here

Examples of wyil.lang.WyilFile

        result = cd.resolvedValue;
      } else {
        throw new ResolveError("unable to find constant " + key);
      }
    } else {
      WyilFile module = builder.getModule(key.module());
      WyilFile.ConstantDeclaration cd = module.constant(key.name());
      if (cd != null) {
        result = cd.constant();
      } else {
        throw new ResolveError("unable to find constant " + key);
      }
View Full Code Here

Examples of wyil.lang.WyilFile

      // file directly.

      // we have to do the following basically because we don't load
      // modifiers properly out of jvm class files (at the moment).
      // return false;
      WyilFile w = builder.getModule(mid);
      List<WyilFile.Block> blocks = w.blocks();
      for (int i = 0; i != blocks.size(); ++i) {
        WyilFile.Block d = blocks.get(i);
        if (d instanceof WyilFile.Declaration) {
          WyilFile.Declaration nd = (WyilFile.Declaration) d;
          return nd != null && nd.hasModifier(modifier);
View Full Code Here

Examples of wyil.lang.WyilFile

          WhileyFile.Type td = (WhileyFile.Type) decl;
          r = resolveAsType(td.pattern.toSyntacticType(), td)
              .nominal();
        }
      } else {
        WyilFile m = builder.getModule(mid);
        WyilFile.TypeDeclaration td = m.type(nid.name());
        if (td != null) {
          r = td.type();
        }
      }
      if (r == null) {
View Full Code Here

Examples of wyil.lang.WyilFile

  }

  public static void main(String[] args) {
    boolean verbose = true;
    try {
      WyilFile wf = new WyilFileReader(args[0]).read();
      new WyilFilePrinter(System.out).apply(wf);
    } catch (InternalFailure e) {
      e.outputSourceError(System.err);
      if(verbose) {
        e.printStackTrace(errout);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.