Package com.google.gwt.dev.jjs

Examples of com.google.gwt.dev.jjs.SourceOrigin$SourceOriginPos


      return true;
    }

    protected SourceInfo pushAndConvert(SourceInfo info) {
      if (info instanceof SourceOrigin) {
        SourceOrigin origin = (SourceOrigin) info;
        SourceInfoCorrelation parent = parents.peek();
        if (parent != null) {
          info = new SourceInfoCorrelation(parent, origin);
        } else {
          info = new SourceInfoCorrelation(origin);
View Full Code Here


        "0:7-11 -> 123"
    );
  }

  private void addMapping(String substring, int javaStartLine) {
    SourceOrigin sourceInfo = SourceOrigin.create(javaStartLine, JAVA_FILENAME);
    writer.addMapping(findRange(substring, sourceInfo), null);
  }
View Full Code Here

    JsScope scope = jsProgram.getScope();

    // Function declaration statement.
    JsName name = scope.declareName("package-info", "package-info");
    List<JsStatement> statements = jsProgram.getFragment(0).getGlobalBlock().getStatements();
    final SourceOrigin sourceInfo = SourceOrigin.UNKNOWN;
    JsFunction function = new JsFunction(sourceInfo, scope, name);
    function.setBody(new JsBlock(sourceInfo));
    statements.add(new JsExprStmt(sourceInfo, function));

    // Function invocation statement.
View Full Code Here

*/
public class JsAstTest extends TestCase {

  // TODO(rluble): flesh out the test.
  public void testEquality() {
    final SourceOrigin sourceInfo = SourceOrigin.UNKNOWN;
    JsNumberLiteral one = new JsNumberLiteral(sourceInfo, 1);
    JsNumberLiteral two = new JsNumberLiteral(sourceInfo, 2);
    JsArrayLiteral arrayOneTwoLiteral = new JsArrayLiteral(sourceInfo, one, two);
    JsArrayLiteral arrayOneTwoLiteral2 = new JsArrayLiteral(sourceInfo, one,two);
    JsArrayLiteral arrayTwoOneLiteral = new JsArrayLiteral(sourceInfo, two, one);
View Full Code Here

    private SourceInfo makeSourceInfo(AbstractMethodDeclaration methodDecl,
        HasSourceInfo enclosing) {
      int startLine = Util.getLineNumber(methodDecl.sourceStart,
          currentSeparatorPositions, 0, currentSeparatorPositions.length - 1);
      SourceOrigin toReturn = SourceOrigin.create(methodDecl.sourceStart,
          methodDecl.bodyEnd, startLine, currentFileName);
      if (enclosing != null) {
        return enclosing.getSourceInfo().makeChild(toReturn);
      }
      return toReturn;
View Full Code Here

    }

    private SourceInfo makeSourceInfo(Statement stmt, HasSourceInfo enclosing) {
      int startLine = Util.getLineNumber(stmt.sourceStart,
          currentSeparatorPositions, 0, currentSeparatorPositions.length - 1);
      SourceOrigin toReturn = SourceOrigin.create(stmt.sourceStart,
          stmt.sourceEnd, startLine, currentFileName);
      if (enclosing != null) {
        return enclosing.getSourceInfo().makeChild(toReturn);
      }
      return toReturn;
View Full Code Here

    }

    private SourceInfo makeSourceInfo(Statement x) {
      int startLine = Util.getLineNumber(x.sourceStart,
          currentSeparatorPositions, 0, currentSeparatorPositions.length - 1);
      SourceOrigin toReturn = SourceOrigin.create(x.sourceStart, x.sourceEnd,
          startLine, currentFileName);
      if (currentMethod != null) {
        return currentMethod.getSourceInfo().makeChild(toReturn);
      }
      return toReturn;
View Full Code Here

      return true;
    }

    protected SourceInfo pushAndConvert(SourceInfo info) {
      if (info instanceof SourceOrigin) {
        SourceOrigin origin = (SourceOrigin) info;
        SourceInfoCorrelation parent = parents.peek();
        if (parent != null) {
          info = new SourceInfoCorrelation(parent, origin);
        } else {
          info = new SourceInfoCorrelation(origin);
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.jjs.SourceOrigin$SourceOriginPos

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.