Package org.lilystudio.smarty4j.expression

Examples of org.lilystudio.smarty4j.expression.VariableExpression


    if (!Character.isJavaIdentifierStart(line.charAt(start))) {
      words[wordSize] = getOperation('$');
      return start;
    }
    start = findIdentifier(line, start, end, words, wordSize);
    VariableExpression variable = new VariableExpression(
        (String) words[wordSize]);
    loop: while (start < end) {
      char c = line.charAt(start);
      switch (c) {
      case '[': {
        words[wordSize] = null;
        int pos = findExpression(line, start + 1, end, words, wordSize, ']');
        Object o = words[wordSize];
        if (o == null) {
          break loop;
        }
        start = pos;
        variable.add(new ListExtended((IExpression) o));
        continue;
      }
      case '.': {
        if (type != STRING) {
          c = line.charAt(start + 1);
          IExpression exp;
          if (c == '`') {
            words[wordSize] = null;
            int pos = findExpression(line, start + 2, end, words, wordSize, '`');
            Object o = words[wordSize];
            if (o == null) {
              break loop;
            }
            start = pos;
            exp = (IExpression) words[wordSize];
          } else if (!Character.isJavaIdentifierStart(c)) {
            break loop;
          } else {
            start = findIdentifier(line, start + 1, end, words, wordSize);
            exp = new StringExpression((String) words[wordSize]);
          }
          variable.add(new MapExtended(exp));
          continue;
        }
      }
      default:
        break loop;
View Full Code Here

TOP

Related Classes of org.lilystudio.smarty4j.expression.VariableExpression

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.