⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nodeconstructors.jrag

📁 JDK1.4编译器前端
💻 JRAG
字号:
/* * The JastAdd Extensible Java Compiler (http://jastadd.org) is covered * by the modified BSD License. You should have received a copy of the * modified BSD license with this compiler. *  * Copyright (c) 2005-2008, Torbjorn Ekman * All rights reserved. */aspect NodeConstructors {  public ParameterDeclaration.ParameterDeclaration(Access type, String name) {    this(new Modifiers(new List()), type, name);  }  public ParameterDeclaration.ParameterDeclaration(TypeDecl type, String name) {    this(new Modifiers(new List()), type.createQualifiedAccess(), name);  }  public PackageAccess.PackageAccess(String name, int start, int end) {    this(name);    this.start = start;    this.end = end;  }  public TypeAccess.TypeAccess(String name, int start, int end) {    this(name);    this.start = start;    this.end = end;  }  public PackageOrTypeAccess.PackageOrTypeAccess(String name, int start, int end) {    this(name);    this.start = start;    this.end = end;  }  public AmbiguousAccess.AmbiguousAccess(String name, int start, int end) {    this(name);    this.start = start;    this.end = end;  }  public VarAccess.VarAccess(String name, int start, int end) {    this(name);    this.start = start;    this.end = end;  }  public TypeAccess.TypeAccess(String typeName) {    this("", typeName);  }  public IntegerLiteral.IntegerLiteral(int i) {    this(Integer.toString(i));  }  public BooleanLiteral.BooleanLiteral(boolean b) {    this(b ? "true" : "false");  }  public MethodAccess.MethodAccess(String name, List args, int start, int end) {    this(name, args);    setStart(start);    setEnd(end);  }  public ReturnStmt.ReturnStmt(Expr expr) {    this(new Opt(expr));  }  public IfStmt.IfStmt(Expr cond, Stmt thenBranch) {    this(cond, thenBranch, new Opt());  }  public IfStmt.IfStmt(Expr cond, Stmt thenBranch, Stmt elseBranch) {    this(cond, thenBranch, new Opt(elseBranch));  }  public VariableDeclaration.VariableDeclaration(Access type, String name, Expr init) {    this(new Modifiers(new List()), type, name, new Opt(init));  }  public VariableDeclaration.VariableDeclaration(Access type, String name) {    this(new Modifiers(new List()), type, name, new Opt());  }  public ClassInstanceExpr.ClassInstanceExpr(Access type, List args) {    this(type, args, new Opt());  }  public FieldDeclaration.FieldDeclaration(Modifiers m, Access type, String name) {    this(m, type, name, new Opt());  }    public FieldDeclaration.FieldDeclaration(Modifiers m, Access type, String name, Expr init) {    this(m, type, name, new Opt(init));  }  public static Stmt AssignExpr.asStmt(Expr left, Expr right) {    return new ExprStmt(new AssignSimpleExpr(left, right));  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -