Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
are input and output possible as string ?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
maty  
View profile  
 More options Nov 6 2009, 4:58 am
From: maty <matthias.m...@googlemail.com>
Date: Fri, 6 Nov 2009 01:58:26 -0800 (PST)
Local: Fri, Nov 6 2009 4:58 am
Subject: are input and output possible as string ?
are input and output possible as string values direct from java ?
(com.google.javascript.jscomp.CompilerRunner ... )

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bolinfest  
View profile  
 More options Nov 6 2009, 11:26 am
From: bolinfest <bolinf...@gmail.com>
Date: Fri, 6 Nov 2009 08:26:20 -0800 (PST)
Local: Fri, Nov 6 2009 11:26 am
Subject: Re: are input and output possible as string ?
The class below shows how to do it. Ultimately, you get the string
value from compiler.toSource() rather than from a method on Result, as
you might expect.

package com.bolinfest.closure;

import com.google.javascript.jscomp.CompilationLevel;
import com.google.javascript.jscomp.Compiler;
import com.google.javascript.jscomp.CompilerOptions;
import com.google.javascript.jscomp.JSSourceFile;
import com.google.javascript.jscomp.Result;

public class Main {

  public static void main(String[] args) {
    Compiler compiler = new Compiler();
    CompilerOptions options = new CompilerOptions();

CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel
(options);
    JSSourceFile extern = JSSourceFile.fromCode("externs.js",
        "function alert(x) {}");
    JSSourceFile input = JSSourceFile.fromCode("input.js",
        "function hello(name) {" +
          "alert('Hello, ' + name);" +
         "}" +
         "hello('New user');");
    Result result = compiler.compile(extern, input, options);
    if (result.success) {
      System.out.println(compiler.toSource());
    }
  }

}

On Nov 6, 4:58 am, maty <matthias.m...@googlemail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
maty  
View profile  
 More options Nov 10 2009, 9:12 am
From: maty <matthias.m...@googlemail.com>
Date: Tue, 10 Nov 2009 06:12:43 -0800 (PST)
Local: Tues, Nov 10 2009 9:12 am
Subject: Re: are input and output possible as string ?
thanks :O)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »