Package org.rascalmpl.ast

Examples of org.rascalmpl.ast.Field


    int nFields = selectedFields.length;
    int fieldIndices[] = new int[nFields];
    Type baseType = this.getType();
   
    for (int i = 0; i < nFields; i++) {
      Field f = selectedFields[i];
      if (f.isIndex()) {
        fieldIndices[i] = ((IInteger) f.getFieldIndex()
            .interpret(this.ctx.getEvaluator()).getValue()).intValue();
      } else {
        String fieldName = org.rascalmpl.interpreter.utils.Names
            .name(f.getFieldName());
        try {
          fieldIndices[i] = baseType.getFieldIndex(fieldName);
        } catch (UndeclaredFieldException e) {
          throw new UndeclaredField(fieldName, baseType,
              ctx.getCurrentAST());
View Full Code Here


      int nFields = selectedFields.length;
      int fieldIndices[] = new int[nFields];
      Type baseType = this.getType();
     
      for (int i = 0; i < nFields; i++) {
        Field f = selectedFields[i];
        if (f.isIndex()) {
          fieldIndices[i] = ((IInteger) f.getFieldIndex()
              .interpret(this.ctx.getEvaluator()).getValue()).intValue();
        } else {
          String fieldName = org.rascalmpl.interpreter.utils.Names
              .name(f.getFieldName());
          try {
            fieldIndices[i] = baseType.getFieldIndex(fieldName);
          } catch (UndeclaredFieldException e) {
            throw new UndeclaredField(fieldName, baseType,
                ctx.getCurrentAST());
View Full Code Here

    int nFields = selectedFields.length;
    int fieldIndices[] = new int[nFields];
    Type baseType = this.getType();
   
    for (int i = 0; i < nFields; i++) {
      Field f = selectedFields[i];
      if (f.isIndex()) {
        fieldIndices[i] = ((IInteger) f.getFieldIndex()
            .interpret(this.ctx.getEvaluator()).getValue()).intValue();
      } else {
        String fieldName = org.rascalmpl.interpreter.utils.Names
            .name(f.getFieldName());
        try {
          fieldIndices[i] = baseType.getFieldIndex(fieldName);
        } catch (UndeclaredFieldException e) {
          throw new UndeclaredField(fieldName, baseType,
              ctx.getCurrentAST());
View Full Code Here

      int nFields = selectedFields.length;
      int fieldIndices[] = new int[nFields];
      Type baseType = this.getType();
     
      for (int i = 0; i < nFields; i++) {
        Field f = selectedFields[i];
        if (f.isIndex()) {
          fieldIndices[i] = ((IInteger) f.getFieldIndex()
              .interpret(this.ctx.getEvaluator()).getValue()).intValue();
        } else {
          String fieldName = org.rascalmpl.interpreter.utils.Names
              .name(f.getFieldName());
          try {
            fieldIndices[i] = baseType.getFieldIndex(fieldName);
          } catch (UndeclaredFieldException e) {
            throw new UndeclaredField(fieldName, baseType,
                ctx.getCurrentAST());
View Full Code Here

TOP

Related Classes of org.rascalmpl.ast.Field

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.