Beispiel #1
0
 public Env<AttrContext> attribute(Env<AttrContext> env) {
   if (env.toplevel.sourcefile instanceof CeylonFileObject || isBootstrap) {
     try {
       sourceLanguage.push(Language.CEYLON);
       return super.attribute(env);
     } finally {
       sourceLanguage.pop();
     }
   }
   return super.attribute(env);
 }
Beispiel #2
0
 @Override
 public void complete(ClassSymbol c) throws CompletionFailure {
   try {
     sourceLanguage.push(Language.JAVA);
     super.complete(c);
   } catch (RunTwiceException e) {
     hadRunTwiceException = true;
     throw new CompletionFailure(c, e.getLocalizedMessage());
   } finally {
     sourceLanguage.pop();
   }
 }
Beispiel #3
0
 protected void flow(Env<AttrContext> env, Queue<Env<AttrContext>> results) {
   if (env.toplevel.sourcefile instanceof CeylonFileObject) {
     try {
       sourceLanguage.push(Language.CEYLON);
       super.flow(env, results);
       return;
     } finally {
       sourceLanguage.pop();
     }
   }
   super.flow(env, results);
 }
Beispiel #4
0
 protected void desugar(
     final Env<AttrContext> env, Queue<Pair<Env<AttrContext>, JCClassDecl>> results) {
   if (env.toplevel.sourcefile instanceof CeylonFileObject) {
     try {
       sourceLanguage.push(Language.CEYLON);
       super.desugar(env, results);
       return;
     } finally {
       sourceLanguage.pop();
     }
   }
   super.desugar(env, results);
 }
Beispiel #5
0
 @Override
 protected JavaFileObject genCode(Env<AttrContext> env, JCClassDecl cdef) throws IOException {
   if (env.toplevel.sourcefile instanceof CeylonFileObject) {
     try {
       sourceLanguage.push(Language.CEYLON);
       // call our own genCode
       return genCodeUnlessError(env, cdef);
     } finally {
       sourceLanguage.pop();
     }
   }
   return super.genCode(env, cdef);
 }