Package railo.transformer.bytecode

Examples of railo.transformer.bytecode.Position


  * @return CFXD Element
  * @throws TemplateException
  */
  private Expression negatePlusMinusOp(ExprData data) throws TemplateException {
    // And Operation
    Position line=data.cfml.getPosition();
    if (data.cfml.forwardIfCurrent('-')) {
      if (data.cfml.forwardIfCurrent('-')) {
        comments(data);
        Expression expr = clip(data);
        ExprDouble res = OpDouble.toExprDouble(expr, LitDouble.toExprDouble(1D),OpDouble.MINUS);
View Full Code Here


  protected Expression string(ExprData data) throws TemplateException {
   
    // check starting character for a string literal
    if(!data.cfml.isCurrent('"')&& !data.cfml.isCurrent('\''))
      return null;
    Position line = data.cfml.getPosition();
   
    // Init Parameter
    char quoter = data.cfml.getCurrentLower();
    StringBuffer str=new StringBuffer();
    Expression expr=null;
View Full Code Here

  */
  private LitDouble number(ExprData data) throws TemplateException {
    // check first character is a number literal representation
    if(!(data.cfml.isCurrentBetween('0','9') || data.cfml.isCurrent('.'))) return null;
   
    Position line = data.cfml.getPosition();
    StringBuffer rtn=new StringBuffer();
   
    // get digit on the left site of the dot
    if(data.cfml.isCurrent('.')) rtn.append('0');
    else rtn.append(digit(data));
View Full Code Here

    // aber nicht in der Logik sondern rein wie es umgesetzt wurde.
   
     
     
    // get First Element of the Variable
    Position line = data.cfml.getPosition();
    Identifier id = identifier(data,false,true);
    if(id == null) {
        if (!data.cfml.forwardIfCurrent('(')) return null;
       
            comments(data);
      Expression expr = assignOp(data);

      if (!data.cfml.forwardIfCurrent(')'))
        throw new TemplateException(
          data.cfml,
          "Invalid Syntax Closing [)] not found");
            comments(data);
            return expr;//subDynamic(expr);
           
    }
     
    Variable var;
        comments(data);
   
    // Boolean constant
    if(id.getString().equalsIgnoreCase("TRUE"))  {// || name.equals("YES"))  {
      comments(data);
      return new LitBoolean(true,line,data.cfml.getPosition());
    }
    else if(id.getString().equalsIgnoreCase("FALSE"))  {// || name.equals("NO"))  {
      comments(data);
      return new LitBoolean(false,line,data.cfml.getPosition());
    }
    else if(NullSupportHelper.full() && id.getString().equalsIgnoreCase("NULL"))  {
      comments(data);
      return new Null(line,data.cfml.getPosition());
    }
   
    // Extract Scope from the Variable
    //int c=data.cfml.getColumn();
    Position l=data.cfml.getPosition();
    var = startElement(data,id,line);
    var.setStart(l);
    var.setEnd(data.cfml.getPosition());
    return var;
  }
View Full Code Here

 
  private Expression json(ExprData data,FunctionLibFunction flf, char start, char end) throws TemplateException {
    if(!data.cfml.forwardIfCurrent(start))return null;
   
    Position line = data.cfml.getPosition();
    BIF bif=new BIF(flf.getName(),flf);
    bif.setArgType(flf.getArgType());
    bif.setClass(flf.getClazz());
    bif.setReturnType(flf.getReturnTypeAsString());
   
View Full Code Here

      ExprString nameProp = null,namePropUC = null;
      // .
      if (data.cfml.forwardIfCurrent('.')) {
        // Extract next Var String
                comments(data);
                Position line=data.cfml.getPosition();
                name = identifier(data,true);
        if(name==null)
          throw new TemplateException(data.cfml, "Invalid identifier");
                comments(data);
        nameProp=Identifier.toIdentifier(name,line,data.cfml.getPosition());
View Full Code Here

   * @param firstCanBeNumber
   * @param upper
  * @return Identifier.
  */
  protected Identifier identifier(ExprData data,boolean firstCanBeNumber,boolean upper) {
    Position start = data.cfml.getPosition();
    if(!data.cfml.isCurrentLetter() && !data.cfml.isCurrentSpecial() ) {
        if(!firstCanBeNumber) return null;
            else if(!data.cfml.isCurrentBetween('0','9'))return null;
        }
    do {
View Full Code Here

   * @return parsed Element
   * @throws TemplateException
   */
  private Expression simple(ExprData data,String[] breakConditions) throws TemplateException {
    StringBuffer sb=new StringBuffer();
    Position line = data.cfml.getPosition();
    outer:while(data.cfml.isValidIndex()) {
      for(int i=0;i<breakConditions.length;i++){
        if(data.cfml.isCurrent(breakConditions[i]))break outer;
      }
     
View Full Code Here

          else {
            if(text.length()>0)  {
              parent.addPrintOut(text.toString(),null,null);
              text=new StringBuffer();
            }
                        Position line = data.cfml.getPosition();
            PrintOut po;
            parent.addStatement(po=new PrintOut(transformer.transform(data.page,data.ep,data.flibs,data.scriptTags,data.cfml,data.settings),line,null));
            po.setEnd(data.cfml.getPosition());
           
            if(!data.cfml.isCurrent('#'))
View Full Code Here

   */
  private boolean tag(TagData data,Body parent,boolean parseExpression) throws TemplateException {
      //railo.print.ln("--->"+data.cfml.getCurrent());
      boolean hasBody=false;
   
    Position line = data.cfml.getPosition();
    //int column=data.cfml.getColumn();
    int start=data.cfml.getPos();
    data.cfml.next();
   
    // read in namesapce of tag
View Full Code Here

TOP

Related Classes of railo.transformer.bytecode.Position

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.