lib/thematic.js
function(parent) {
    function error(usage) {
      return new Error('Template theme fields are not permitted '+ usage +':\n>>> '+ Node.toString(parent));
    }

    // Check for arguments implementation:
    if (parent.type === NodeType.ARGUMENTS) {
      throw error('as arguments');
    }

    // Check for interpolations implementation:
    if (parent.type === NodeType.INTERPOLATION) {
      throw error('in interpolations');
    }

    // Check for operations implementation:
    for (var i=0; i < parent.content.length; i++) {
      if (NodeType.OPERATOR.test(parent.content[i].type)) {
        throw error('in operations');
      }
    }
  }
function(parent) {
    function error(usage) {
      return new Error('Template theme fields are not permitted '+ usage +':\n>>> '+ Node.toString(parent));
    }

    // Check for arguments implementation:
    if (parent.type === NodeType.ARGUMENTS) {
      throw error('as arguments');
    }

    // Check for interpolations implementation:
    if (parent.type === NodeType.INTERPOLATION) {
      throw error('in interpolations');
    }

    // Check for operations implementation:
    for (var i=0; i < parent.content.length; i++) {
      if (NodeType.OPERATOR.test(parent.content[i].type)) {
        throw error('in operations');
      }
    }
  }
function ( parent ) { function error ( usage ) { return new Error ( 'Template theme fields are not permitted ' + usage + ':\n>>> ' + Node . toString ( parent ) ) ; } // Check for arguments implementation: if ( parent . type === NodeType . ARGUMENTS ) { throw error ( 'as arguments' ) ; } // Check for interpolations implementation: if ( parent . type === NodeType . INTERPOLATION ) { throw error ( 'in interpolations' ) ; } // Check for operations implementation: for ( var i = 0 ; i < parent . content . length ; i ++ ) { if ( NodeType . OPERATOR . test ( parent . content [ i ] . type ) ) { throw error ( 'in operations' ) ; } } }
Validates the usage context for a template field.
Template fields are post-processed values,
therefore may not be used in preprocessed functions, operations, or interpolations.
@private
Validates the usage context for a template field . Template fields are post - processed values therefore may not be used in preprocessed functions operations or interpolations .