コード例 #1
0
  public CompilerInput(SourceAst ast, InputId inputId, boolean isExtern) {
    this.ast = ast;
    this.id = inputId;

    // TODO(nicksantos): Add a precondition check here. People are passing
    // in null, but they should not be.
    if (ast != null && ast.getSourceFile() != null) {
      ast.getSourceFile().setIsExtern(isExtern);
    }
  }
コード例 #2
0
 public CompilerInput(SourceAst ast) {
   this(ast, ast.getSourceFile().getName(), false);
 }
コード例 #3
0
 /** @return The number of lines in this input. */
 public int getNumLines() {
   return ast.getSourceFile().getNumLines();
 }
コード例 #4
0
 public int getLineOffset(int lineno) {
   return ast.getSourceFile().getLineOffset(lineno);
 }
コード例 #5
0
 void setIsExtern(boolean isExtern) {
   if (ast == null || ast.getSourceFile() == null) {
     return;
   }
   ast.getSourceFile().setIsExtern(isExtern);
 }
コード例 #6
0
 public boolean isExtern() {
   if (ast == null || ast.getSourceFile() == null) {
     return false;
   }
   return ast.getSourceFile().isExtern();
 }
コード例 #7
0
 @Override
 public SourceFile getSourceFile() {
   return ast.getSourceFile();
 }