private static @NotNull String getAttributeValueByToken(@Nullable ZenCodingToken token, boolean allowOperations) {
    if (token == null) {
      return "";
    }
    if (token instanceof StringLiteralToken) {
      final String text = ((StringLiteralToken)token).getText();
      return text.substring(1, text.length() - 1);
    }
    else if (token instanceof TextToken) {
      return ((TextToken)token).getText();
    }
    else if (token instanceof IdentifierToken) {
      return ((IdentifierToken)token).getText();
    }
    else if (token instanceof NumberToken) {
      return Integer.toString(((NumberToken)token).getNumber());
    }
    else if (allowOperations && token instanceof OperationToken) {
      return String.valueOf(((OperationToken)token).getSign());
    }
    else if (token == ZenCodingTokens.DOT || token == ZenCodingTokens.SHARP) {
      return token.toString();
    }
    return "";
  }
private static @NotNull String getAttributeValueByToken(@Nullable ZenCodingToken token, boolean allowOperations)