Back to index

texmacs  1.0.7.15
Functions
env_inactive.cpp File Reference
#include "env.hpp"

Go to the source code of this file.

Functions

static tree subvar (tree var, int i)
bool is_long (tree t)
bool is_long_arg (tree t, int i)
static tree highlight (tree t, tree orig, int kind)

Function Documentation

static tree highlight ( tree  t,
tree  orig,
int  kind 
) [static]

Definition at line 113 of file env_inactive.cpp.

                                        {
  switch (kind) {
  case TYPE_INVALID:
    return compound ("src-unknown", t);
  case TYPE_REGULAR:
    return compound ("src-regular", t);
  case TYPE_ADHOC:
    return compound ("src-textual", t);
  case TYPE_RAW:
    return compound ("src-error", t);
  case TYPE_VARIABLE:
    return compound ("src-var", t);
  case TYPE_ARGUMENT:
    return compound ("src-arg", t);
  case TYPE_BINDING:
    return compound ("src-regular", t);
  case TYPE_BOOLEAN:
    return compound ("src-numeric", t);
  case TYPE_INTEGER:
    return compound ("src-numeric", t);
  case TYPE_STRING:
    return compound ("src-textual", t);
  case TYPE_LENGTH:
    return compound ("src-length", t);
  case TYPE_NUMERIC:
    return compound ("src-numeric", t);
  case TYPE_CODE:
    return compound ("src-tt", t);
  case TYPE_IDENTIFIER:
    return compound ("src-tt", t);
  case TYPE_URL:
    return compound ("src-tt", t);
  case TYPE_GRAPHICAL:
    return compound ("src-regular", t);
  case TYPE_POINT:
    return compound ("src-regular", t);
  case TYPE_CONSTRAINT:
    return compound ("src-regular", t);
  case TYPE_GRAPHICAL_ID:
    return compound ("src-var", t);
  case TYPE_ANIMATION:
    return compound ("src-regular", t);
  case TYPE_DURATION:
    return compound ("src-length", t);
  case TYPE_OBSOLETE:
    return compound ("src-unknown", t);
  case TYPE_UNKNOWN:
    return compound ("src-unknown", t);
  case TYPE_ERROR:
    return compound ("src-error", t);
  default:
    return compound ("src-error", t);
  }
}

Here is the call graph for this function:

bool is_long ( tree  t)

Definition at line 98 of file env_inactive.cpp.

                 {
  if (is_compound (t)) {
    int i, n= N(t);
    for (i=0; i<n; i++)
      if (is_long_arg (t, i))
       return true;
  }
  return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool is_long_arg ( tree  t,
int  i 
)

Definition at line 27 of file env_inactive.cpp.

                            {
  // FIXME: should go into the DRD
  int n= N(t);
  switch (L(t)) {
  case DOCUMENT:
  case INCLUDE:
  case TFORMAT:
  case TABLE:
    return true;
  case CONCAT:
    return false;
  case SURROUND:
    if (i == 2) return true;
    break;
  case ROW:
    return is_long (t[i]);
  case ASSIGN:
  case DATOMS:
  case DLINES:
  case DPAGES:
  case WITH:
  case MARK:
  case MACRO:
  case XMACRO:
  case CELL:
  case EVAL:
  case QUOTE:
  case QUASI:
  case QUASIQUOTE:
  case UNQUOTE:
  case VAR_UNQUOTE:
    if (i == n-1) return is_long (t[i]);
    break;
  case STYLE_WITH:
  case VAR_STYLE_WITH:
    if (i == n-1) {
      for (i=0; i<n-1; i+=2)
       if (t[i] == SRC_COMPACT) {
         if (t[i+1] == "none") return true;
         if (t[i+1] == "all")  return false;
       }
      return is_long (t[i]);
    }
    break;
  case STYLE_ONLY:
  case VAR_STYLE_ONLY:
  case ACTIVE:
  case VAR_ACTIVE:
    return is_multi_paragraph (t[i]);
  case LOCUS:
  case CANVAS:
  case ORNAMENT:
    if (i == n-1) return is_long (t[i]);
    break;
  default:
    break;
  }

  tree u= t[i];
  switch (L(u)) {
  case TWITH:
  case CWITH:
  case ROW:
    return true;
  default:
    if (L(t) < START_EXTENSIONS) return false;
    return is_long (u);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static tree subvar ( tree  var,
int  i 
) [static]

Definition at line 15 of file env_inactive.cpp.

                         {
  tree svar= copy (var);
  return svar << as_string (i);
}

Here is the call graph for this function:

Here is the caller graph for this function: